Thanks to Kit Baum, a new package called -logitcprplot- is available from SSC.
-logitcprplot- can be used after logistic regression for graphing a
component-plus-residual plot (a.k.a. partial residual plot) for a
given predictor, including a lowess smooth, local polynomial smooth,
restricted cubic spline smooth, or fractional polynomial fit.
Additional features are the possibility to deal with nonlinear
specifications (e.g., quadratic fit), -if- and -in- qualifiers to
select subsamples (this is useful for models with interaction terms),
and a -sample()- option that is helpful in very large datasets.
To install the package, type
. ssc install logitcprplot
Stata 9 is required, although the -lpoly- option requires Stata 10.
Furthermore, the sample() option requires the -gsample- and -moremata-
user packages to be installed on the system. See -ssc describe
gsample- and -ssc describe moremata-.
The option to include a restricted cubic spline smooth has been
inspired by the -rcspline- command by Nick Cox (see -ssc describe
rcspline-).
Partial residual plots using the pre Stata 8 graphics engine are
available as -lprplot- by Bill Sribney from the SSC Archive (see -ssc
describe lprplot-) and -lpartr- in the Stata Technical Bulletin (Hilbe
1992).
Best,
ben
Hilbe, J. 1992. sqv6: Smoothed partial residual plots for logistic
regression. Stata Technical Bulletin 10:27.
http://stata-press.com/journals/stbcontents/stb10.pdf
*
* 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/