Message Boards Message Boards


Calculate AIC for twelve linear fit models?

Posted 7 months ago
2 Replies
0 Total Likes

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}]
2 Replies
Posted 7 months ago

Hi André

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

Table[ajust[[i]][{"AIC", "BIC"}], {i, 1, n1, 1}]


Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract