search for: rnagel

Displaying 2 results from an estimated 2 matches for "rnagel".

Did you mean: nagel
2011 Jan 06
4
Different LLRs on multinomial logit models in R and SPSS
Hello, after calculating a multinomial logit regression on my data, I compared the output to an output retrieved with SPSS 18 (Mac). The coefficients appear to be the same, but the logLik (and therefore fit) values differ widely. Why? The regression in R: set.seed(1234) df <- data.frame( "y"=factor(sample(LETTERS[1:3], 143, repl=T, prob=c(4, 1, 10))), "a"=sample(1:5,
2010 Dec 27
0
Nagelkerke R square for Prediction data
...use to others -- or subject to useful improvement. Please let me know, if you find errors. Regards, S?ren Rcsnagel <- function(mod) { llnull <- mod$null.deviance llmod <- mod$deviance n <- length(mod$fitted.values) Rcs <- 1 - exp( (mod$deviance - mod$null.deviance) / n ) Rnagel <- Rcs / (1 - exp(-llnull/n)) out <- list('Rcs'=Rcs, 'Rnagel'=Rnagel) class(out) <- c("list", "table") return(out) } y <- sample(c(T, F), 50, repl=T) x <- sample(1:7, 50, repl=T) mod <- glm(y ~ x, family=binomial("logit")) Rcsna...