Skip to content
Back to formatted view

Raw Message

Message-ID: <8D4AC2A1-ABCB-4B51-B057-05A98745C28E@comcast.net>
Date: 2011-01-06T17:03:17Z
From: David Winsemius
Subject: Different LLRs on multinomial logit models in R and SPSS
In-Reply-To: <AANLkTi=uhLNZqRU33zGuSBBoUou0g5Fhb4aLfBqMoMH2@mail.gmail.com>

On Jan 6, 2011, at 11:23 AM, S?ren Vogel wrote:

> Thanks for your replies. I am no mathematician or statistician by far,
> however, it appears to me that the actual value of any of the two LLs
> is indeed important when it comes to calculation of
> Pseudo-R-Squared-s. If Rnagel devides by (some transformation of) the
> actiual value of llnull then any calculation of Rnagel should differ.
> How come? Or is my function wrong? And if my function is right, how
> can I calculate a R-Squared independent from the software used?

You have two models in that function, the null one with ".~ 1" and the  
origianl one and you are getting a ratio on the likelihood scale  
( which is a difference on the log-likelihood or deviance scale).

>
> Rfits <- function(mod) {
>  llnull <- deviance(update(mod, . ~ 1, trace=F))
>  llmod <- deviance(mod)
>  n <- length(predict(mod))
>  Rcs <- 1 - exp( (llmod - llnull) / n )
>  Rnagel <- Rcs / (1 - exp(-llnull/n))
>  out <- list(
>    "Rcs"=Rcs,
>    "Rnagel"=Rnagel
>  )
>  class(out) <- c("list", "table")
>  return(out)
> }


-- 
David Winsemius, MD
West Hartford, CT