crs.FP | R Documentation |
constructs the penalty matrix associated with cubic regression splines basis. This function is called inside
crs
.
crs.FP(knots, h)
knots |
Numeric vectors that specifies the knots of the splines (including boundaries) |
h |
vector of knots differences (corresponds to |
List of two elements:
F.mat |
matrix used in function |
P.mat |
penalty matrix |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.