Dear Svend,
thanks a lot again for Your as usual Kind and helpful hints.
Kind Regards,
Carlo
-----Messaggio originale-----
Da: [email protected]
[mailto:[email protected]] Per conto di Svend Juul
Inviato: mercoled� 1 agosto 2007 14.55
A: [email protected]
Oggetto: Re: st: Number Needed to be Treated (NNT)
Carlo wrote:
Is there any Stata 9.2 function for calculating the patient number needed to
be treated (NNT) in order to prevent one case of a given disease? (Search do
not support this query)
- and Ron�n Conroy followed up:
... it would make a useful addition to the -epitab- commands which calculate
absolute risk reduction, together with its associated confidence interval,
for those who are not brave enough to calculate something by hand.
------------------------------------------------------------
This calls for a small program. I wrote cs_nnt.ado and put it in
c:\ado\personal.
program cs_nnt
syntax varlist(min=2 max=2 numeric) [if] [in]
cs `varlist'
local nnt = 1/r(rd)
local ub = 1/r(ub_rd)
local lb = 1/r(lb_rd)
display _newline " NNT = " `nnt' " (`c(level)'% CI: " `ub' "; " `lb' ")"
end
It utilizes -cs- (see [ST] epitab); the -return list- command discloses
among
other things: r(rd), r(ub_rd), and r(lb_rd).
Actually, the -lbw- dataset is from a case-control study, so don't imagine
it can be used to estimate absolute risks, risk differences, or NNT.
Here we forget this reservation:
. webuse lbw.dta
(Hosmer & Lemeshow data)
. cs_nnt low smoke
| smoked during pregnancy|
| Exposed Unexposed | Total
-----------------+------------------------+------------
Cases | 30 29 | 59
Noncases | 44 86 | 130
-----------------+------------------------+------------
Total | 74 115 | 189
| |
Risk | .4054054 .2521739 | .3121693
| |
| Point estimate | [95% Conf. Interval]
|------------------------+------------------------
Risk difference | .1532315 | .0160718 .2903912
Risk ratio | 1.607642 | 1.057812 2.443262
Attr. frac. ex. | .377971 | .0546528 .5907112
Attr. frac. pop | .1921887 |
+-------------------------------------------------
chi2(1) = 4.92 Pr>chi2 = 0.0265
NNT = 6.5260736 (95% CI: 3.4436304; 62.220882)
Interpretation: For each 6.5 smokers we produce one low birthweight baby.
The confidence interval tells about the uncertainty of this estimate.
NNT is claimed to make communication with patients easier, and that may
sometimes be the case. But things may also be made more difficult. Here
we try with a non-existent association, creating the random binary
variable -x-:
. set seed 12345
. gen x = uniform()>0.5
. cs_nnt low x
| x |
| Exposed Unexposed | Total
-----------------+------------------------+------------
Cases | 34 25 | 59
Noncases | 65 65 | 130
-----------------+------------------------+------------
Total | 99 90 | 189
| |
Risk | .3434343 .2777778 | .3121693
| |
| Point estimate | [95% Conf. Interval]
|------------------------+------------------------
Risk difference | .0656566 | -.0659201 .1972332
Risk ratio | 1.236364 | .8040256 1.901177
Attr. frac. ex. | .1911765 | -.2437415 .4740101
Attr. frac. pop | .1101695 |
+-------------------------------------------------
chi2(1) = 0.95 Pr>chi2 = 0.3306
NNT = 15.230769 (95% CI: 5.0701399; -15.169883)
The confidence interval is complicated; it actually means two intervals:
5.07 to infinity
minus infinity to -15.17
- the negative numbers meaning that exposure to x may prevent low
birthweight.
I am not sure that -cs_nnt- deserves to be made more public than this,
but those who want can go on playing with it.
Svend
__________________________________________
Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000 Aarhus C, Denmark
Phone: +45 8942 6090
Home: +45 8693 7796
Email: [email protected]
__________________________________________
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/