band_weight: Create the penalty matrix

View source: R/RcppExports.R

band_weightR Documentation

Create the penalty matrix

Description

Create the penalty matrix

Usage

band_weight(w, diff)

Arguments

w

Vector of weights

diff

Order of the differences to be applied to the parameters. Must be a strictly positive integer

Value

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.


aspline documentation built on June 9, 2022, 9:05 a.m.