00:01
Okay, so we're going to go ahead and do this analysis by r.
00:05
Okay, so we load the package tsa, set the seed, and then set the parameter here, and then you simulate the white noise.
00:17
You can use r norm, and then you generate the different series, delta xt equals et plus theta times e t minus 1, and then you generate the imax, 1 -1 series by accumulating the differences starting from theta 0 and then you set aside the last 5 values for validation and then you fit the arima 011 model with the drift and then you extract the estimates theta -hut and theta 0 -0 -hat and print the estimates okay let's execute the code so far okay so estimated theta is about 1 and estimated theta 0 is this is not available because if you look at the model here, there's only one parameter that is fitted.
01:16
So let's look at the data itself here, x.
01:30
Okay, so this is just going to be the estimate would just be the mean of x.
01:36
So 12 .3 .1.
01:39
And then for v, you forecast the next five values using the estimated model.
01:46
So you prepare the time and time forecast.
01:51
Also for forecast, you call the predict function.
01:56
And then here you plot the series together with the five forecast, five line, five forecast.
02:05
Okay, so let's execute this code here for b.
02:10
Okay, so here you can see the actual series and the forecast.
02:16
It's actually very, very far away because the...
02:19
The forecast is quite a constant term here and for c you need to compare the pie forecast with the actual values okay so you just have the data frame here for comparison print the comparison okay so forecast is flat at 8 .77 and it quite it actually deviates quite a lot and then you float the forecast together with 95 % forecast limits.
02:57
Or excuse me, you set the upper limit and lower limit and plot with the confidence intervals.
03:04
Here, plot and add the forecast, add the upper limit and lower limit of the confidence interval.
03:13
Let's execute this code...