band_weight {aspline}R 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.


[Package aspline version 0.2.0 Index]