WH_2d_outer {WH} | R Documentation |
2D Whittaker-Henderson Smoothing (Maximum Likelihood, optim function)
WH_2d_outer(
d,
ec,
y,
wt,
q = c(2, 2),
p,
criterion = "REML",
lambda = c(1000, 1000),
reg = FALSE,
verbose = FALSE,
accu_crit = 1e-12,
accu_dev = 1e-12
)
d |
Vector of observed events |
ec |
Vector of central exposure |
y |
Vector of observations |
wt |
Optional vector of weights |
q |
Order of penalization. Polynoms of degrees q - 1 are considered smooth and are therefore unpenalized |
p |
The number of eigenvectors to keep |
criterion |
Criterion used to choose the smoothing parameter. One of "GCV" (default), "AIC" or "BIC". |
lambda |
Initial smoothing parameters |
reg |
Should the regression framework be used ? Boolean. If |
verbose |
Should information about the optimization progress be displayed |
accu_crit |
Tolerance for the convergence of the outer optimization procedure |
accu_dev |
Tolerance for the convergence of the optimization procedure |
An object of class "WH_2d"
i.e. a list containing model fit,
variance, residuals and degrees of freedom as well as diagnosis to asses
the quality of the fit.