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]

RE: st: RE: -cloglog- memory & -stcurve- median


From   "Muhuri, Pradip (SAMHSA/CBHSQ)" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: RE: -cloglog- memory & -stcurve- median
Date   Mon, 12 Aug 2013 03:43:53 +0000

Hello,

I wanted to thank Professor S. Jenkins for his comment on my recent message. Based on his comments, I have revised the models.  I am now confirming that  non-parametric baseline hazard models in the -cloglog- and continuous time Cox models in the -stcox- provide exp(b)'s  that are similar.  The output is not shown here.

Question 1: Does the -svy:cloglog- command allow the log likelihood (ll) option? If yes, where would I add that?

Question 2: Are the following episode-splitting and construction of "attained age" and the duration variables correct? 

Please review only if your time allows. I would appreciate receiving your comments.

Thanks,

Pradip

#### I have tweaked Professor S.P. Jenkins' code to construct attained age and duration  variables for my analysis. The code and the results (for 3 scenarios) are shown below. 


//Part of the Stata code begins here

expand survtime_q

compress

bysort id: ge j= _n
lab var j "spell quarter"

//convert j into years
gen survtime_y = j/4

bysort id: ge dead= mortstat==1 & _n==_N
lab var dead "binary dep var for discrete hazard model"
drop mortstat

//create lag for j (duration: quarter-year) & cumulate j and then express in years by id
bysort id: ge cum_j=j[_n-1]

replace cum_j = 1 if yq_int==yq_dox 

gen cum_stime_yrs = cum_j/4


//calculate attained age by adding the cumulated survival time with age at interview by id

bysort id: ge att_age = cum_stime_yrs + age_p
replace att_age = age_p if att_age ==.


//other code for duration variables is omitted


*******************************************************************************************************************************
Scenario 1:The following person, who was 58 years on the day of interview, entered into the study in the second quarter of 2004 and was censored in the last quarter of 2006
The survival-time is 9 quarters or 2.25 years (2004q2 through 2006q4). The person contributed 10 records.  
***********************************************************************************************

   id "20040167390101"

  +---------------------------------------------------------------------------------+
  | yq_int   yq_dox   dead    j         dur_cat   age_p   cum~s   att~e   att_age~p |
  |---------------------------------------------------------------------------------|
  | 2004q2   2006q4      0    1      <=1.50 Yrs      58       .      58   55-64 Yrs |
  | 2004q2   2006q4      0    2      <=1.50 Yrs      58     .25   58.25   55-64 Yrs |
  | 2004q2   2006q4      0    3      <=1.50 Yrs      58      .5    58.5   55-64 Yrs |
  | 2004q2   2006q4      0    4      <=1.50 Yrs      58     .75   58.75   55-64 Yrs |
  | 2004q2   2006q4      0    5      <=1.50 Yrs      58       1      59   55-64 Yrs |
  |---------------------------------------------------------------------------------|
  | 2004q2   2006q4      0    6      <=1.50 Yrs      58    1.25   59.25   55-64 Yrs |
  | 2004q2   2006q4      0    7   1.75-3.00 Yrs      58     1.5    59.5   55-64 Yrs |
  | 2004q2   2006q4      0    8   1.75-3.00 Yrs      58    1.75   59.75   55-64 Yrs |
  | 2004q2   2006q4      0    9   1.75-3.00 Yrs      58       2      60   55-64 Yrs |
  | 2004q2   2006q4      0   10   1.75-3.00 Yrs      58    2.25   60.25   55-64 Yrs |
  +---------------------------------------------------------------------------------+


yq_int -> quater/year of interview
yq_dox -> date of exit (dead/censored)
j= spell quarter
cum~s= cumulated j divided by 4; for the first.id cum~s=.
dead -> 0=censored; 1=died
age_p -> age at interview
att~e -> attained age



