Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: plotting model results (re-posted, due to email format problem)


From   Michael McCulloch <[email protected]>
To   Statalist <[email protected]>
Subject   st: plotting model results (re-posted, due to email format problem)
Date   Fri, 1 Jun 2007 07:15:06 -0700

Dear Statalist members,
I wish to plot the results of hazard ratios comparing the effect of dropping predictor variables one at a time from the full model. I have saved these estimates using -parmby-, and exported them to a dataset. Using the command

. sort estimate
. list idnum ids estimate if parmseq==1, clean noobs

I have the following data points:
idnum idstr estimate
6 Smoking 0.65
3 Age 0.65
7 Surgery 0.68
2 Full 0.68
5 Race 0.68
8 Rad 0.68
9 Chemo 0.68
4 Sex 0.75
1 Unadj 0.77

My goal is to plot the results with the HR from the "Full" model on the far left, with the remaining HRs off to the right in ascending order. The following code gets me close to what I want.

. sort estimate
. twoway scatter estimate idnum if parmseq==1 & ids!="Unadj", mlabel(ids) mlabposition(12)

Can anybody suggest how I can force "Full" to the far left, while having the remaining data points to the right, in ascending sort order?

Thank you,
Michael McCulloch

*
* 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/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index