## How to calculate 95% confidence interval for mortality rate?

Super Contributor
Posts: 543

# How to calculate 95% confidence interval for mortality rate?

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.

Super User
Posts: 23,724

## Re: How to calculate 95% confidence interval for mortality rate?

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.

Super Contributor
Posts: 543

## Re: How to calculate 95% confidence interval for mortality rate?

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.

Super User
Posts: 23,724

## Re: How to calculate 95% confidence interval for mortality rate?

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!

Super Contributor
Posts: 543

## Re: How to calculate 95% confidence interval for mortality rate?

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!

Discussion stats
• 4 replies
• 3287 views
• 7 likes
• 2 in conversation