select.knots: Knots selection for P-spline smoothing

View source: R/select.knots.r

select.knotsR Documentation

Knots selection for P-spline smoothing

Description

Construct knots from either quantiles of observed time points or equally-spaced time points.

Usage

select.knots(t,knots=10,p=3,option="equally-spaced")

Arguments

t

Observed time points.

knots

Number of interior knots.

p

Degrees of B-splines to be used.

option

Default "equally-spaced": equally-spaced time points in the range of t; if "quantile", then quantiles of t.

Details

The number of knots in the output will be knot plus 2 times p; and the B-spline basis matrix constructed from this vector of knots with degrees p will be knots plus p.

Value

A vector of knots

Author(s)

Luo Xiao <lxiao5@ncsu.edu>

Examples

t <- rnorm(100)
knots <- select.knots(t)

lxiao5/face documentation built on July 23, 2022, 6:24 p.m.