Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

crs.FP

Penalty matrix constructor for cubic regression splines


Description

constructs the penalty matrix associated with cubic regression splines basis. This function is called inside crs.

Usage

crs.FP(knots, h)

Arguments

knots

Numeric vectors that specifies the knots of the splines (including boundaries)

h

vector of knots differences (corresponds to diff(sort(knots)))

Value

List of two elements:

F.mat

matrix used in function crs for basis construction

P.mat

penalty matrix

Examples

library(survPen)

# construction of the penalty matrix using a sequence of knots
knots <- c(0,0.25,0.5,0.75,1)
diff.knots <- diff(knots)

crs.FP(knots,diff.knots)

survPen

Multidimensional Penalized Splines for Survival and Net Survival Models

v1.5.1
GPL-3 | file LICENSE
Authors
Mathieu Fauvernier [aut, cre], Laurent Roche [aut], Laurent Remontet [aut], Zoe Uhry [ctb], Nadine Bossard [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.