Dear Edlira
Since you have used indicator variables in the cox model by using xi:
command
you should also use them in plotting as follows.
stcurve, hazard /*
*/ at1(_Ioccup_2=1) /*
*/ at2(_Ioccup_3=1) /*
*/ at3(_Ioccup_4=1) /*
*/ at4(_Ioccup_4=1)/*
*/ at5(_Ioccup_5=1) /*
*/ at6(_Ioccup_5=1) /*
*/ at7(_Ioccup_6=1)
Regards
Anthony
----- Original Message -----
From: <[email protected]>
To: <[email protected]>
Sent: Monday, February 24, 2003 1:32 PM
Subject: st: stcurve - help
Hello
I am running a model with a few categorical variables eg; sex, marital
status or occupation:
xi: streg i.sex i.marstat i.occup, dist(gompertz) robust hr
After the estimation I would like to generate curves for each variable.
Eg a graph where I show the hazard for males and females
Or a graph for the occupational categories. Here is what I am doing:
stcurve, hazard /*
*/ at1(occup=1) /*
*/ at2(occup=2) /*
*/ at3(occup=3) /*
*/ at4(occup=4)/*
*/ at5(occup=5) /*
*/ at6(occup=6) /*
*/ at7(occup=7)
For some reason it does not work. The error message that I get is:
at( ) variable occup not in the estimated model
Do you know what I am doing wrong and how I can correct it?
Thank you in advance
Best
Edlira
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/