Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: difficulty with aflogit command


From   Ari Samaranayaka <ari.s@xtra.co.nz>
To   statalist@hsphsun2.harvard.edu
Subject   st: difficulty with aflogit command
Date   Sun, 29 May 2011 17:54:05 +1200

Hi
I am having difficulty with the user-written command aflogit.
Although it is expected to work after unconditional logit or poisson it does not work for me.

sysuse auto,clear
logit foreign mpg rep78
aflogit

this produce

Logistic regression Number of obs = 69 LR chi2(2) = 33.10 Prob > chi2 = 0.0000 Log likelihood = -25.851693 Pseudo R2 = 0.3903
------------------------------------------------------------------------------
foreign | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mpg | .1328672 .0735776 1.81 0.071 -.0113423 .2770767 rep78 | 1.73607 .4928761 3.52 0.000 .7700508 2.70209 _cons | -10.03775 2.407455 -4.17 0.000 -14.75628 -5.319226
------------------------------------------------------------------------------
.
. aflogit
Can only be used after unconditional logistic or poisson regression
last estimates not found
r(301);

Then I used the following.

poisson price weight   displacement
aflogit

This produces

Poisson regression Number of obs = 74 LR chi2(2) = 29652.15 Prob > chi2 = 0.0000 Log likelihood = -29162.101 Pseudo R2 = 0.3370

------------------------------------------------------------------------------
price | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
weight | .0003235 4.52e-06 71.55 0.000 .0003147 .0003324 displacement | .0000446 .000037 1.20 0.228 -.000028 .0001172 _cons | 7.708671 .0081077 950.79 0.000 7.69278 7.724561
------------------------------------------------------------------------------

. aflogit

Population attributable fraction from poisson regression
Cross-sectional / cohort data (n=74)


Term      Ref.     A.F.        s.e.      [95% Conf. Int.]*
----------------------------------------------------------
weight     0      0.6355     11.9561   -3.03e+27   1.0000
ment not found
r(111);

Can someone help me.
I am using stata SE 11.2.
my version of aflogit is
c:\ado\plus\a\aflogit.ado
*! version 1.0.6   16 Sep 1997  STB-42 sbe21


Thank you

Ari

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index