<p><a href="http://rads.stackoverflow.com/amzn/click/0471183865" rel="nofollow">Statistical Analysis with Missing Data by Little and Rubin</a> is the go-to reference for working with missing data, at least if nothing state of the art is required. In general, this is a complex problem that remains an area of active research. The relatively easy cases are when the data is <a href="http://missingdata.lshtm.ac.uk/index.php?option=com_content&amp;view=article&amp;id=75:missing-completely-at-random-mcar&amp;catid=40:missingness-mechanisms&amp;Itemid=96" rel="nofollow">missing-completely-at-random</a> or <a href="http://missingdata.lshtm.ac.uk/index.php?option=com_content&amp;view=article&amp;id=76:missing-at-random-mar&amp;catid=40:missingness-mechanisms&amp;Itemid=96" rel="nofollow">missing-at-random</a>. Even among the most basic single imputation methods you have a lot of choices (list from Little and Rubin):</p>

<ol>
<li>Mean imputation (replace with mean values)</li>
<li>Regression imputation</li>
<li>Stochastic regression imputation</li>
<li>Hot deck imputation (substitute individual values drawn from "similar" response units)</li>
<li>Substitution (not relevant in your context)</li>
<li>Cold deck imputation (replace missing value with constant value from external source like last value)</li>
<li>Composites of the above methods </li>
</ol>

<p>However, if all the the general price level is what's of interest and not the dynamics of the price level (e.g. because you want a deflator instead of studying inflation dynamics) linear interpolation / extrapolation may be just fine. Fundamentally, since deflation is rare, if prices are 100 at time t and 110 at t+2, realistically prices at t+1 are going to be somewhere in $[100,110]$ and lots of models can get you there.  </p>

<p>You can check the within and out of sample prediction quality to asses if your method is a good predictor of the missing prices. Within sample testing could be as simple as asking if the $R^2$ is high of predictive model. Obviously you can do much richer analysis than that. For out of sample testing, consider splitting the sample and calibrating the model only on the first half of the data, then evaluating prediction quality on the second half of the data. </p>

CC BY-SA 3.0
2015-01-23T02:53:25.447Z
Can you expand a bit on the regression imputation methods, which you measure has many possibilities. Would a simple regression of CPI on Time be even feasible? I would find the regression parameters and plug in in the missing year into the generated regression equation to predict the CPI for a missing year. By doing such procedure am I jumping too far ahead in terms of the type of pattern exhibited by my data?
StatsScared
CC BY-SA 3.0
2015-01-23T12:05:20.717Z
It depends on the use I imagine. Say you had nominal Russian GDP for 2010-2013 but no inflation series for those years and you had some model of the Russian economy that needed real GDP. You can use a method to replace the missing data or you can drop the 2010-2013 observations. But that later isn't neutral either. Since you say you care about the price level more than GDP, I suggest modeling that instead of CPI.
BKay
CC BY-SA 3.0
2015-01-21T21:13:46.087Z
2015-01-21T21:13:46.087Z
BKay
<p>I am looking at CPI datasets for developing countries which have gaps in them. </p>

<p>For each country I have two time-series with annual averages for years 2000-2013: i) General/Overall CPI and ii) Food CPI. I'm also assuming that Food CPI must have some relationship with the General/Overall CPI since the Food category has its own weight in the General CPI.</p>

<p>Now, I have two types of cases, some such as: <a href="https://i.sstatic.net/H500x.jpg" rel="nofollow noreferrer">https://i.sstatic.net/H500x.jpg</a> where gaps are between values. I'm assuming I can interpolate here, if so, how would I go forward with this? I also have to deal with more complicated cases such as: <a href="https://i.sstatic.net/JrA48.jpg" rel="nofollow noreferrer">https://i.sstatic.net/JrA48.jpg</a>, any suggestions in this case? Would a simple extrapolation even make sense here?</p>

<p>An option for my first case that I read (on BLS) is taking the geometric mean of the year immediately before and after of the missing value. Other people have suggested I should predict the missing values by a simple regression model of the CPI on the GDP deflator for that year (which I do have). </p>

<p>Also, in some cases, gaps in annual averages exist because the monthly data needed to calculate these averages is incomplete. So say I only have 2006 data for Russia for months Jan-June, then the annual average data point is missing in the data series. I assume I can just take a simple average of the available months and impute that for 2006? </p>

<p>Thanks in advance</p>

CC BY-SA 3.0
2015-01-21T04:55:39.403Z
I like the idea of using regression modeling with previous data to predict missing values. What is your use for the data? What if you, roughly, develop a 'confidence interval' for the missing values? If you find that a value tending toward one extreme or another is significant then perhaps you could refine your process. If you have comparable results when you let $MV \in [MV-\epsilon,MV+\epsilon]$ then your predicted value is probably good enough.
123
CC BY-SA 3.0
2015-01-21T15:20:37.077Z
Thanks. I plan on using the CPI to extrapolate other economic indicators. Regarding your suggestion on the regression wouldnt I run into problems since a reg of CPI on the GDP deflator would assume they both move together? We know that both inflation indicators do not always do so unfortunately.
StatsScared
CC BY-SA 3.0
2015-01-21T18:22:14.137Z
1) Do you think you can assume that the missing-ness of the inflation data is unrelated to the values of inflation?
2) What is of interest, the dynamics of inflation or the general price level?
BKay
CC BY-SA 3.0
2015-01-21T20:30:22.177Z
1) Yes, I'm pretty confident they're unrelated and 2) the general price level is what's of interest. Thanks
StatsScared
<time-series>
What to do for missing points in CPI time series?
StatsScared
# What to do for missing points in CPI time series?

