Message Boards Message Boards

Calculate AIC for twelve linear fit models?

I have a table of 12 series of temperature. I calculate the linear model for these 1é series with

ajust = Table[
   LinearModelFit[tabmoymob[[i]], {1, x}, x], {i, 1, n1, 1}];

where n1=12; I have a good result : enter image description here

now I want calculate AIC and BIC for each models with the function Table. Can you help me? This line of code don't work :

Table[ajust[{"Aic", "BIC"}[[i]]], {i, 1, n1, 1}]
POSTED BY: André Dauphiné
2 Replies

Thanks

POSTED BY: André Dauphiné
Posted 4 years ago

Hi André

The Part specification is misplaced and Aic should be AIC. Try

Table[ajust[[i]][{"AIC", "BIC"}], {i, 1, n1, 1}]
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract