cics_explicit_smooth {ICSsmoothing} | R Documentation |
Smooth given data set by k-component non-uniform clamped interpolating spline (NcICS).
Description
cics_explicit_smooth
constructs the non-uniform clamped interpolating spline with k
components that smoothes
given data set {(xx[i],yy[i]), i=1..length(xx)}
.
Usage
cics_explicit_smooth(
xx,
yy,
uu,
clrs = c("blue", "red"),
d,
xlab = NULL,
ylab = NULL,
title = NULL
)
Arguments
xx |
a vector of data set's |
yy |
a vector of data set's |
uu |
a vector of arbitrary nodes, based on which we construct the smoothing spline. uu[1] and uu[length(uu)] must be equal to xx[1] and xx[length(xx)], respectively. |
clrs |
a vector of colours that are used alternately to plot the graph of spline's components. |
d |
a vector (optional parameter) that contains two values of derivative, in the first and the last
node from |
xlab |
a title (optional parameter) for the |
ylab |
a title (optional parameter) for the |
title |
a title (optional parameter) for the plot. |
Value
a list with components
est_spline_coeffs |
|
est_spline_polynomials |
list of string representations of smoothing NcICS. |
est_gamma |
vector of estimated smoothing spline's coefficients (function values and exterior-node derivatives). |
aux_BF |
A basis function of the spline |
aux_tridiag_inverse |
An inverse of the tridiagonal matrix used for spline derivatives construction |
aux_M |
An estimation matrix used to compute |
Examples
cics_explicit_smooth(
xx = CERN$x,
yy = CERN$y,
d = c(0, 1),
uu = c(1, sort(runif(20,1,277)), 277),
xlab = "X axis",
ylab = "Y axis"
)
yy <- c(1, 2, 3, 4, 3, 2, 2, 3, 5, 6, 7, 6, 5, 5, 4, 3, 2, 1, 0)
xx <- c(1:length(yy))
uu <- c(1,7,10,19)
sp <- cics_explicit_smooth(xx,yy,uu)
### We can change the derivatives at the end nodes:
sp <- cics_explicit_smooth(xx,yy, uu, d=c(3,-7/10))
### CERN:
uu <- c(1, 15, 26, 63, 73, 88, 103, 117, 132, 200, 203, 219, 258, 277)
sp <- cics_explicit_smooth(
xx = CERN$x,
yy = CERN$y,
d = c(1, 0),
uu
)