This function creates a list of hat matrices and the corresponding
parameters. It is used in online()
to create the hat matrices
for penalized smoothing.
make_hat_mats(
x,
n = length(x),
mu = 0.5,
sigma = 1,
nonc = 0,
tailw = 1,
deg = 1,
ndiff = 1.5,
lambda = -Inf,
periodic = FALSE,
idx = NULL,
params = NULL
)
The predictor variable
Number of knots
Beta distribution location parameter
Beta distribution scale parameter
Beta distribution noncentrality parameter
Tailweight
Degree of splines
Sets the degree of the differencing matrix for creating the penalty
Penalty parameter (higher values lead to higher penalty)
Create periodic penalty
make_hat_mats()
will create a grid containing all
combinations of the parameters. If idx is set, this grid will
be subsetted to the rows specified by idx.
Instead of the arguments above, a grid (data.frame or named matrix) of parameters can be passed directly.