View source: R/spline_functions.R
| v_s | R Documentation |
This function estimates splines in vglmer, similar to s(...) in
mgcv albeit with many fewer options than mgcv. It allows for
truncated (linear) splines (type="tpf"), O'Sullivan splines
(type="o"), or kernel ridge regression (type="gKRLS"). Please
see vglmer for more discussion and examples. For information on kernel
ridge regression, please consult gKRLS.
v_s(
...,
type = "tpf",
knots = NULL,
by = NA,
xt = NULL,
by_re = TRUE,
force_vector = FALSE,
outer_okay = FALSE
)
... |
Variable name, e.g. |
type |
Default ( |
knots |
Default ( |
by |
A categorical or factor covariate to interact the spline with; for
example, |
xt |
Arguments passed to |
by_re |
Default ( |
force_vector |
Force that argument to |
outer_okay |
Default ( |
This function returns a list of class of vglmer_spline that is
passed to unexported functions. It contains the arguments noted above where
... is parsed into an argument called term.
Chang, Qing, and Max Goplerud. 2024. "Generalized Kernel Regularized Least Squares." Political Analysis 32(2):157-171.
Wand, Matt P. and Ormerod, John T. 2008. "On Semiparametric Regression with O'Sullivan Penalized Splines". Australian & New Zealand Journal of Statistics. 50(2): 179-198.
Wood, Simon N. 2017. Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.