01.02.2013 | Hints & Kinks
Linear, nonlinear or categorical: how to treat complex associations? Splines and nonparametric approaches
Erschienen in: International Journal of Public Health | Ausgabe 1/2013
Einloggen, um Zugang zu erhaltenExcerpt
In the first part of this methods series on nonlinear exposure-outcome relations, polynomial transformations and fractional polynomials (FP) have been introduced (Schmidt et al. 2012). They share in common a single function that covers the whole exposure range. This limits their sensitivity to capture local characteristics of the data. This article will introduce two additional approaches to handle complex nonlinear associations. A brief overview of statistical procedures in Stata, SAS and R is provided in Table 1.
Table 1
Selected commands for splines and nonparametric methods in Stata, SAS, and R
Command (Program)
|
Description
|
---|---|
mkspline/mkspline 2 (STATA)
|
These commands are used to create a basis for restricted cubic splines
|
rcspline (STATA)
|
|
RCS (SAS), ns (R)
|
|
bspline (STATA),
|
These commands generate a basis of B-splines
|
B-spline (SAS), bs (R)
|
|
uvrs (STATA)
|
Implements univariate regression splines comparable to fracpoly for fractional polynomials of degree 0, 1, and 3
|
mvrs (STATA)
|
Extends uvrs to allow for a multivariable model-building approach for regression spline models comparable to mfp for fractional polynomials
|
lowess, mlowess (STATA)
|
Procedures to calculate locally weighted regression models. mlowess allows for multivariable models
|
lowess (R), loess (SAS)
|
|
gam (STATA)
|
Procedures to calculate generalized additive models. The R package “mgcv” is the most versatile. The stata “gam” command relies on cubic smoothing splines as implemented in the gamfit Fortran program by Hastie and Tibshirani (1990)
|
Proc GAM (SAS)
|
|
mgcv-package (R)
|
|
mvss (STATA)
|
Implements a multivariable model-building approach for generalized additive models based on the Stata gam command comparable to mfp for fractional polynomials. mvss is available from http://www.imbi.uni-freiburg.de/biom/Royston-Sauerbrei-book/(Royston and Sauerbrei 2008)
|
Anzeige