***********************************************************************************************
Scenario 2:The following person, who was 73 years on the day of interview, entered into the study in the second quarter of 1997 and died in the first quarter of 2001
The survival-time is 14 quarters or 2.25 years (2004q2 through 2006q4).The person contributed 15 records.  
***********************************************************************************************

  id "19970286710102"

  +-----------------------------------------------------------------------------------+
  | yq_int   yq_dox   dead    j         dur_cat   age_p   cum~s   att~e   att_age_grp |
  |-----------------------------------------------------------------------------------|
  | 1997q2   2001q1      0    1      <=1.50 Yrs      73       .      73     65-74 Yrs |
  | 1997q2   2001q1      0    2      <=1.50 Yrs      73     .25   73.25     65-74 Yrs |
  | 1997q2   2001q1      0    3      <=1.50 Yrs      73      .5    73.5     65-74 Yrs |
  | 1997q2   2001q1      0    4      <=1.50 Yrs      73     .75   73.75     65-74 Yrs |
  | 1997q2   2001q1      0    5      <=1.50 Yrs      73       1      74     65-74 Yrs |
  |-----------------------------------------------------------------------------------|
  | 1997q2   2001q1      0    6      <=1.50 Yrs      73    1.25   74.25   75 or Older |
  | 1997q2   2001q1      0    7   1.75-3.00 Yrs      73     1.5    74.5   75 or Older |
  | 1997q2   2001q1      0    8   1.75-3.00 Yrs      73    1.75   74.75   75 or Older |
  | 1997q2   2001q1      0    9   1.75-3.00 Yrs      73       2      75   75 or Older |
  | 1997q2   2001q1      0   10   1.75-3.00 Yrs      73    2.25   75.25   75 or Older |
  |-----------------------------------------------------------------------------------|
  | 1997q2   2001q1      0   11   1.75-3.00 Yrs      73     2.5    75.5   75 or Older |
  | 1997q2   2001q1      0   12   1.75-3.00 Yrs      73    2.75   75.75   75 or Older |
  | 1997q2   2001q1      0   13   3.25-5.00 Yrs      73       3      76   75 or Older |
  | 1997q2   2001q1      0   14   3.25-5.00 Yrs      73    3.25   76.25   75 or Older |
  | 1997q2   2001q1      1   15   3.25-5.00 Yrs      73     3.5    76.5   75 or Older |
  +-----------------------------------------------------------------------------------+


***********************************************************************************************
Scenario 3:The following person, who was 85 years on the day of interview, entered into the study in the first quarter of 1997 and died in the same quarter of 1997
The survival-time is 1 quarter or .25 years. The person only contributed 1 record.  
***********************************************************************************************

id "19970305650101"
  +-------------------------------------------------------------------------------+
  | yq_int   yq_dox   dead   j      dur_cat   age_p   cum~s   att~e   att_age_grp |
  |-------------------------------------------------------------------------------|
  | 1997q1   1997q1      1   1   <=1.50 Yrs      85     .25   85.25   75 or Older |
  +-------------------------------------------------------------


                                                                            }

Pradip K. Muhuri, PhD
SAMHSA/CBHSQ
1 Choke Cherry Road, Room 2-1071
Rockville, MD 20857
Tel: 240-276-1070
Fax: 240-276-1260

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: Thursday, August 08, 2013 11:12 AM
To: [email protected]
Subject: RE: st: RE: -cloglog- memory & -stcurve- median 

------------------------------

Date: Thu, 8 Aug 2013 01:22:56 +0000
From: "Muhuri, Pradip (SAMHSA/CBHSQ)" <[email protected]>
Subject: RE: st: RE: -cloglog-  memory & -stcurve- median : was -svy stocx- attained age - issues with posting

Hello Statalist,

The issue is that -svy:cloglog- provides exp(b)'s that are very different from the corresponding results of the -svy:stcox- for the same exact model, which I have estimated.

