splines2: splines2: Regression Spline Functions and Classes

splines2R Documentation

splines2: Regression Spline Functions and Classes

Description

This package provides functions to construct basis matrices of

  • B-splines

  • M-splines

  • I-splines

  • convex splines (C-splines)

  • periodic splines

  • natural cubic splines

  • generalized Bernstein polynomials

  • along with their integrals (except C-splines) and derivatives of given order by closed-form recursive formulas

Details

In addition to the R interface, it also provides a C++ header-only library integrated with Rcpp, which allows the construction of spline basis functions directly in C++ with the help of Rcpp and RcppArmadillo. Thus, it can also be treated as one of the Rcpp* packages. A toy example package that uses the C++ interface is available at <https://github.com/wenjie2wang/example-pkg-Rcpp-splines2>.

The package splines2 is intended to be a user-friendly supplement to the base package splines. The trailing number two in the package name means "too" (and by no means refers to the generation two). See Wang and Yan (2021) for details and illustrations of how the package can be applied to shape-restricted regression.

Author(s)

Maintainer: Wenjie Wang wang@wwenjie.org (ORCID)

Authors:

References

Wang, W., & Yan, J. (2021). Shape-restricted regression splines with R package splines2. Journal of Data Science, 19(3), 498–517.

See Also

Useful links:


splines2 documentation built on Sept. 11, 2024, 9:05 p.m.