Smoothed logistic regression partial residual plots (STB-10: sqv6) --------------------------------------------------- ^lpartr^ depvar varlist^, ^[^with(^varlist^) s^mooth^() l^owess ^bw^idth^(^#^) gen^] Description ----------- ^lpartr^ provides smoothing options for partial Pearson residual plots of covariate patterns generated from logistic regression. The default smooth is cubic spline with a bandwidth of 4. The latter may be changed using the ^smooth()^ option. The ^lowess^ option creates a lowess smooth of the residuals with a default bandwidth of .8; this may be changed using the ^bwidth()^ option. See ^ksm^ in the Stata manual for bandwidth details. I have provided the ^gen^ option for those who desire retention of the lowess smooth values on each predictor. New variables are created with the names of ^PR1^,^PR2^, etc. for each predictor. Indicator variables and categorical variables with only several covariate patterns may be smoothed using the default cubic spline. The lowess option may be used to smooth continuous variables; but you must use the ^with^ option to force non-continuous variables into the regression model. You may also use the ^with^ option with the cubic spline smooth to simply exclude a predictor from being smoothed and displayed. The displayed plots are useful for discerning predictor nonlinearities. They can also aid in the identification of covariate patterns with extreme residual values. Example: Data set - low birth weight response variable (0,1) = low continuous variables = age, lwt indicator variables = smoke, ht ui categorical variable = ptl /* not made into dummy vars */ To model with the lowess smooth with the defaults... ^lpartr low age lwt, with(smoke ht ui ptl) l Only the age and lwt smooths are displayed, but all variables are used in the fit to calculate covariate pattern Pearson residuals. Author ------ Joseph Hilbe , Editor, STB, 10952 N. 128th Place, Scottsdale, AZ 85259-4464 Fax: 602-860-1446; Voice: 602-860-4331