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
- /
- SAS Programming
- /
- General Programming
- /
- How to calculate 95% confidence interval for morta...

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

03-25-2013 10:38 AM

Dear All.

I have a calculated mortality rate (see code below) and would like to calculate the 95% confidence interval for the .

A little bit about the data:

We have end of study reason (eosreas = 1 means died), we have enrollment date, end of study date. So, I thought (and I could very much be wrong) to calculate the mortality rate, I needed to count how many deaths, what was the total person-time in the study, then used the counts*1000 / total time to get the mortality rate.

proc sql;

create table cnt as

select abs(enrdt - eosdt)/365.25 as time_in_study,

(eosreas = 1) as death_event,

sum(calculated death_event) as dth_cnts,

sum(calculated time_in_study) as total_time,

((calculated dth_cnts * 1000) / calculated total_time) as mortality_rate,

from my_data;

quit;

OK, so my question now is can I calculate a 95% confidence interval for this mortality rate? And if yes, how?

Thank you for reading.And for helping

Anca.

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

03-25-2013 10:50 AM

I wonder if you should be doing a survival calculation and looking for the opposite of the survival rate, the mortality rate and the corresponding 95% confidence of that, since I'm assuming not everyone in the study died.

Proc lifetest or phreg would then be things to look into.

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

03-25-2013 12:43 PM

Fareeza, thank you.

Would the opposite of survival rate be the hazard rate? which is not the mortality rate. I apologize for my ignorance, but 'rates' are hard for me to understand.

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

03-25-2013 12:47 PM

1-survival rate is the mortality rate or failure rate .

SAS has options to plot both the survival plot and failure plot and you might be able to tweak the proc to output the other, but I don't recall.

The other option is to reverse your coding (0=death, 1 = otherwise), quick and dirty but works!

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

03-25-2013 02:38 PM

Hi Fareeza.

My senior statistician stopped by and I was able to ask her and this is what I got:

proc sql;

create table cnt as

select abs(enrdt - eosdt)/365.25 as time_in_study,

(eosreas = 1) as death_event,

sum(calculated death_event) as dth_cnts,

sum(calculated time_in_study) as total_time,

((calculated dth_cnts * 100) / calculated total_time) as mortality_rate,

** (sqrt((calculated dth_cnts *100) / (calculated total_time**2))) as stdErr_dth**

from my_data;

quit;

The **bolded** line is derived from the following:

Let # of deaths = D

and person time at risk = PT

estim_mort_rate = D / PT

so, var(estim_mort_rate) = (estim_mort_rate)^2 / D, which is

(D/PT)^2 * 1/D or

D/ PT^2

So, the StdErr is sqrt(# of deaths/ person time at risk squared)

Bam!

Thank you so much for the help!