similar to: multinom() residual deviance

Displaying 20 results from an estimated 2000 matches similar to: "multinom() residual deviance"

2011 Jan 20
1
predict() for bootstrapped model coefficients
I run a multinomial regression on a data set with an outcome that has three values. First, I build an initial model, b.mod. Then I run a loop to bootstrap the coefficients. For the initial model, using "predict()", I can print the wrong/false predictions table. But how do I get this table (that is, the predictions) for the bootstrapped model? Thanks for hints, *S* df <-
2005 Jul 08
1
explained deviance in multinom
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,
2005 Apr 12
1
factors in multinom function (nnet)
Dear All: I am interested in multinomial logit models (function multinon, library nnet) but I'm having troubles in choose whether to define the predictors as factors or not. I had posted earlier this example (thanks for the reply ronggui): worms<- data.frame(year= rep(2000:2004, c(3,3,3,3,3)),age=rep(1:3,5),
2006 Feb 22
2
does multinomial logistic model from multinom (nnet) has logLik?
I want to get the logLik to calculate McFadden.R2 ,ML.R2 and Cragg.Uhler.R2, but the value from multinom does not have logLik.So my quetion is : is logLik meaningful to multinomial logistic model from multinom?If it does, how can I get it? Thank you! ps: I konw VGAM has function to get the multinomial logistic model with logLik, but I prefer use the function from "official" R
2005 Apr 13
2
multinom and contrasts
Hi, I found that using different contrasts (e.g. contr.helmert vs. contr.treatment) will generate different fitted probabilities from multinomial logistic regression using multinom(); while the fitted probabilities from binary logistic regression seem to be the same. Why is that? and for multinomial logisitc regression, what contrast should be used? I guess it's helmert? here is an example
2012 Jan 05
2
difference of the multinomial logistic regression results between multinom() function in R and SPSS
Dear all, I have found some difference of the results between multinom() function in R and multinomial logistic regression in SPSS software. The input data, model and parameters are below: choles <- c(94, 158, 133, 164, 162, 182, 140, 157, 146, 182); sbp <- c(105, 121, 128, 149, 132, 103, 97, 128, 114, 129); case <- c(1, 3, 3, 2, 1, 2, 3, 1, 2, 2); result <- multinom(case ~ choles
2006 Jun 27
1
weights in multinom
Best R Help, I like to estimate a Multinomial Logit Model with 10 Classes. The problem is that the number of observations differs a lot over the 10 classes: Class | num. Observations A | 373 B | 631 C | 171 D | 700 E | 87 F | 249 G | 138 H | 133 I | 162 J | 407 Total: 3051 Where my data looks like: x1 x2 x3 x4 Class 1 1,02 2 1 A 2 7,2 1 5 B 3 4,2 1 4 H 1 4,1 1 8 F 2 2,4 3 7 D 1 1,2 0 4 J 2 0,9
2005 May 13
1
multinom(): likelihood of model?
Hi all, I'm working on a multinomial (or "polytomous") logistic regression using R and have made great progress using multinom() from the nnet library. My response variable has three categories, and there are two different possible predictors. I'd like to use the likelihoods of certain models (ie, saturated, fitteds, and null) to calculate Nagelkerke R-squared values for
2009 Jun 13
1
Insignificant variable improves AIC (multinom)?
Hi, I am trying to specify a multinomial logit model using the multinom function from the nnet package. Now I add another independent variable and it halves the AIC as given by summary(multinom()). But when I call Anova(multinom()) from the car package, it tells me that this added variable is insignificant (Pr(>Chisq)=0.39). Thus, the improved AIC suggests to keep the variable but the Anova
2005 Nov 17
1
access standard errors from multinom model
Dear R users, I'm using a multinomial LOGIT model to analyse choice behaviour of consumers (as part of my masters thesis research). Using the R documentation and search on the R website I have a working script now. Parameters are estimated and I can access them via coefficients(multinom.out). In order to see if the parameters are significant I like to access the standard errors in the
2011 Jan 28
6
R-/Text-editor for Windows?
Tinn-R (http://www.sciviews.org/Tinn-R/) is one of the topmost suggestions when googling an R-(text-)editor for Windows. However, to me it appears dissappointing that Tinn-R does not handle utf-8 (mac-roman, or any other) encoded R-scripts or, in general, text files. Besides Emacs and the R built-in editor, could you recommend a good editor for Windows, even some commmercial for a small
2004 Sep 27
1
multinom object :way of plotting??
Dear all, I'm fitting a multinom function to my dataset (multinom(outcome~age+K+D)) and I need to present my results on a poster. Does someone know a nice way of doing that? I think I saw in an archive that you cannot plot a multinom.object, is it true? Thank you by advance for your help, Cheers Camille
2011 Mar 04
3
S. function calculating x +- y
Hello, I am looking for an elegant one-liner for the following operation: x <- rnorm(10) y <- runif(10) c(mean(x)-mean(y), mean(x)+mean(y)) I thought about apply(data.frame(x, y), 2, mean) but I don't know how to apply the +- operation on the result of apply. Thanks, *S* -- Sascha Vieweg, saschaview at gmail.com
2010 Mar 17
1
question about multinom function (nnet)
Dear All. I have the following table that I want to analyze using multinom function freq segments sample 4271 Seg1 tumour 4311 Seg2 tumour 3515 Seg1 normal 3561 Seg2 normal I want to compare model with both factors to the one where only sample is present. model1=multinom(freq~segments+sample,data=table) model2=multinom(freq~ sample,data=table)
2012 Aug 15
2
sample() from (un-)sorted vectors
Hello, Vector y is an alphabetically sorted version of vector x. Will both samples, X and Y, be "absolutely" random or will they have systematic differences? And: Should I sort or shuffle a vector before sampling? Thank you, *S* x <- as.factor(LETTERS[sequence(10:1)]) y <- sort(x) X <- sample(x, 5) Y <- sample(y, 5) -- Sascha Vieweg, saschaview at gmail.com
2011 Feb 13
6
From numeric vector to string vector
Hi there, I have a numeric vector let say: Vect <- c(12.234, 234.5675, 1.5) Now I want a string vector like: changedVec <- c("012.234", "234.568", "001.500") Would be grateful if somebody help me how can I do that. Thanks and regards, [[alternative HTML version deleted]]
2011 Nov 18
3
Apply functions along "layers" of a data matrix
Hello How can I apply functions along "layers" of a data matrix? Example: daf <- data.frame( 'id' = rep(1:5, 3), matrix(1:60, nrow=15, dimnames=list( NULL, paste('v', 1:4, sep='') )), rep = rep(1:3, each=5) ) The data frame "daf" contains 3 repetitions/layers (rep) of 4 variables of 5 persons (id). For some reason, I want to calculate
2001 Dec 12
2
Output from the multinom-function
Hello folks, Let me first apologize: I'm not a professional nor a mathematician, just an ordinary guy, fooling around with the excellent R-package. I know the basic principles behind statistics, but haven't read anything more advanced than the ordinary first probability and statistics courses. Enough disclaimers? Good! I was examining the multinom-function (in the nnet-package) the other
2004 May 17
1
residuals in multinom
Hi, is there a possibility to calculate the different "types" of residuals directly using the multinom function from MASS as it is possible for the functions gam, glm using type="deviance" or "working" or "pearson" or "response"? I tried it but got always the "response" type, I guess. thanx Matthias
2003 Nov 13
1
what does this multinom error mean?
I have RedHat linux 9 with R 1.8. I'm estimating models with multinom with a dependent variable that has 3 different values. Sometimes the models run fine and I can understand the results. Sometimes when I put in another variable, I see an indication that the estimation did work, but then I can't get the summary method to work. It's like this: > votemn1 <-