Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: count data & cttost


From   [email protected]
To   [email protected]
Subject   st: count data & cttost
Date   Thu, 27 May 2004 8:02:27 PDT

Hi,

I have count-time survival data that contains the time variable to event, 
the number of 
failures at each time, and then a number of variables that describe the
various ways in 
which a subject can be censored.  For example: 

suvival_time	n_dead		n_censor_1	n_censor_2	n_censor_3
3		2		1		3		0
5		0		3		0		1

The ctset syntax does not appear to permit a varlist for ncensor, so I
create a new 
variable n_censor, followed by ctset & cttost:

egen n_censor = rsum(n_censor_1 n_censor_2 n_censor_3)
ctset survival_time n_dead n_censor
cttost, clear
list

+--------------------------------------------------------------------------
----+
surviv~e   n_dead   n_cens~1   n_cens~2   n_cens~3   w   _st   _d   _t   _t0 
---------------------------------------------------------------------------
---
1.         3        0          1          3          0   4     1    0    3     0 
2.         5        0          3          0          1   4     1    0    5     0 
3.         3        1          1          3          0   2     1    1    3     0 
+--------------------------------------------------------------------------
----+

1 - Why has cttost dropped the variable n_censor?

2 � One unintended consequence of this process is that I have treated the 
censoring 
variables as enduring group variables.  And thus they have been expanded
by the cttost.  
This problem is even worse when I expand on w in order to use stci.  I
would like to later 
perform analyses on censoring by group.  Should I partition the data,
have one data set 
for survival and another for censoring analyses?  Or should I merge back
censoring 
information to the first observation per each unit of time?  Or finally
is there a way of 
correctly incorporating the censoring values?

Thank you so much for your help. 

Douglas Crawford
Ph.D. Candidate, Dept. of Biochemistry
UCSF


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