Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: attributable fraction


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: attributable fraction
Date   Sat, 4 Nov 2006 16:11:45 -0000

Stata is doing nothing unilaterally here. The author 
of the program, Tony Brady, wrote this in his program, 
which is pretty transparent. 

	if `AFhat' < 0 {
		scalar `AFse' = .
		scalar `cilo' = .
		scalar `cihi' = .
	}

In short, the programmer, evidently, decided that negative fractions
make no sense, so that saying more about them is futile. 
If you have an alternative point of view, clone the program
and change the code. That's the beauty of open source. 

Nick 
[email protected] 

Marc Campo
 
> I have calculated several attributable fractions. 
> When the AF comes up as negative however, Stata does
> not display a standard error and confidence interval. 
> Why?
> 
> . logistic incident_lowback age gender hours_week
> second_job strain xfer posi manual
> 
> 						
> incident_l~k	Odds Ratio	Std. Err.	z	P>z	
> [95% Conf.
> Interval]
> 						
> age	.9849692	.0149313	-1.00	0.318	
> .9561349	1.014673
> gender	.9118571	.3196976	-0.26	0.792	
> .4586644	1.812836
> hours_week	1.000273	.0169735	0.02	0.987	.9675525
> 1.034099
> second_job	1.0135	.3644665	0.04	0.970	.5008663
> 2.050812
> strain	2.311378	.7130899	2.72	0.007	
> 1.262595	4.231337
> xfer	1.658223	.4354864	1.93	0.054	
> .9910564	2.774517
> posi	.7943614	.2137511	-0.86	0.392	
> .4687834	1.346059
> manual	1.025606	.0583063	0.44	0.657	
> .9174643	1.146494
> 
> 
> . aflogit posi, ref(posi=1)
> 
> Term	Ref.	A.F.	s.e.	[95%	Conf.	Int.]*
> 						
> posi	1	-0.2742	.		.	.
> 						
> TOTAL		-0.2742	.		.	.
> 
> 
> Any thoughts?  Why can't you have a negative AF?

*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index