Create a monotone inverse of a monotone natural spline.
Usage
backSpline(object)
Arguments
object
an object that inherits from class nbSpline or
npolySpline. That is, the object must represent a natural
interpolation spline but it can be either in the B-spline
representation or the piecewise polynomial one. The spline is
checked to see if it represents a monotone function.
Value
An object of class polySpline that contains the piecewise
polynomial representation of a function that has the appropriate
values and derivatives at the knot positions to be an inverse of the
spline represented by object. Technically this object is not a
spline because the second derivative is not constrained to be
continuous at the knot positions. However, it is often a much better
approximation to the inverse than fitting an interpolation spline to
the y/x pairs.
Author(s)
Douglas Bates and Bill Venables
See Also
interpSpline
Examples
require(graphics)
ispl <- interpSpline( women$height, women$weight )
bspl <- backSpline( ispl )
plot( bspl ) # plots over the range of the knots
points( women$weight, women$height )
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(splines)
> png(filename="/home/ddbj/snapshot/RGM3/R_rel/result/splines/backSpline.Rd_%03d_medium.png", width=480, height=480)
> ### Name: backSpline
> ### Title: Monotone Inverse Spline
> ### Aliases: backSpline
> ### Keywords: models
>
> ### ** Examples
>
> require(graphics)
> ispl <- interpSpline( women$height, women$weight )
> bspl <- backSpline( ispl )
> plot( bspl ) # plots over the range of the knots
> points( women$weight, women$height )
>
>
>
>
>
> dev.off()
null device
1
>