[R] Logistic regression with more than two choices

Ville Koskinen ville.koskinen at matrex.fi
Tue Jun 14 18:22:56 CEST 2005


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




More information about the R-help mailing list