Learn R Programming

hisemi (version 1.1-0)

n.knots: Number of spline knots

Description

Compute the number of spline knots to be the largest interger not greater than min(cutoff, max(0, n-cutoff)^rate).

Usage

n.knots(n, cutoff=35, rate=0.2)

Arguments

n

An integer vector of sample sizes.

cutoff

A numeric vector of cutoff values.

rate

A numeric vector of rates at which the number of knots increases with the sample size.

Value

An integer vector, being the number of knots for splines.

References

Claeskens, G. Krivobokova, T., and Opsomer, J. D. (2009). Asymptotic properties of penalized spline estimators. Biometrika 96, 529--544.

Li, Y. and Ruppert, D. (2008). on the asymptotics of penalized splines. Biometrika 95, 415--436.

Ruppert, D. (2002). Selecting the number of knots for penalized splines. Journal of Computational and Graphical Statistics 11, 735--757.

Qu, L., Nettleton, D., and Dekkers J. C. M. (2012) A hierarchical semiparametric model for incorporating inter-gene information for analysis of genomic data. Biometrics, 68(4):1168-1177.

Examples

Run this code
# NOT RUN {
n.knots(10, 35, .2)
n.knots(35, 35, .2)
n.knots(135, 35, .2)
n.knots(1350, 35, .2)
n.knots(13500, 35, .2)
# }

Run the code above in your browser using DataLab