Consider the following quarterly time series.
Quarter |
Year 1 |
Year 2 |
Year 3 |
1 |
923 |
1,112 |
1,243 |
2 |
1,056 |
1,156 |
1,301 |
3 |
1,124 |
1,124 |
1,254 |
4 |
992 |
1,078 |
1,198 |
Use a multiple regression model with dummy variables for quarters 1, 2, and 3 and a time variable. What is your forecast for year 4 quarter 1? Round your answer to one decimal place.
The forecasted value is 1317.9
The working the done using R, script can be found in the end.
The dummy variables are created and data has been organised as follows:
Q1 = 1 ; Quarter 1
0 ; otherwise
Similarly Q2 & Q3 are created.
Data:
R Script:
> model = lm( Value ~ Year+Q1+Q2+Q3, data = timeseries )
> model
Call:
lm(formula = Value ~ Year + Q1 + Q2 + Q3, data = timeseries)
Coefficients:
(Intercept) Year Q1 Q2 Q3
864.083 112.625 3.333 81.667 78.000
> newdata = data.frame(Year=4, Q1=1 , Q2=0, Q3=0)
> newdata
Year Q1 Q2 Q3
1 4 1 0 0
> predict(model,newdata)
1
1317.917
> round(predict(model,newdata),1)
1
1317.9
Get Answers For Free
Most questions answered within 1 hours.