How to calculate AIC in glmfit?
11 ビュー (過去 30 日間)
古いコメントを表示
Please help me with this!
How to calculate AIC in glmfit? I use gamma and log as link function.
Thanks a lot!
0 件のコメント
採用された回答
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
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 Center および File Exchange で Analysis of Variance and Covariance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!