I am trying to do a nested logit where I am predicting medication prescribed to bipolar patients. There are three levels of nesting:
At the top level there are two types of medication: Type A and Type B.
At the middle level , two types of medications are nested within TypeB: Category M and Category T.
At the bottom level, there are Five medications: Med1, Med 2, Med3, Med4, Med5. Med1 and Med2 are nested within categoryM. Med3 and med4 are nested within categoryT . Med5 is nested within TypeB
All of my independent variables are chooser specific: age, male (0/1), etc.
The data are set up so that the dependent variable decision has 5 values for each person - one of the rows has a 1 and the other four rows have 0.
The original med variable has values: 1,2,3,4,5. I create two new variables for the top and middle levels:
nlogitgen top=leaf(typea:1|2|3|4 ,typeB:5)
nlogitgen middle= leaf(catM:1|2, catT:3|4, catX:5)
Here is one model:
nlogit decision || mslevel: || adlevel: || leaf: age, ///
base(5) noconstant case(personid)
These are the results:
decision coef std err
med1
age -.0322478 .007972 -4.05 0.000 -.0478727 -.016623
med2
age -.0022994 .0042604 -0.54 0.589 -.0106496 .0060509
med3
age -.034619 .0074059 -4.67 0.000 -.0491342 -.0201038
med4
age -.0013947 .0039138 -0.36 0.722 -.0090656 .0062762
med5 age (base)
My problem is that I want to know how age effects the choices at each level, not just the bottom level. However, STATA will not allow me to put age at different levels. I want the following :
ne set of coefficients for med 1 vs. med2
one set of coefficients for med3 vs. med4
one set of coefficients for categoryM vs. categoryT
one set of coefficients for TypeA versus TypeB
Can someone help me set this up or send me a link that will help?
Thanks, Lee
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/