MATLAB Answers

How to calculate AIC in glmfit?

58 views (last 30 days)
Please help me with this!
How to calculate AIC in glmfit? I use gamma and log as link function.
Thanks a lot!

  0 Comments

Sign in to comment.

Accepted Answer

Shashank Prasanna
Shashank Prasanna on 14 Jul 2014
It is recommended to use fitglm instead of the older glmfit. Depending on the release of MATLAB (> R2012a) you can use either of the two:
You can access AIC, BIC etc as follows:
load hospital
modelspec = 'Smoker ~ Age*Weight*Sex - Age:Weight:Sex';
mdl = fitglm(hospital,modelspec,'Distribution','binomial')
mdl.ModelCriterion
ans =
AIC: 137.141380948166
AICc: 138.358772252513
BIC: 155.377572250082
CAIC: 162.377572250082

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.