[R] explained deviance in multinom

Spencer Graves spencer.graves at pdf.com
Sat Jul 9 22:57:35 CEST 2005


	  RSiteSearch("R-squared for glm") produced 17 hits, the second of 
which cited three articles that might interest you 
(http://finzi.psych.upenn.edu/R/Rhelp02a/archive/48688.html).  Other 
comments suggest that the percent of deviance explained may not be 
terribly useful (e.g., 
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/48689.html).

	  If this is not adequte, PLEASE do read the posting guide! 
"http://www.R-project.org/posting-guide.html" and submit another 
question.  If you follow the posting guide, I believe it will likely 
shorten the time it takes you to solve whatever problem brought you to R.

	  spencer graves

alexbri wrote:

> Hi:
> 
>  
> 
> I'm working with multinomial models with library nnet, and I'm trying to get the explained deviance (pseudo R^2) of my models.
> 
> I am assuming that:
> 
> pseudo R^2= 1 - dev(model) / dev (null)
> 
> where dev(model) is the deviance for the fitted model and dev(null) is the deviance for the null model (with the intercept only).
> 
>  
> 
> library(nnet)
> 
> full.model<- multinom(cbind(factor1, factor2 ,., factor5) ~ x1 + x2 + x3, weights=total, data=mydata)
> 
> null.model<- multinom(cbind(factor1, factor2 ,., factor5) ~ +1, weights=total, data=mydata)
> 
>  
> 
> Then I calculated 
> 
> pseudoR^2 = 1 - full.model$deviance / null.model$deviance
> 
>  
> 
> I'm obtaining very low values for pseudoR^2 (there is not much difference between the deviances of the two models). full.model fits (graphically) very well to the data , so I think that the problem is in the null.model (maybe it is not well defined) or with the calculus of pseudoR^2.
> 
>  
> 
> Can someone please give me some suggestions about this?
> 
> Thanks in advance
> 
> alex
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA

spencer.graves at pdf.com
www.pdf.com <http://www.pdf.com>
Tel:  408-938-4420
Fax: 408-280-7915




More information about the R-help mailing list