Date: Thu, 23 Oct 2008 21:15:13 -0400
Reply-To: Lee Panas <lpanas@BRANDEIS.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lee Panas <lpanas@BRANDEIS.EDU>
Subject: Re: nested logit
In-Reply-To: <2031433587.1671911224810799237.JavaMail.root@zimbra-store-4.unet.brandeis.edu>
Content-Type: text/plain; charset=utf-8
Sandra,
I received your comments. Thank you. I still can not put the same independent variable on two different alternatives. Maybe, this can not be done in MDC.
I don't know about decision probability. Can you output the residuals and then use proc plot?
Lee
----- Original Message -----
From: "sandra vergara cardozo" <sa_vergara@hotmail.com>
To: lpanas@brandeis.edu
Cc: sas-l@listserv.uga.edu
Sent: Thursday, October 23, 2008 7:45:08 PM GMT -05:00 US/Canada Eastern
Subject: RE: nested logit
Lee:
I was writting for you.
Do you receb my comments? .
I was sending one idea for you problem.
I was working about that, and you said of residuals, I believe that is decision probability. I'm thinking about that. How can I graphic of decision probabillity?
Thanks,
Sandra Vergara
> Date: Thu, 23 Oct 2008 16:13:46 -0400
> From: lpanas@brandeis.edu
> To: sa_vergara@HOTMAIL.COM
> CC: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: nested logit
>
> Sandra, Thanks for your response. I also get red instead of blue on the utility statement. I don't think that means anything. Sometimes that happens with new procedures.
>
> Lee
>
> ----- Original Message -----
> From: "sandra vergara cardozo" <sa_vergara@HOTMAIL.COM>
> To: SAS-L@LISTSERV.UGA.EDU
> Sent: Thursday, October 23, 2008 3:11:15 PM GMT -05:00 US/Canada Eastern
> Subject: Re: nested logit
>
> Lee, When you running of program MDC, of the words utility appear red? or blue? In my case, appear red? It´s wrong? Thanks> Date: Mon, 20 Oct 2008 19:42:46 -0200> From: scardozo@ESALQ.USP.BR> Subject: [Fwd: nested logit.]> To: SAS-L@LISTSERV.UGA.EDU> > Lee:> > You need writte:> First:> need writting of same name os variables (5):> personid =tacl1> decision =tacl2> topmode=tacl3> midmode = tacl4> mode = tacl5> > What is the variable Choice? male depression> > > data newdata1(keep=pid decision mode tacl);> set owl1;> array tvec{5} tacl1 - tacl5;> retain pid 0;> pid + 1;> do i = 1 to 5;> mode = i;> tacl = tvec{i};> decision = ( choice = i );> output;> end;> run;> > proc mdc data=newdata1;> model decision = tacl / type=nlogit choice=(mode 1 2 3 4 5 )> id pid;> utility u(1,) = tacl;> nest level(1) = (1 2 @ 1, 3 4 @ 2, 5 @ 3),> level(2) = (1 2 @ 1, 3 @ 2);> output out= owl1GL p= pdec1GL;> run;> > > data saida1; merge owl1GL;> e = tacln - pdec1GL;> proc print data=saida1;> run;> > And you can export of residuals for excel.> > I hope help you.> > Sandra> > --------------------------- Mensagem Original ----------------------------> Assunto: nested logit.> De: "Lee Panas" <lpanas@BRANDEIS.EDU>> Data: Seg, Outubro 20, 2008 14:41> Para: SAS-L@LISTSERV.UGA.EDU> --------------------------------------------------------------------------> > Hi, I am trying to use PROC MDC for a nested logit. My study involves a> group of people with bipolar disorder. I am trying to predict drug> prescribed based on patient characteristics (age, gender,etc) and clinical> status (depression, mania, etc.). All independent variables are individual> specific.> > At the bottom level, there are 5 choices for drugs: 1, 2, 3, 4, 5. The> drugs are nested as follows: At mid level, there are three drug types: A> (1,2), B (3,4), C (5). At the top level, there are two classes: X (A,B),> Y (C).> > Here is part of my data set:> > personid decision topmode midmode mode male depression> 1 0 1 1 1 1 0> 1 1 1 1 2 1 0> 1 0 1 2 3 1 0> 1 0 1 2 4 1 0> 1 0 2 3 5 1 0> 2 1 1 1 1 0 1> 2 0 1 1 2 0 1> 2 0 1 2 3 0 1> 2 0 1 2 4 0 1> 2 0 2 3 5 0 1> > My problem is that it seems as if each indep variable can only occur once at> each level. If they appear more than once, then SAS gives a parameter> estimate but no standard error on the second occurrence. Is there any way> to get SAS to print standard errors each time? Here is an example of my> SAS code:> > proc mdc> model decision=male depression/type=nlogit choice=(mode 1 2 3 4 5);> id personid;> utility u(1, 1 2) = male depression> u(1, 3 4) = male depression> u(2, 1 2) = male depression> ;> > nest level(1)= (1 2 @ 1, 3 4 @ 2, 5 @ 3)> level(2)= (1 2 @ 1, 3 @ 2);> > Output:> > Parameter Estimate std err> > male_L1G1 -1.41 missing> depression_L1G1 2.61 3.89> male_L1G2 -1.31 1.56> depression_L1G2 2.48 missing> male_L2G1 2.02 5.94> depression_L2G1 -3.96 11.19> > Is there any way to get SAS to compute standard errors in the cases above> where it is missing?> > Thanks,> > Lee> > > Sandra Vergara Cardozo> Doutoranda em Estatística> ESALQ/USP> Tel: (19)3429-4144> Ramal:233/235
>
> Express yourself instantly with MSN Messenger! MSN Messenger
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Express yourself instantly with MSN Messenger! MSN Messenger
Express yourself instantly with MSN Messenger! MSN Messenger
|