MATLAB Answers

0

How to calculate AIC in glmfit?

Asked by TingTing on 14 Jul 2014
Latest activity Answered by Shashank Prasanna on 14 Jul 2014
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.

1 Answer

回答者: Shashank Prasanna 2014 年 7 月 14 日
 採用された回答

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.