Learn R Programming

hero (version 0.6)

default.splines: Construct default splines

Description

Construct a list of hero_bsplines using the default values suggested by Ruppert, Wand, and Carroll (2003). Specifically, if r = range(evalargs[[i]]) and l = length(evalargs[[i]]), then Ruppert, Wand, and Carroll (2003) suggest nknots = min(ceiling(l/4), 35) and the function returns the hero_bspline for that dimension as bspline(r, nknots = nknots).

Usage

default.splines(evalargs)

Value

A list of hero_bsplines.

Arguments

evalargs

A list of equidistant sequences.

Author

Joshua French

References

Ruppert, D., Wand, M. P., & Carroll, R. J. (2003). Semiparametric Regression. Cambridge University Press. <doi:10.1017/CBO9780511755453>

Examples

Run this code
s1 = seq(0, 1, len = 10)
s2 = seq(0, 1, len = 20)
default.splines(list(s1, s2))

Run the code above in your browser using DataLab