Thanks to Kit Baum, a new package -locpr- is available from SSC.
-locpr- semi-parametrically estimates a probability or proportion as a
function of one other variable and graphs the result. Specifically, it
estimates a local linear regression using -lpoly- and approximates the
endpoints of the confidence interval via a logit transformation. The
estimates are computed at ninety-nine percentiles of the regressor and
graphed. The logit option offers a direct comparison to parametric
logistic regression.
Examples
*-----------------------------------------------------------------------------------------------------
ssc install locpr, replace
sysuse nlsw88, clear
locpr never_married hours, logit combine
*-----------------------------------------------------------------------------------------------------
webuse nhanes2, clear
g bmi=wei/hei^2*10000
lpoly highbp bmi [aw=finalw], nosc ci name(lpoly)
locpr highbp bmi [pw=finalw], l c name(loc_)
*-----------------------------------------------------------------------------------------------------
webuse psidextract, clear
locpr ms lw, l c
locpr ms wks, l c
locpr ms ed, l c
*-----------------------------------------------------------------------------------------------------
To install the package, type
ssc install locpr, replace
Comments welcomed!
*
* 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/