Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Plotting survival curves after multiple imputation


From   Robert Long <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Plotting survival curves after multiple imputation
Date   Wed, 20 Feb 2013 09:46:45 +0000

I have attempted to solve this using the following code, which is reproducible, but relies on the -ice- and -mim- commands

webuse drugtr, clear

* create some missing value
foreach i in 5 10 15 20 25 30 35 40 45 {
	replace age = . in `i'
}

mi set wide
mi register impute age

ice age studytime died drug, m(5) saving(drugtr_imp, replace)

use drugtr_imp.dta, clear

* no problem obtaining pooled estimates, and here I use the storebv option
* in an attempt to give -stcurve- what it needs
mim , storebv: stcox  age drug

* but it doesn't work:
stcurve, survival at1(drug=0) at2(drug=1)

The error is
last estimates not found
r(301);

This error seems to be produced in -stcurve- which is looking for e(cmd2) to be set to "stcox", but e(cmd2) is not set at all - e(cmd) is set to "stcox". However, running stcox normally (ie without -mim- ) , e(cmd2) /is/ set to "stcox"..

Can anyone help ?

Thanks
Robert Long



-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Robert Long
Sent: 15 February 2013 11:55
To: '[email protected]'
Subject: st: Plotting survival curves after multiple imputation

Hello Statalist

This sounds like something very simple, or at least it should be something that is commonly required, but so far I haven't found an answer.

I want to use multiple imputation for missing covariate data. No problems with that.

Having obtained m different datasets, I want to run cox regressions, obtaining pooled results. No problems with that.

But I also want to plot a "pooled" survival curve for different levels of a covariate.

How do I obtain such plots ?

Thanks
Robert Long


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index