diffpen: P-spline difference penalty

View source: R/diffpen.R

diffpenR Documentation

P-spline difference penalty

Description

P-spline difference penalty

Usage

diffpen(x, m = 2, sparse = TRUE)

Arguments

x

A hero_bspline object produced by bspline.

m

A positive integer indicating order of the difference penalty.

sparse

A logical value indicating if the result should be a sparse version of the Matrix-class.

Value

A matrix or sparseMatrix-class object.

Author(s)

Joshua French

Examples

b = bspline(nbasis = 10)
diffpen(b)

hero documentation built on July 26, 2023, 5:11 p.m.