0
$\begingroup$

Dear SAS users in the CV community:

I am using the sample data publicly available at:

https://stats.idre.ucla.edu/wp-content/uploads/2016/02/whas500.sas7bdat

The tutorial is found here along with a description of the data set: https://stats.idre.ucla.edu/sas/seminars/sas-survival/

lenfol: length of followup, terminated either by death or censoring. The outcome in this study.
fstat: the censoring variable, loss to followup=0, death=1
age: age at hospitalization
bmi: body mass index
hr: initial heart rate
gender: males=0, females=1

I believe the units of follow-up are days, but for the sake of my question, let's instead assume that the units of follow-up are years. If this were the case, the minimum follow-up time captured by the LENFOL variable is 1 year and the maximum is 2358 years.

My understanding of Cox PH regression is that while the Hazard function may vary over time, the HAZARDRATIO is supposed to remain constant. Please correct me if i am wrong, but this implies that HAZARDRATIO at year =1 is equal to the HAZARDRATIO at year =2358 when estimating the HAZARDRATIO from the entire length of follow-up (2358 years in this study).

If I wanted to estimate the 5-year HAZARDRATIO (ie, assuming the study ended at year=5), could the PHREG procedure return for me the HAZARDRATIO assuming that the length of follow-up ended at year 5 instead of the actual full length of the study (2358 years in this case)? For example, say I wanted to estimate the association between death and gender, I used the following SAS code:

libname ucla "C:\<FILEPATH>";

data ucla_surv;
set ucla.whas500;
run;


proc phreg data=ucla_surv;
model lenfol*fstat(0) = gender/ties=efron;
run;

This results in a HAZARDRATIO (HR) estimate over the entire length of follow-up. Could my code be modified to estimate the 5-year HR as I mentioned above (study artificially ends at year=5)?

Related, would it be appropriate to create a new LENFOL variable that truncates the data at year 5 and execute the model with these new variables as follows:?

data ucla_surv_5yr;
set ucla_surv;

label 
    lenfol5="5-year follow-up"
    fstat5="Event indicator for 5-year FU; 1=death,0=censor"
    ;
if lenfol <5 then do;
fstat5=fstat;
lenfol5=lenfol;
end;
else do;
fstat5=0;
lenfol5=5;
end;
run;

proc phreg data=ucla_surv;
model lenfol*fstat(0) = gender/ties=efron;
title "HR over entire study FU";
ods select ParameterEstimates;
run;
title;

proc phreg data=ucla_surv_5yr;
model lenfol5*fstat5(0) = gender/ties=efron;
title "HR over 5 years of FU";
ods select ParameterEstimates;
run;
title;

One can see from the output that the HR estimate has changed: over the entire follow-up period, the HR for death modeled against gender was 1.465 while at 5-year FU the estimate was 1.363. Because of the truncation though, the 5-year estimate is less precise.

I welcome any thoughts about my approach from the CV community.

Thanks very much.

$\endgroup$
3
  • $\begingroup$ You might have more luck posting this question to the SAS community Q&A site or, assuming you have a current SAS license, posing it with their tech support. Another excellent resource is Paul Allison's 2010 book, Survival Analysis Using SAS. $\endgroup$
    – user78229
    Commented Jan 27, 2020 at 20:29
  • $\begingroup$ Thanks, Mike. I did post it over there, but so far, no one has responded. $\endgroup$ Commented Jan 29, 2020 at 2:51
  • $\begingroup$ Unlikely this is actually in years unless you are studying bristlecone pine trees. More likely time was measured in days. Note that 2358/365 = [1] 6.460274 Regular Cox models do assume that the HR remains constant. However, if you truncate the data before the full study has finished, the estimates are likely to change. This was cross-posted on StackOverflow. Such behavior is frowned upon. There are methods for checking the lack of proportionality which would be the terminology used to describe varying HR over time. $\endgroup$
    – DWin
    Commented Feb 2, 2020 at 7:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.