# st: Person-period dataset, stcox, subjects in analysis

 From MAY BAYDOUN To statalist@hsphsun2.harvard.edu Subject st: Person-period dataset, stcox, subjects in analysis Date Sun, 17 May 2009 16:33:29 -0700 (PDT)

```Dear Statalisters,

This may be a straightforward question with an obvious answer, but I need your help on it. I have a person-period dataset and I used stset command specifying origin and id as well as failure and exit. This gave me a specific number of failures and number of subjects at risk. I ran stcox using a variable that has missing values for a number of those subjects. I am trying obtain a selection variable so I can look at baseline characteristics of those subjects that were selected for this analysis.
Which of the variables that were generated through the stset command should I be using for this purpose?

stcox x

failure _d:  failuredem == 2
analysis time _t:  (age50dem-origin)
origin:  time origin==1
enter on or after:  time origin2==1
exit on or before:  failuredem==1
id:  id

Iteration 0:   log likelihood = -1697.8111
Iteration 1:   log likelihood = -1696.3502
Iteration 2:   log likelihood = -1696.3477
Refining estimates:
Iteration 0:   log likelihood = -1696.3477

Cox regression -- Breslow method for ties

No. of subjects =      2321                     Number of obs   =     15721
No. of failures =      270
Time at risk    =  52641.86847
LR chi2(1)      =      2.93
Log likelihood  =   -1696.3477                     Prob > chi2     =    0.0871

------------------------------------------------------------------------------
_t | Haz. Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
x|   1.247601    .159471     1.73   0.084     .9711212   1.602796
------------------------------------------------------------------------------

So, basically, I want to be able to describe the 2,321 subjects in that analysis. I did that before, but I can't remember how anymore. Thanks for any help you can provide,

Sincerely,

May

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