How to pull out aic from arima

Greetings-
I have been digging through the help and my search has failed me. I am running a aimple arima on a small matrix [30x99], one column at a time and I'd like to pull the aic. The code I am using is pretty much stright from the examples here.
totalsColumn = normM(:,99);
categoryModel = arima(2,1,1);
categoryFit = estimate(categoryModel,totalsColumn);
results = summarize(categoryModel)
What I am reading says summarize should output a few things including "aic = -something" but I get:
results =
arima with properties:
Description: "ARIMA(2,1,1) Model (Gaussian Distribution)"
Distribution: Name = "Gaussian"
P: 3
D: 1
Q: 1
Constant: NaN
AR: {NaN NaN} at lags [1 2]
SAR: {}
MA: {NaN} at lag [1]
SMA: {}
Seasonality: 0
Beta: [1×0]
Variance: NaN
Also using value - aic(categoryModel) (or categoryFit, just gives me an error of:
Undefined function 'aic' for input arguments of type 'arima'.
Error in projectW100Norm (line 17)
value = aic(categoryModel)
I have both the economic toobox and the system identification toolbox downloaded and added.
I just want to pull out the aic. I know that it is shown in the economic modeler app, but I'd like to pull it for my code.
Thank you in advance for any help.

 Accepted Answer

You only get the AIC for an estimated model.
In the code you posted, you are looking at the results for the un-estimated model "CategoryModel".
Look at categoryFit instead.
categoryFit = estimate(categoryModel,totalsColumn);
results = summarize(categoryFit)
disp(results.AIC)
Try it. Good luck.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Release

R2021b

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!