[R] explained deviance in multinom

From: alexbri <alexbri_at_netcabo.pt>
Date: Sat 09 Jul 2005 - 04:07:38 EST


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@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 Received on Sat Jul 09 04:12:36 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:26 EST