I am comparing two models, one with exponential smoothing and one with ARIMA.
For this specific assignment, it's enough that I compare the MSE of the two models.
So how do I compute the MSE of the ARIMA procedure?
This is the last assignment on this grueling course, help would be greatly appreciated!
proc arima
does not specifically output the MSE, but proc model
does. You can recreate the ARIMA model using proc model
and the %AR
and %MA
macros.
proc model data=have;
endo y;
id date;
y = mu;
%AR(AR, 1, y, m=ML);
%MA(MA, 1, y, m=ML);
fit y;
run;
This specifies an ML-estimated ARMA(1,0,1) model with an intercept, mu
.
proc model
will then output the MSE of your model. Note that %MA
must come after %AR
, and both the %AR
and %MA
macros must come after the equation.
If you need a more complicated lag structure, you can specify additional options in either macro:
%AR(AR, 3, y, 1 3, M=ML)
This creates ML-estimated AR variables of order 3 whose variable prefix is AR
using a subset of lags 1 and 3.
Here is an example of output using sashelp.air
with the %AR
macro:
Note that any differencing must be performed in a data step before entering
proc model
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.