IDEAS home Printed from https://ideas.repec.org/p/boc/asug05/4.html
   My bibliography  Save this paper

Using Stata v9 to model complex non-linear relationships with restricted cubic splines

Author

Listed:
  • William D. Dupont

    (Department of Biostatistics, Vanderbilt University School of Medicine)

  • Dale Plummer

    (Department of Biostatistics, Vanderbilt University School of Medicine)

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.

Suggested Citation

  • William D. Dupont & Dale Plummer, 2005. "Using Stata v9 to model complex non-linear relationships with restricted cubic splines," North American Stata Users' Group Meetings 2005 4, Stata Users Group.
  • Handle: RePEc:boc:asug05:4
    as

    Download full text from publisher

    File URL: http://repec.org/nasug2005/RCsplines.pdf
    File Function: presentation slides
    Download Restriction: no

    File URL: http://repec.org/nasug2005/support.do
    File Function: sample program
    Download Restriction: no

    File URL: http://repec.org/nasug2005/support.dta
    File Function: sample data file
    Download Restriction: no

    File URL: http://repec.org/nasug2005/support.log
    File Function: sample logfile
    Download Restriction: no

    File URL: http://repec.org/nasug2005/RCsplines.ppt
    File Function: presentation slides
    Download Restriction: no
    ---><---

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Byrne, David & Zekaite, Zivile, 2018. "Missing wage growth in the euro area: is the wage Philips curve non-linear?," Economic Letters 9/EL/18, Central Bank of Ireland.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:boc:asug05:4. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F Baum (email available below). General contact details of provider: https://edirc.repec.org/data/stataea.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.