Re: compute coefficient of determination (R-squared) for GLM (maximum likelihood)
It is not available for a reason. The correct way would be to use lm()
instead, if possible. This function reports an R² in the summary. In
the case of glm, and if you're absolutely sure about what you're
doing, you can use one of the approximations that is used when looking
at prediction only, realizing very well you can't possibly use R² to
compare models with a different number of variables and realizing very
well that the R² doesn't mean what you think it does when using a link
> I want to compute coefficient of determination (R-squared) to complement AIC
> for model selection of
> multivariable GLM.
> However, I found this is not a built-in function in glm. neither is it
> available through reviewing the question in the R-help archive.
> Please kindly help and thanks a lot.
> [[alternative HTML version deleted]]
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control
The first calculation seems OK, it gives the logicala values in models (from 0 to 1),
but the second gives the negative values; higher corelation between the y and prediction gives more neagtive R2 value (up to -85).
And my second question, looks logical but I need more teoretical answer;
why R^2 (r-square) values are not appropriate for use with non-linear regression models (like exponential)?