Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: FIRTHLOGIT with factor (categorical variables)
From
Warren Chow <[email protected]>
To
<[email protected]>
Subject
st: FIRTHLOGIT with factor (categorical variables)
Date
Tue, 21 Sep 2010 08:25:13 -0500
I am trying to do a logistic regression in STATA for a dichotomous output
variable y using various categorical predictors. One of these predictors,
x1, has many levels. The goal is produce linear predictions (predict
linearx1, xb) so I can perform another logistic regression with the
remaining predictors (logit y linearx1 i.x2 i.x3 i.x4).
The first logistic regression encounters complete and quasi separation at
various stages using the standard maximization techniques provided by stata.
I would like to use a Firth penalized maximum likelihood estimation and
have downloaded the FIRTHLOGIT macro from
http://ideas.repec.org/c/boc/bocode/s456948.html#abstract. This technique
previously successfully linearized x1 using SAS. However, FIRTHLOGIT does
not support factor (categorical) variables. For example, in the newer
versions of STATA, you can use:
logit y i.x
But the following does not work:
firthlogit y i.x
Is there another version of the macro that supports factor variables, or an
easy way to modify to code? I have tried the following:
xi : firthlogit y i.x
But this is extremely slow.
*
* 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/