11-30-2015 04:00 PM
I have a simple proc lifetest:
proc lifetest data=d4 atrisk plots=survival( f atrisk (atrisktickonly outside) test ) notable;
How can I estimate
1- The Cumulative rate and CI at a certain time point (t)
2- The total person-year follow up time for each strata?
11-30-2015 09:28 PM
1- From the manual : proc lifetest data=d4 atrisk notable TIMELIST=t ... ;
2- proc sql; select status, sum(year) as totalFollowUpYears from D4 group by status; quit;
12-01-2015 05:38 AM
12-01-2015 03:33 PM
Thank you all
I think what I would get from these analysis is the cumulative survival
What I am actually interested in is the cumulative hazard rate at the a certain time point (the median survival point)
Wouls appreciate any help with that
12-01-2015 04:00 PM
The Outsurv tables provides "Survival Distribution Function Estimate", and that is not the cumulative hazards
Could anyone please comment on how to get the cumulative hazards at a certain time point and their confidence interval (at that time point)
12-01-2015 04:01 PM - edited 12-01-2015 04:16 PM
If you want the cumulative survial rate (not the probability) then you just take -Log(S(t)), where S is the Kaplan Meier curve. Confidence intervals is found just be use same transformation of the confidence intervals of the Kaplan Meier curve.
Or, you can get it directly from proc phreg:
data simulation; do i=1 to 1000; t=rand('exponential',10); c=rand('exponential',10); event=(t<c); t=min(t,c); output; end; run; proc phreg data=simulation; model t*event(0)=; baseline out=out cumhaz=cumhaz lowercumhaz=lower uppercumhaz=upper; ruN;
and, if you want to pick out the function as a specific time-point you can do by find the last observation in the "out" dataset before (or at) the timepoint you are interested. Like in my suggestion above.
by the way, it is not so easy to find the median survival point if you have censoring. In that case you may need to assume some distribution of the survival time (weibull for instance) and then use proc lifereg to estimate the parameters. Afterward you can calculate median from the estimated parameters.
12-01-2015 05:08 PM - edited 12-01-2015 05:09 PM
Thank you JacobSimonsen
Very nice suggession
I tried a different approach:
ods output productlimitestimates=naout; proc lifetest data=d4 nelson ; strata group; time time*event(0); run;
proc sort data=naout (where=(cumhaz ne .));
by group time ;
run; data naout2; set naout; LowerCIFailure=failure-1.96*StdErr; UpperCIFailure=failure+1.96*StdErr; LowerCICumHaz=CumHaz-1.96*StdErrCumHaz; UpperCICumHaz=CumHaz+1.96*StdErrCumHaz; run;
Interestingly this produces the exact cum hazards estimates as the ones from proc phreg as you suggested
But the 95% confidence intervals are different, so I mudt have calculated it worngly
Any suggession is appreciated
12-01-2015 05:30 PM
12-05-2015 01:41 PM
I would appreciate if there is a way to programmatically calculate the confidence interval for failure using the lifetest procedure. THe option outsurv gives the confidence interval table for survival only and not for failure
12-05-2015 03:24 PM
since probability of failure is just 1-survial, you can calculate confidence limits for failure from the confidence limits of survival.
proc lifetest data=... outsurv=outsurv;