Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: margins after stcox with time-dependent covariate

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

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index