Description Usage Arguments Details Value References See Also Examples
This function creates the two matrices for the fixed and random components of the mixed model. The matrix corresponding to the random components is a made from a spline basis.
1 | Mixed_Spline_Model(x, knots, P = 1, spline = "Radial", r = 1, theta = 2)
|
x |
A vector of a predictor variable. |
knots |
A vector containing the knots for the basis. |
P |
OPTIONAL: A value specifying the degree of the polynomial. |
spline |
OPTIONAL: The basis to be used for the spline model. This can either be "Truncated Poly" for the truncated polynomial basis function or "Radial" for the radial basis function. |
r |
OPTIONAL: A value for the degree of the radial basis function. Not used in the truncated polynomial basis function. |
theta |
OPTIONAL: A value for the range of the radial basis function. Not used in the truncated polynomial basis function. |
The truncated polynomial basis function is of the form: (x - k)+^P. The radial basis function is of the form exp(-abs(x - k)^r / theta).#' Set P = 1 for linear trend.
Z_p
is a basis matrix dimensions = n x k
where n equals the length of x
and k equals the length of int_knots
.
This matrix is used for the random part of the mixed model. X_p
is the matrix
with dimensions n x P. The columns are: the intercept, x, x^2, ..., x^P. This models the mean function of
the data. X_p
is used for the fixed part of the mixed model.
wand2003unequalgroupoutlier
radial_basis_fun
and piecewise_poly_basis_fun
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.