search for: multinom

Displaying 20 results from an estimated 59 matches for "multinom".

2005 Apr 13
5
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 script: library(MASS) library(nnet)...
2000 Mar 20
3
: multinom()
Dear R users, Does anyone know if it is possible to use multinom to do a polychotomous fit using one categorical and one numeric variable as response. The doc. for multinom states that for formula , response can be K>2 classes. Is this 2 and more, or as I have understood it only greater than 2. I have tried fitting my data, but have only encountered error me...
2011 Apr 08
3
multinom() residual deviance
Running a binary logit model on the data df <- data.frame(y=sample(letters[1:3], 100, repl=T), x=rnorm(100)) reveals some residual deviance: summary(glm(y ~ ., data=df, family=binomial("logit"))) However, running a multinomial model on that data (multinom, nnet) reveals a residual deviance: summary(multinom(y ~ ., data=df)) On page 203, the MASS book says that "here the deviance is comparing with the model that correctly predicts each person, not the multinomial response for each cell of the mininal model&qu...
2005 May 13
3
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...
2004 Oct 28
1
polr versus multinom
Hi, I am searching for methods to compare regression models with an ordered categorical response variable (polr versus multinom). The pattern of predictions of both methods (using the same predictor variables) is quite different and the AIC is smaller for the multinom approach. I guess polr has more strict premises for the structure of the response variable, which methods can be used to test for these premises. If the AIC i...
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...
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 a...
2008 Aug 11
1
checking if multinom converged
Is anyone aware of a way to check whether multinom has converged by checking a component of the output ? I''m not familar with nnet but, since multinom calls nnet , maybe there is an extra argument once can send to multinom to capture this information. Thanks.
2008 May 30
1
existing package (mmlcr) modification -- appropriate process?
...nd would like your help in identifying the appropriate process to follow in order to modify the output from an existing package. I''ve had difficulty finding an answer online, perhaps because I am using incorrect terminology. A package that I am using (mmlcr) invokes another package (multinom). An output of multinom is the standard errors, but this output is not provided within mmlcr. I would like to obtain the standard errors as an output of mmlcr. For your reference, this is relevant code that I identified in mmlcr, using getAnywhere{mmlcrfit.multinomlong}: function (object,...
2008 Dec 19
0
"parm" argument in confint.multinom () nnet package
Dear R users, The nnet package includes the multinom method for the confint function. The R Help file (?confint) for the generic function in the stats package and the help files for the glm and nls methods in the MASS package indicate that one can use the "parm" argument as "a specification of which parameters are to be given confi...
2004 May 07
3
scores from multinomial logistic regression
Dear all, I''m interested in extracting the score from multinomial logistic regression models fit using multinom, to assess the stregth of assocation of the parameter with the response (akin to the score from clogit/cox regression). currently I''m using R 1.8.1. Is there a function that will extract the score from a multinom object or how i can get...
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 **********************************************...
2005 May 09
1
formula restriction in multinom?
Good Day: When I used: multinom(formula = Y ~ X1 + X2 + X3 + X1:X2 + X1:X3 + X3:X2 + X1^2 + X2^2 + X3^2, data = DATASET), I get estimates and AIC for the model containing main effects and interactions only (no squared terms)...and FYI, all predictors are continuous. Is this "normal" behavior? If I run this in S-Plus I g...
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...
2007 Mar 25
2
resolving expand.grid & NA errors
I am hoping for some advice regarding resolving error messages I have received when trying to use the expand.grid command. library(nnet) library(MASS) library(car) mod.multacute <-multinom(kc$group ~ kc$in.acute.danger * kc$violent.convictions, na.rm=T) summary(mod.multacute, cor=F, Wald=T) Anova (mod.multacute) confint (mod.multacute) > predictors <- expand.grid(group=1:3, in.acute.danger = c("y","n"), violent.convictions = c("y","n"...
2003 Aug 01
1
behavior of weights in nnet''s multinom()
I see that "case weights" can be optioned in multinom(). I wanted to make sure I understand what weights= is expecting. My weights (not really mine but I''m stuck with them) are noninteger, are not scaled to sum to the sample size, and larger weights are intended to increase influence. The description of various types of weights is a per...
2003 Nov 19
0
multinom question
I''d like to fit a multinomial log-linear model for 4 categories of the form log[(P(D=i | X)/P(D=0 | X)] = alpha_i + X beta_i ; i=1,2,3 but with beta_1 constrained to zero. Is there a way to impose such a constraint in the multinom function? Brad ------------------------------------------------------------------------...
2007 Jan 05
1
Efficient multinom probs
Dear R-helpers, I need to compute probabilties of multinomial observations, eg by doing the following: y=sample(1:3,15,1) prob=matrix(runif(45),15) prob=prob/rowSums(prob) diag(prob[,y]) However, my question is whether this is the most efficient way to do this. In the call prob[,y] a whole matrix is computed which seems a bit of a waste. Is there m...
2004 Nov 02
0
Confident intervals in multinom
Dear R help list, i''m using multinom (nnet), the results given to me is the coefficients and std errors. Is there a way to obtain directly (or in an export to latex) the odd-ratio (exp(B)) and it''s confident intervals. thanks very much for your help Pierre-Henry Miquel Universit?? de Lille 2 (M??decine) France Vou...
2009 Feb 24
0
multinom() and multinomial() interpretation
Hello and thanks in advance for any advice. I am not clear how, in practice, the multinom() function in nnet and the multinomial() function in VGAM differ in terms of interpretation. I understand that they are fit differently. Are there certain scenarios where one is more appropriate than the other? In my case I have a dependent variable with 4 categories and 1 binary and 4 continuou...