<p>It is called "imputing" values.
Find the linear trend between 2012 and 2014 revenue and impute this value for 2013. In your case, it is just the average between the revenues before and after.</p>

CC BY-SA 3.0
2017-07-24T20:50:37.353Z
2017-07-24T20:50:37.353Z
Alecos Papadopoulos
<p>Alternatively, you can use the mean of the period, or fit a linear trend and interpolate. These methods use more information than just two years, which has the benefit of accounting for possible idiosyncratic factors in 2012 or 2014, with the cost of perhaps adding idiosyncratic factors from years as far as 2017. </p>

<p>Here is the R code with the three methods (including Alecos's):</p>

<pre><code># Interpolate between 2012 and 2014
df = data.frame(year = 2010:2017, y = c(22306000,22420000,23010000,NA,25430000,25601000,25267000,23895400))
df$y[is.na(df$y)] = mean(df$y[df$year==2012 | df$year==2014], na.rm=TRUE)

# Replace with mean of period
df = data.frame(year = 2010:2017, y = c(22306000,22420000,23010000,NA,25430000,25601000,25267000,23895400))
df$y[is.na(df$y)] = mean(df$y, na.rm=TRUE)

# Regression interpolation
df = data.frame(year = 2010:2017, y = c(22306000,22420000,23010000,NA,25430000,25601000,25267000,23895400))
fit &lt;- lm(y ~ year, data=df)
df$y[df$year==2013] &lt;- predict(fit, newdata = data.frame(year = 2013))
</code></pre>

<p>The results with each method are <code>24220000</code>, <code>23989914</code>, and <code>23753107</code> respectively. They are different because the series does not follows a linear trend:</p>

<pre><code># Plot
df = data.frame(year = 2010:2017, y = c(22306000,22420000,23010000,NA,25430000,25601000,25267000,23895400))
plot(x=df$year,df$y, type="l",lwd = 2)
</code></pre>

<p><a href="https://i.sstatic.net/oKUKt.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oKUKt.png" alt="enter image description here"></a></p>

<p>Thus, it seems Aleco's method might be the most appropriate in this case. (It is also possible to fit <a href="https://datascienceplus.com/fitting-polynomial-regression-r/" rel="nofollow noreferrer">non-linear trends</a>)</p>

CC BY-SA 3.0
2017-07-25T08:17:50.100Z
2017-07-25T08:17:50.100Z
luchonacho
<p>Im interested in forecasting revenue for 2018. </p>

<pre><code>Year           Revenue 
 2010        $22,306,000
 2011        $22,420,000
 2012        $23,010,000
 2013             NA
 2014        $25,430,000
 2015        $25,601,000
 2016        $25,267,000
 2017        $23,895,400
</code></pre>

<p>Im unable to identify the appropriate model (AR,MA,ARMA ect.) since the use ACF and the PACF is not possible since i lack data for 2013.</p>

<p>How would i deal with such an issue? (preferably using R)</p>

<applied-econometrics>
Producer Econometrics: Univariate modelling with missing data
EconJohn
# Producer Econometrics: Univariate modelling with missing data

(Asked by: username_0 on 2017-07-24)

Im interested in forecasting revenue for 2018.

```
Year           Revenue 
 2010        $22,306,000
 2011        $22,420,000
 2012        $23,010,000
 2013             NA
 2014        $25,430,000
 2015        $25,601,000
 2016        $25,267,000
 2017        $23,895,400

```

Im unable to identify the appropriate model (AR,MA,ARMA ect.) since the use ACF and the PACF is not possible since i lack data for 2013.

How would i deal with such an issue? (preferably using R)

**Tags:** applied-econometrics


---

## 2 answers

### Answer by username_1 on 2017-07-24. Score: 1 | Accepted answer

It is called "imputing" values.
Find the linear trend between 2012 and 2014 revenue and impute this value for 2013. In your case, it is just the average between the revenues before and after.


---

### Answer by username_2 on 2017-07-25. Score: 2

Alternatively, you can use the mean of the period, or fit a linear trend and interpolate. These methods use more information than just two years, which has the benefit of accounting for possible idiosyncratic factors in 2012 or 2014, with the cost of perhaps adding idiosyncratic factors from years as far as 2017.

Here is the R code with the three methods (including username_1's):

```
# Interpolate between 2012 and 2014
df = data.frame(year = 2010:2017, y = c(22306000,22420000,23010000,NA,25430000,25601000,25267000,23895400))
df$y[is.na(df$y)] = mean(df$y[df$year==2012 | df$year==2014], na.rm=TRUE)

# Replace with mean of period
df = data.frame(year = 2010:2017, y = c(22306000,22420000,23010000,NA,25430000,25601000,25267000,23895400))
df$y[is.na(df$y)] = mean(df$y, na.rm=TRUE)

# Regression interpolation
df = data.frame(year = 2010:2017, y = c(22306000,22420000,23010000,NA,25430000,25601000,25267000,23895400))
fit <- lm(y ~ year, data=df)
df$y[df$year==2013] <- predict(fit, newdata = data.frame(year = 2013))

```

The results with each method are `24220000`, `23989914`, and `23753107` respectively. They are different because the series does not follows a linear trend:

```
# Plot
df = data.frame(year = 2010:2017, y = c(22306000,22420000,23010000,NA,25430000,25601000,25267000,23895400))
plot(x=df$year,df$y, type="l",lwd = 2)

```

[![enter image description here](https://i.sstatic.net/oKUKt.png)](https://i.sstatic.net/oKUKt.png)

Thus, it seems Aleco's method might be the most appropriate in this case. (It is also possible to fit [non-linear trends](https://datascienceplus.com/fitting-polynomial-regression-r/))


---

