This function is a wrapper for smooth.spline, which fits
a cubic smoothing spline to the supplied data, but includes the option
to remove NA values, and returns values in the original order.
Arguments
- x
A
vectorgiving the values of the predictor variable.- y
A
vectorgiving the values of the response variable. Ifyis missing orNULL, the responses are assumed to be specified byx, withxthe indexvector.- ...
Additional arguments passed to smooth.spline.
- na.rm
logicalwhetherNA's should be removed before analyzing. Required to beTRUEif anyxoryvalues areNA.
Value
Similar to smooth.spline, an object of class
"smooth.spline" with many components. Differs in that
x, y, and w have NA's at any indices where x or y were
NA in the inputs, and x, y, and w are returned to match the input
x in order and length
Details
See smooth.spline