qknots {tvcure}R Documentation

Specification of the knots of a cubic B-spline basis for given data.

Description

Specification of the knots of a cubic B-spline basis for given data.

Usage

qknots(x, xmin=NULL, xmax=NULL,
       equid.knots = TRUE, pen.order=2, K=25)

Arguments

x

data that should be supported by the knots of the B-spline basis.

xmin

(Optional) minimum value for the knots.

xmax

(Optional) maximum value for the knots.

equid.knots

Logical indicating if equidistant knots are desired (Default: TRUE).

pen.order

penalty order (if equid.knots = TRUE) (Default: 2).

K

number of B-splines in the basis (Default: 25).

Value

a list containing the following elements:

Author(s)

Philippe Lambert p.lambert@uliege.be

References

Lambert, P. and Kreyenfeld, M. (2025). Time-varying exogenous covariates with frequently changing values in double additive cure survival model: an application to fertility. Journal of the Royal Statistical Society, Series A. <doi:10.1093/jrsssa/qnaf035>

Examples

x = rnorm(100)
qknots(x)

[Package tvcure version 0.6.6 Index]