(Asked by: username_0 on 2015-01-20)

I am looking at CPI datasets for developing countries which have gaps in them.

For each country I have two time-series with annual averages for years 2000-2013: i) General/Overall CPI and ii) Food CPI. I'm also assuming that Food CPI must have some relationship with the General/Overall CPI since the Food category has its own weight in the General CPI.

Now, I have two types of cases, some such as: <https://i.sstatic.net/H500x.jpg> where gaps are between values. I'm assuming I can interpolate here, if so, how would I go forward with this? I also have to deal with more complicated cases such as: <https://i.sstatic.net/JrA48.jpg>, any suggestions in this case? Would a simple extrapolation even make sense here?

An option for my first case that I read (on BLS) is taking the geometric mean of the year immediately before and after of the missing value. Other people have suggested I should predict the missing values by a simple regression model of the CPI on the GDP deflator for that year (which I do have).

Also, in some cases, gaps in annual averages exist because the monthly data needed to calculate these averages is incomplete. So say I only have 2006 data for Russia for months Jan-June, then the annual average data point is missing in the data series. I assume I can just take a simple average of the available months and impute that for 2006?

Thanks in advance

**Tags:** time-series

> **Comments:**
> **username_1**: I like the idea of using regression modeling with previous data to predict missing values. What is your use for the data? What if you, roughly, develop a 'confidence interval' for the missing values? If you find that a value tending toward one extreme or another is significant then perhaps you could refine your process. If you have comparable results when you let $MV \in [MV-\epsilon,MV+\epsilon]$ then your predicted value is probably good enough.  
> **username_0**: Thanks. I plan on using the CPI to extrapolate other economic indicators. Regarding your suggestion on the regression wouldnt I run into problems since a reg of CPI on the GDP deflator would assume they both move together? We know that both inflation indicators do not always do so unfortunately.  
> **username_2**: 1) Do you think you can assume that the missing-ness of the inflation data is unrelated to the values of inflation? 2) What is of interest, the dynamics of inflation or the general price level?  
> **username_0**: 1) Yes, I'm pretty confident they're unrelated and 2) the general price level is what's of interest. Thanks  

---

## 1 answers

### Answer by username_2 on 2015-01-21. Score: 1 | Accepted answer

[Statistical Analysis with Missing Data by Little and Rubin](http://rads.stackoverflow.com/amzn/click/0471183865) is the go-to reference for working with missing data, at least if nothing state of the art is required. In general, this is a complex problem that remains an area of active research. The relatively easy cases are when the data is [missing-completely-at-random](http://missingdata.lshtm.ac.uk/index.php?option=com_content&view=article&id=75:missing-completely-at-random-mcar&catid=40:missingness-mechanisms&Itemid=96) or [missing-at-random](http://missingdata.lshtm.ac.uk/index.php?option=com_content&view=article&id=76:missing-at-random-mar&catid=40:missingness-mechanisms&Itemid=96). Even among the most basic single imputation methods you have a lot of choices (list from Little and Rubin):

1. Mean imputation (replace with mean values)
2. Regression imputation
3. Stochastic regression imputation
4. Hot deck imputation (substitute individual values drawn from "similar" response units)
5. Substitution (not relevant in your context)
6. Cold deck imputation (replace missing value with constant value from external source like last value)
7. Composites of the above methods

However, if all the the general price level is what's of interest and not the dynamics of the price level (e.g. because you want a deflator instead of studying inflation dynamics) linear interpolation / extrapolation may be just fine. Fundamentally, since deflation is rare, if prices are 100 at time t and 110 at t+2, realistically prices at t+1 are going to be somewhere in $[100,110]$ and lots of models can get you there.

You can check the within and out of sample prediction quality to asses if your method is a good predictor of the missing prices. Within sample testing could be as simple as asking if the $R^2$ is high of predictive model. Obviously you can do much richer analysis than that. For out of sample testing, consider splitting the sample and calibrating the model only on the first half of the data, then evaluating prediction quality on the second half of the data.

> **Comments:**
> **username_0**: Can you expand a bit on the regression imputation methods, which you measure has many possibilities. Would a simple regression of CPI on Time be even feasible? I would find the regression parameters and plug in in the missing year into the generated regression equation to predict the CPI for a missing year. By doing such procedure am I jumping too far ahead in terms of the type of pattern exhibited by my data?  
> **username_2**: It depends on the use I imagine. Say you had nominal Russian GDP for 2010-2013 but no inflation series for those years and you had some model of the Russian economy that needed real GDP. You can use a method to replace the missing data or you can drop the 2010-2013 observations. But that later isn't neutral either. Since you say you care about the price level more than GDP, I suggest modeling that instead of CPI.  

---

