band_weight {aspline} | R Documentation |
Create the penalty matrix
band_weight(w, diff)
w |
Vector of weights |
diff |
Order of the differences to be applied to the parameters. Must be a strictly positive integer |
Weighted penalty matrix D^T diag(w) D
where
D <- diff(diag(length(w) + diff), differences = diff)
. Only the non-null superdiagonals of
the weight matrix are returned, each column corresponding to a diagonal.