[R] Weighted multinomial logistic regression using the mlogit package

Freiman, Michael mfreiman at wharton.upenn.edu
Thu May 7 18:03:49 CEST 2009


    I have been trying to use the mlogit package to do a multinomial logistic regression, including both alternative-specific and individual-specific variables. I used the mlogit.data function to turn my dataframe into the correct format for the mlogit function, and have been able to run the regression. However, I would like to weight the different cases differently. (Just to clarify, it's not the alternatives I want to weight differently; it's the individual instances in which a choice has to be made.) I have used the following line of code:

ML2<-mlogit(choice~var1+var2+var3+var5,data=M,weights="weights")

Here, M is the dataframe in the appropriate format; var1, var2, var3 and var5 are predictors (alternative-specific) that are columns of M; and weights is another column of M. This line works too, but it gives me the same answer as when the weights were omitted, which seems to indicate that the weights aren't properly being taken into account. Any suggestions?

Michael Freiman




More information about the R-help mailing list