Using Stata v9 to model complex non-linear relationships with restricted cubic splines
William Dupont () and
Walton Plummer ()
North American Stata Users' Group Meetings 2005 from Stata Users Group
Abstract:
Restricted cubic splines (RCSs) are used with generalized linear models and other regression methods to model complex non-linear relationships. A RCS with k knots is linear before the first and after the last knot, is a cubic polynomial between adjacent knots, and is continuous and smooth. A RCS model with k knots can be fitted with only k-1 covariates. rc_spline calculates these covariates from an independent covariate and the knot values. Default numbers of knots and/or knot values suggested by Harrell (2001) may be used. We can then use the full power of Stata v9 to build models, construct graphs, and perform residual analyses using these covariates. RCSs are illustrated by modeling length of stay (LOS) and discharge mortality as a function of admission blood pressure (BP) from the SUPPORT study. LOS and log-odds of death are highly non-linear functions of BP. Multiple linear and logistic regression with RCSs are used to model these data. Plots of expected outcome with 95% confidence bands are easily overlaid on scatterplots using standard Stata graphics. These regression curves are little affected by the knot placements. This robust methodology is easily taught to non-statisticians and greatly expands the modeling capacity of standard regression methods.
Date: 2005-07-12
References: Add references at CitEc
Citations: View citations in EconPapers (1)
Downloads: (external link)
http://repec.org/nasug2005/RCsplines.pdf presentation slides (application/pdf)
http://repec.org/nasug2005/support.do sample program (text/plain)
http://repec.org/nasug2005/support.dta sample data file (application/x-stata)
http://repec.org/nasug2005/support.log sample logfile (text/plain)
http://repec.org/nasug2005/RCsplines.ppt presentation slides
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:boc:asug05:4
Access Statistics for this paper
More papers in North American Stata Users' Group Meetings 2005 from Stata Users Group Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().