How to get MSE of ARIMA model in SAS?

自古美人都是妖i 提交于 2020-01-06 20:10:41

问题


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!


回答1:


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.



来源:https://stackoverflow.com/questions/34991749/how-to-get-mse-of-arima-model-in-sas

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!