turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Estimating the cumulative rate and CI at a certain...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-30-2015 04:00 PM

Hi all

I have a simple proc lifetest:

**proc** **lifetest** data=d4 atrisk plots=survival( f atrisk (atrisktickonly outside) test ) notable;

strata status;

time Year*esldnum(**0**);

**run**;

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?

Kind regards

Am

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

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;

PG

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-01-2015 05:38 AM

Agree...except that the confidence intervals are not shown by adding "timelist=". Only the estimated survival probability at time=t is shown.

Alternative, the survival probability and confidence intervals can be read from the dataset with the survival curve: (t=5 here).

proc lifetest data=d4 outsurv=outsurv;

strata status;

time Year*esldnum(0);

run;

data pointestimate;

set outsurv(where=(t<5));

by status;

if last.status;

run;

Alternative, the survival probability and confidence intervals can be read from the dataset with the survival curve: (t=5 here).

proc lifetest data=d4 outsurv=outsurv;

strata status;

time Year*esldnum(0);

run;

data pointestimate;

set outsurv(where=(t<5));

by status;

if last.status;

run;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

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

Kind regards

A

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-01-2015 03:45 PM

Hazard estimates are only provided with the life table method in the OUTSURV= dataset.

PG

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-01-2015 04:00 PM

Thanks again

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)

Kind regards

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

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

Kind regards

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-01-2015 05:30 PM

I dont think you calculated it wrong. Your method can be asymptotical equivalent to what phreg produce. I think phreg cumputes the limits on some transformation of the cumulative hazard, which then is transformed back.

Unfortunately, it is not mentioned in the documentation how the limits of the cumulative hazard is computed. But I guess that it is calculated as -log() to the limits of S(t), and these limits are calculated on the log(S(t)) scale by default.

Unfortunately, it is not mentioned in the documentation how the limits of the cumulative hazard is computed. But I guess that it is calculated as -log() to the limits of S(t), and these limits are calculated on the log(S(t)) scale by default.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

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

Kind regards

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

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;

...

..

run;

data outsurv;

set outsurv;

failure=1-survival;

failure_lower=1-sdf_ucl;

failure_upper=1-sdf_lcl;

run;