[R] Logistic regression with more than two choices

From: Ville Koskinen <ville.koskinen_at_matrex.fi>
Date: Wed 15 Jun 2005 - 02:22:56 EST

Dear all R-users,

I am a new user of R and I am trying to build a discrete choice model (with more than two alternatives A, B, C and D) using logistic regression. I have data that describes the observed choice probabilities and some background information. An example below describes the data:

Sex	Age	pr(A)	pr(B)	pr(C)	pr(D) ...
1	11	0.5	0.5 	0	0
1	40	1	0	0	0
0	34	0	0	0	1
0	64	0.1	0.5	0.2	0.2


I have been able to model a case with only two alternatives "A" and "not A" by using glm().

I do not know what functions are available to estimate such a model with more than two alternatives. Multinom() is one possibility, but it only allows the use of binary 0/1-data instead of observed probabilities. Did I understand this correctly?

Additionally, I am willing to use different independent variables for the different alternatives in the model. Formally, I mean that: Pr(A)=exp(uA)/(exp(uA)+exp(uB)+exp(uC)+exp(uD) Pr(B)=exp(uB)/(exp(uA)+exp(uB)+exp(uC)+exp(uD)

where uA, uB, uC and uD are linear functions with different independent variables, e.g. uA=alpha_A1*Age, uB=alpha_B1*Sex.

Do you know how to estimate this type of models in R?

Best regards, Ville Koskinen

R-help@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 Received on Wed Jun 15 02:25:58 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:36 EST