Estimation and forecasting ARMA differences between Matlab and Stata
Afficher commentaires plus anciens
I have to forecast values from an AR(1) model. I have done this with stata using the following code :
arima cpi in 1/182, arima(1,0,0)
predict resultat if e(sample)==0
My sample is composed by 192 observations. I estimated my model with the 182 first observations and making a forecasting of the 10 last observations. The results are the following :
Results
.1826865
.2050786
.14859
.2937709
.2403078
.1609152
.0748219
.0395317
.1901138
.1172391
But when I try to make it in Matlab, I have totally differents results, with the lasts forecasting data that seems to converge to a specific value :
0.1969
0.1885
0.1848
0.1833
0.1826
0.1823
0.1822
0.1822
0.1821
0.1821
For doing this I have used the code below :
insample = DataY(1:181);
outsample = DataY(182:end);
model = estimate(arima(1,0,0), insample);
results = forecast(model,10, 'Y0', insample);
In addition, the constant of the Ar(1) is not the same in Matlab and Stata (0.104 for Matlab and 0.1826 for Stata). Are these differences normal ? And why the forecasted data tend to converge to 0.1821 in Matlab but don't converge to any particular value in Stata ? Am I making something wrong in Matlab ?
Thanks in advance for the reply.
Réponses (0)
Catégories
En savoir plus sur Conditional Mean Models dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!