Bob Green
2006-Sep-10 20:24 UTC
[R] formatting data to be analysed using multinomial logistic regression (nnet)
I am looking into using the multinomial logistic regression option in the nnet library and have two questions about formatting the data. 1. Can data be analysed in the following format or does it need to be transformed into count data, such as the housing data in MASS? Id Crime paranoia hallucinate toc disorg crimhist age 1 2 1 0 1 0 1 25 2 2 0 1 1 1 1 37 3 1 1 0 1 1 0 42 4 3 0 0 0 0 1 25 5 2 1 0 1 0 0 49 2. Can a ratio variable such as $age be included into a model, such as the one below? crimepred <- glm (crime ~ paranoia + hallucinate + toc + crimhist, family = poisson, data = mht ) Any assistance with the above is appreciated, regards Bob Green
sun
2006-Sep-13 08:38 UTC
[R] formatting data to be analysed using multinomial logistic regression (nnet)
bump. would like to know the answer too. I am about using nnet--multinom to estimate a multinomial logit model, but are not sure if this function handles categorical data input. Thanks for any help. ----- Original Message ----- From: "Bob Green" <bgreen at dyson.brisnet.org.au> To: <r-help at stat.math.ethz.ch> Sent: Sunday, September 10, 2006 10:24 PM Subject: [R] formatting data to be analysed using multinomial logistic regression (nnet)> > > I am looking into using the multinomial logistic regression option in the > nnet library and have two questions about formatting the data. > > 1. Can data be analysed in the following format or does it need to be > transformed into count data, such as the housing data in MASS? > > Id Crime paranoia hallucinate toc disorg crimhist age > 1 2 1 0 1 0 1 25 > 2 2 0 1 1 1 1 37 > 3 1 1 0 1 1 0 42 > 4 3 0 0 0 0 1 25 > 5 2 1 0 1 0 0 49 > > > 2. Can a ratio variable such as $age be included into a model, such as > the one below? > > > crimepred <- glm (crime ~ paranoia + hallucinate + toc + crimhist, > family > = poisson, data = mht ) > > > Any assistance with the above is appreciated, > > > regards > > Bob Green > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Hi, I 'd like to use multinom to estimate a multinomial logit model of a conjoint survey with a format like: individual 1 ------choice ------ X1-----X2-----X3 1-----------------A------------1.2----blue----12 1-----------------0-------------1.4----red-----13 1-----------------B------------3.1----green---17 1-----------------0-------------4.2----red-----14 ...... 2----------------C------------2.1-----blue----11 ....... 0 means this alternative did not be chosen. choice set size is 2 for each choice. As I know at this moment, multinom deal with count data format (iris data). Anybody knows if multinom can take this format as input? Thanks.