Skip to content

Modeling problem with Multinomial Logit

2 messages · Werner Wernersen, David Barron

#
Hi,

I have a problem modeling a multinomial regression.
This is the tentative function:
multinom(resp ~ age + sex + ... +
I(log(wage)),data=work)

resp is a factor with 4 levels.
My problem is that the variable wage should only go
into the equation for 
certain levels of resp and should be zero for the
others.

I would be very grateful if somebody could tell me how
I can model this in R.

Thanks a million,
   Werner
#
Do you mean something like this (assuming that it is levels 1 and 2
that should be zero):

resp <- factor(sample(1:4,100,replace=TRUE))
wage <- rnorm(100,100,5)

new.wage <- ifelse(resp==1|resp==2,0,log(wage))
multinom(resp ~ new.wage)
On 10/12/06, Werner Wernersen <pensterfuzzer at yahoo.de> wrote: