Description Usage Arguments Details Value Decomposition References See Also
Constructs a set of basis vectors C_0 and K_1 used to
constrain distributed lag coefficients, β,
using splines. The basis vectors depend on the radii that define
ring-shaped areas around participant locations.
Typical usage relies on calling basis application functions, like
cr (e.g. in dlm model
formulas); users should not often have to interact with basis
directly.
1 |
x |
radii that define ring-shaped areas around participant locations |
center |
if |
scale |
if |
.fun |
a function to define the type of basis. The default is to compute a cubic radial basis based on pairwise cubed absolute differences among the radii. See Details |
... |
other parameters passed to |
Alternative distance functions, .fun, may be specified, and
error checking on the user's choice of .fun is deliberately
missing. Proper candidates for .fun should return an
(L \times L) matrix, where L is the same as length(x);
elements of this matrix are typically non-negative.
In addition, new distance function definitions should follow the idiom:
function(x, y, ...)
if (missing(y)) y <- x
...
The default value of .fun computes cubic radial distance,
which amounts to abs(outer(x, y, "-"))^3; the computed vectors are
then transformed following Rupert, Wand, and Carroll (2003), such that
the spline can be fitted (and penalized) as a mixed-model.
An object of class LagBasis
Once a basis function (δ()) and radii (r) are chosen, define the matrix, C_1[i, j] = δ(r_i, r_j), and let,
C_0 = [1, r]
C_1 = Q * R
M_1 = Q[-(1:2)]
K_1 = C_1 * M_1 * (M_1' * C_1 * M_1)^-0.5
where A[-j] denotes a matrix A with column(s) j removed. Then the (scaled) distributed lag effects are β = C_0 * α + K_1 * b, where b_l ~ N(0, σ^2_b), for l = 1, ..., L - 2.
Rupert D, Wand MP, & Carroll RJ (2003) Semiparametric Regression. New York: Cambridge University Press.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.