필터 지우기
필터 지우기

How to calculate AIC in glmfit?

조회 수: 16 (최근 30일)
TingTing
TingTing 2014년 7월 14일
댓글: MURAT OKATAN 2021년 4월 26일
Please help me with this!
How to calculate AIC in glmfit? I use gamma and log as link function.
Thanks a lot!

채택된 답변

Shashank Prasanna
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
  댓글 수: 1
MURAT OKATAN
MURAT OKATAN 2021년 4월 26일
Note, however, that fitglm computes the model criteria using mdl.NumCoefficients as the number of parameters estimated, and mdl.NumCoefficients does not account for the dispersion parameter of the Normal, Gamma and Inverse Gaussian distributions [1]. But, according to some studies [e.g. 2,3 and 4], the dispersion parameter needs to be counted among estimated parameters in computing the model criteria in GLMs that use those distributions.
[1] MATLAB Version: 9.7.0.1261785 (R2019b) Update 3.
[2] Clifford M. Hurvich, Chih-Ling Tsai, Regression and time series model selection in small samples, Biometrika, Volume 76, Issue 2, June 1989, Pages 297–307, https://doi.org/10.1093/biomet/76.2.297.
[3] Joseph E. Cavanaugh, Unifying the derivations for the Akaike and corrected Akaike information criteria, Statistics & Probability Letters, Volume 33, Issue 2, 1997, Pages 201-208, ISSN 0167-7152, https://doi.org/10.1016/S0167-7152(96)00128-9.
[4] Burnham, K.P. and Anderson, D.R. (2002) Model Selection and Inference: A Practical Information-Theoretic Approach. 2nd Edition, Springer-Verlag, New York. (e.g. p.95 Table 2.1)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by