[R] Different LLRs on multinomial logit models in R and SPSS

Sören Vogel
Thu, 06 Jan 2011 16:23:55 -0000

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?

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)
}