The dependent variable, here, is all-cause death (1997-2004 NHIS-NDI Linked Mortality Files - adults' survival status  followed up through December 31, 2006). NHIS=National Health Interview Survey, the United States; NDI=National Death Index.



Output from -svy:stcox -, with attained age as the time scale
- ---------------------------------------
                Variable |     m1      
- -------------------------+-------------
                  Female |    0.59***  
    Serious Psy Distress |    1.47***  
          Current Smoker |    2.09***  
           Former Smoker |    1.29***  
                 Div/Sep |    1.40***  
                   Widow |    1.30***  
           Never Married |    1.59***  
                Hispanic |    0.94     
                NH Black |    1.21***  
                NH Other |    0.71***  
             Hi Sch Grad |    0.83***  
            College Grad |    0.63***  
             Underweight |    1.64***  
              Overweight |    0.79***  
                   Obese |    0.87***  
             1 Condition |    1.51***  
           2+ Conditions |    2.58***  
- -------------------------+-------------
                       N |  227925     
- ---------------------------------------
  legend: * p<.05; ** p<.01; *** p<.001



              
Output from -svy:cloglog-
- -----------------------------------------------------------------
                Variable |     m1           m2           m3      
- -------------------------+---------------------------------------
                  Female |    0.54***      0.54***      0.54***  
    Serious Psy Distress |    1.09*        1.09*        1.09     
          Current Smoker |    1.11***      1.11***      1.11***  
           Former Smoker |    1.47***      1.48***      1.47***  
                 Div/Sep |    1.30***      1.31***      1.31***  
                   Widow |    3.74***      3.80***      3.80***  
           Never Married |    0.61***      0.60***      0.60***  
                Hispanic |    0.63***      0.63***      0.63***  
                NH Black |    0.96         0.97         0.97     
                NH Other |    0.54***      0.54***      0.54***  
             Hi Sch Grad |    0.59***      0.59***      0.59***  
            College Grad |    0.42***      0.42***      0.42***  
             Underweight |    1.75***      1.76***      1.76***  
              Overweight |    0.69***      0.69***      0.69***  
                   Obese |    0.57***      0.57***      0.57***  
             1 Condition |    2.78***      2.79***      2.79***  
           2+ Conditions |    6.85***      6.97***      6.98***  
                     lnj |                 1.19***               
                      j2 |                              1.00***  
                Constant |    0.00***      0.00***      0.00***  
- -------------------------+---------------------------------------
                       N | 5249084      5249084      5249084     
- -----------------------------------------------------------------
                            legend: * p<.05; ** p<.01; *** p<.001

 
The -cloglog- models are estimated using the data file that includes person-quarter-year observations. 

Acknowledgements: (http://www.iser.essex.ac.uk/survival-analysis ), and Steve.  Thanks.

The above online source shows that results from -cloglog- models are very similar to the results from parametric survival models. But, as shown in the above tables, my results from -stcox- and -cloglog- models are very different. Should not the results be similar?

Are there any resources available showing comparisons of the same model estimated via -stcox- and -cloglog-? 

Any help toward resolving the issue would be appreciated.

Thanks,

Pradip

=====================================================

In your follow-up message you also stated that " The time from interview to death or censoring ranges from 0 to 39 quarter".  However I see no covariates summarizing duration dependence in your table summary -- apart from perhaps "lnj" in model 2 (log of survival time?) and "j2" (square of survival time) -- but then you don't explain this.

In short, I am unsure that you are comparing like with like. If you look at my survival analysis resources again, it shows examples of a 'non-parametric' baseline hazard in the -cloglog- (discrete time PH model) -- I think you need estimates from that in order to compare with the continuous time Cox model.  (Create dummy/binary indicator variables for each quarter, and use them as covariates, taking appropriate care that there are events within each quarter, and exclude at least one indicator or use the nocons option.)

Whatever you do: if you post to the list again, please also show the precise Stata commands that you issued and not simply edited summaries of output. (Re-read the Statalist FAQ about these issues.)


Stephen
------------------
Stephen P. Jenkins <[email protected]>




Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer

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