Date: Fri, 9 Jan 2009 04:45:49 0800
ReplyTo: Oliver.Kuss@MEDIZIN.UNIHALLE.DE
Sender: "SAS(r) Discussion" <SASL@LISTSERV.UGA.EDU>
From: Oliver.Kuss@MEDIZIN.UNIHALLE.DE
Organization: http://groups.google.com
Subject: Re: proc nlmixed for multinomial logit with random effects
ContentType: text/plain; charset=ISO88591
On 8 Jan., 19:59, osbur...@BLS.GOV (Jane Osburn) wrote:
> I want to use proc nlmixed in the following problem so that I can later
> include other components in the likelihood. I am trying to estimate a
> multinomial logit with random effects similar to the one below, (Dale
> McLerrin helped that person) except I do not want to expand the dataset to
> include a separate observation for every level one unit, because it would
> make the dataset too large. I would instead like to have my likelihood
> include n, the numbers of workers in occ1, occ2, or occ3 ;
>
> if occ = 1 then then loglike= n* log(prob1); else
> if occ = 2 then then loglike= n* log(prob2); else
> if occ = 3 then then loglike= n* log(prob3);
>
> proc nlmixed data=cars;
> parms b1_1=0 b2_1=0 b3_1=0
> b1_2=0 b2_2=0 b3_2=0
> sig11=0.10 sig12=0.05 sig22=0.10;
> prob1 = exp(b1_1 + gamma1 + b2_1*age + b3_1*gender) /
> (1 + exp(b1_1 + gamma1 + b2_1*age + b3_1*gender)
> + exp(b1_2 + gamma2 + b2_2*age + b3_2*gender));
> prob2 = exp(b1_2 + gamma2 + b2_2*age + b3_2*gender) /
> (1 + exp(b1_1 + gamma1 + b2_1*age + b3_1*gender)
> + exp(b1_2 + gamma2 + b2_2*age + b3_2*gender));
> prob3 = 1 /
> (1 + exp(b1_1 + gamma1 + b2_1*age + b3_1*gender)
> + exp(b1_2 + gamma2 + b2_2*age + b3_2*gender));
>
> if manufact='American' then loglike=log(prob1); else
> if manufact='Asian' then loglike=log(prob2); else
> if manufact='European' then loglike=log(prob3);
>
> model manufact ~ general(loglike);
> random b1 b2 ~ normal([0,0], [sig11, sig12, sig22]) subject=family;
> run;
>
> Thanks in advance for any help.
>
> Jane Osburn
> Bureau of Labor Statistics
> 202 6916504
Dear Jane,
sorry for the selfpromotion, but together with Dale I wrote a paper
on the topic (Kuss O, McLerran D. A note on the estimation of the
multinomial logistic model with correlated responses in SAS. Comput
Methods Programs Biomed. 2007 Sep;87(3):2629.) which hopefully would
answer most of your questions on the model you have.
I would be happy to send you the paper if you have no direct access.
Hope that helps,
Oliver
and
