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.

 Respuesta aceptada

William Rose
William Rose el 1 de Feb. de 2022
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.

2 comentarios

Amanda
Amanda el 1 de Feb. de 2022
Absolutely perfect. Thank you.
William Rose
William Rose el 2 de Feb. de 2022
@Amanda Willard Sauer, you're welcome.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Etiquetas

Preguntada:

el 1 de Feb. de 2022

Comentada:

el 2 de Feb. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by