reg_spline_X | R Documentation |
Make a design matrix for regression spline
reg_spline_X(x, xp, smooth, ...)
x |
values of the predictor |
xp |
values of the predictor for plotting the calibration curve |
smooth |
spline to use ( |
... |
additional arguments for specific splines ('nk' or 'knots' for 'rcs', 'df' or 'knots' for 'ns' or 'bs') |
a list containing
X
the design matrix for the data
Xp
the design matrix for plotting
x <- rnorm(100)
xp <- seq(min(x), max(x), length.out=50)
reg_spline_X(x = x, xp = xp, smooth="rcs", nk=6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.