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: margins after stcox with time-dependent covariate


From   [email protected]
To   [email protected]
Subject   st: margins after stcox with time-dependent covariate
Date   Thu, 28 Feb 2013 19:40:22 +0100

Dear list members,

I use Stata/IC 12.1 for Windows (32 bit).
I ask if the margins command may be used after stcox with three fixed
covariates (gender, Y Z) and only one time-varying covariate. In
particular, I used stsplit to handle the time-varying covariate, a X
tratment in the course of follow-up and time_X is the wait time for the X
treatment: some subjects may also never have the X treatment. I use the
following code:

gen wait = time_X
replace wait =0 if wait==.
stsplit, at(failures)
generate postX = wait<_t & wait!=0
stjoin
stcox postX##gender Y Z

I ask if thereafter it is possible to use the margins command to estimates
margins of responses for specified values of covariates.

Thanks for your consideration

------------------
Mario Petretta
Department of Translational Medical Sciences
Naples University Federico II
Italy




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