[R] McFadden r^2 and the inrercept
Joshua Wiley
jwiley.psych at gmail.com
Tue Oct 25 16:30:30 CEST 2011
Hi Ville,
McFadden's pseudo R^2 is just a (log) likelihood ratio for your model
compared to the null model. The null is typically an intercept only
model, but other comparisons may be valid also.
If memory serves:
1 - log(full_likelihood)/log(null_likelihood)
you can often extract likelihoods from model objects using the
logLik() function. However, I thought that mlogit gave McFadden's
pseudo R^2 in its summary output??
Josh
On Tue, Oct 25, 2011 at 7:09 AM, Ville Iiskola <ville.iiskola at uta.fi> wrote:
> Hi
>
>
>
> I have estimated parameters of my data with mlogit and the following commands. I would like to know also the McFadden R^2 and the intercept, could soweone tell me how that can be done?
>
>
>
> library(RODBC)
>
>
>
> library(mlogit)
>
>
>
> library(foreign)
>
>
>
> z<-odbcConnectExcel("D:\\MALLI11ARVOT.xls")
>
>
>
> y<-sqlFetch(z,"Taul1")
>
>
>
> Mallidata=mlogit.data(y,choice="Voittaja",shape="long",id.var="Numeropäivälähtö",alt.var="Kilpailunumero")
>
>
>
> summary(mlogit(Voittaja ~ Onkokaikkikengätpois + Onkoosakengistäjalassa+ OurChoicedummy1 +MvaiN+OvaiR+LogFO+kaksi+kolme+neljä+viisi+kuusi+seitsemäntaikahdeksan+yhdeksäntaikymmenen-1 , data=Mallidata, na.action=na.pass))
>
>
>
> Ville
>
> [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at r-project.org 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.
>
>
--
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, ATS Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/
More information about the R-help
mailing list