default.splines: Construct default splines

Description Usage Arguments Value Author(s) References Examples

View source: R/default.splines.R

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

1
default.splines(evalargs)

Arguments

evalargs

A list of equidistant sequences.

Value

A list of hero_bsplines.

Author(s)

Joshua French

References

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

Examples

1
2
3
s1 = seq(0, 1, len = 10)
s2 = seq(0, 1, len = 20)
default.splines(list(s1, s2))

hero documentation built on Jan. 25, 2020, 1:07 a.m.