Fit B-Splines with weighted penalization over differences of parameters
Fit B-Splines with weighted penalization over differences of parameters
wridge_solver( XX_band, Xy, degree, pen, w = rep(1, nrow(XX_band)- degree -1), old_par = rep(1, nrow(XX_band)), maxiter =1000, tol =1e-08)
Arguments
XX_band: The matrix XTX where X is the design matrix. This argument is given in the form of a band matrix, i.e., successive columns represent superdiagonals.
Xy: The vector of currently estimated points XTy, where y is the y-coordinate of the data.
degree: The degree of the B-splines.
pen: Positive penalty constant.
w: Vector of weights. The case w=1 corresponds to fitting P-splines with difference #' order degree + 1 (see Eilers, P., Marx, B. (1996) Flexible smoothing with B-splines and penalties.)
old_par: Initial parameter to serve as starting point of the iterating process.
maxiter: Maximum number of Newton-Raphson iterations to be computed.
tol: The tolerance chosen to diagnostic convergence of the adaptive ridge procedure.