Dose-response analyses using restricted cubic spline functions in public health research

Stat Med. 2010 Apr 30;29(9):1037-57. doi: 10.1002/sim.3841. Epub 2010 Jan 19.


Taking into account a continuous exposure in regression models by using categorization, when non-linear dose-response associations are expected, have been widely criticized. As one alternative, restricted cubic spline (RCS) functions are powerful tools (i) to characterize a dose-response association between a continuous exposure and an outcome, (ii) to visually and/or statistically check the assumption of linearity of the association, and (iii) to minimize residual confounding when adjusting for a continuous exposure. Because their implementation with SAS® software is limited, we developed and present here an SAS macro that (i) creates an RCS function of continuous exposures, (ii) displays graphs showing the dose-response association with 95 per cent confidence interval between one main continuous exposure and an outcome when performing linear, logistic, or Cox models, as well as linear and logistic-generalized estimating equations, and (iii) provides statistical tests for overall and non-linear associations. We illustrate the SAS macro using the third National Health and Nutrition Examination Survey data to investigate adjusted dose-response associations (with different models) between calcium intake and bone mineral density (linear regression), folate intake and hyperhomocysteinemia (logistic regression), and serum high-density lipoprotein cholesterol and cardiovascular mortality (Cox model).

MeSH terms

  • Bone Density / drug effects
  • Calcium, Dietary / administration & dosage
  • Cardiovascular Diseases / blood
  • Cardiovascular Diseases / mortality
  • Cholesterol, HDL / blood
  • Data Interpretation, Statistical
  • Dose-Response Relationship, Drug*
  • Folic Acid / administration & dosage
  • Humans
  • Hyperhomocysteinemia / etiology
  • Linear Models
  • Logistic Models
  • Nutrition Surveys / statistics & numerical data
  • Proportional Hazards Models
  • Public Health
  • Research Design
  • Software


  • Calcium, Dietary
  • Cholesterol, HDL
  • Folic Acid