=3Doriginal
Content-transfer-encoding: 8BIT
X-Priority: 3
X-MSMail-priority: Normal
X-Antivirus: avast! (VPS 0630-2, 07/26/2006), Outbound message
X-Antivirus-Status: Clean
References: <C102402B.1014D%[email protected]>
Sender: [email protected]
Precedence: bulk
Reply-To: [email protected]
Errors-To: [email protected]
type
which aflogit
If this ado file is from an early version of Stata it may have an 8
character limit on variable names, which would be violated by the variables
created by xi. If this is the case, you may be able to get a newer version
of the ado file or you could rename alcohol as alc so that shorter variable
names are created.
M Blasnik
----- Original Message -----
From: "rps" <[email protected]>
To: <[email protected]>
Sent: Friday, August 11, 2006 2:09 PM
Subject: st: Variable names incompatable with aflogit?
I have encountered the following problem when using the aflogit (sbe21.pkg)
user-supplied module for calculating population attributable fraction (AF)
following a logistic regression (the data set is tuyns.dta, which is
distributed with the package):
The following logistic regression command is issued:
xi: logit case i.alcohol [fw=3Dn]
which produces:
i.alcohol _Ialcohol_0-3 (naturally coded; _Ialcohol_0 omitted=
)
<snip>
Then the aflogit command is given:
aflogit _Ialcohol* [fw=3Dn], cc
which produces the following error:
Population attributable fraction from logistic regression
Case-control data (n=3D975)
Using weights [fweight =3D n]
Term Ref. A.F. s.e. [95% Conf. Int.]*
----------------------------------------------------------
l_1 not found
r(111);
Referring to the model terms explicitly does not help, as in
aflogit _Ialcohol_1 _Ialcohol_2 _Ialcohol_3 [fw=3Dn], cc
However, renaming _Ialcohol_1 _Ialcohol_2 _Ialcohol_3 as alcohol1 alcohol2
alcohol3, respectively, allows the aflogit module to execute:
<snip>
Any insight anyone can give as to why aflogit doesn=B9t accept the original
indicator variable names will be appreciated. For the present example,
renaming the variables is a reasonable solution, but it becomes tedious is
there are several factors in the model each with multiple indicator
variables.
Thanks,
Richard Steiner
The University of Akron
*
* 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/