Computing likelihood ratio pseudo-R2
49 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I wish to compute the likelihood ratio pseudo-R2 from a logistic regression using glmfit.
R2 = (DevianceNull-DevianceModel)/(DevianceNull).
Does DevianceModel correspond to dev returned from glmfit?
[~, dev] = glmfit(X, Y, 'binomial');
In that case, is the pseudo-R2 computed as?
[~, devModel] = glmfit(X, Y, 'binomial');
[~, devNull] = glmfit(zeros(length(Y), 1), Y, 'binomial');
R2 = (DevNull-DevModel)/(DevNull);
Many thanks
Voir également
Catégories
En savoir plus sur Linear Regression dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!