Description Usage Arguments Details Value References See Also Examples
Returns an object of class "smooth.Pspline"
which is a natural
polynomial smooth of the input data of order fixed by the user.
1 2 3 
x 
values of the predictor variable. These must be strictly increasing,
and there must be at least

y 
one or more sets of response variable values. If there is one
response variable, 
w 
vector of positive weights for smoothing of the same length as 
norder 
the order of the spline. 
df 
a number which specifies the degrees of freedom = trace(S). Here S is
the implicit smoothing matrix. 
spar 
the usual smoothing parameter for smoothing splines, which is the
coefficient of the integrated squared derivative of order 
cv 
logical: should ordinary crossvalidation be used (true) or generalized crossvalidation. 
method 
the method for controlling the amount of smoothing.

... 
additional arguments to be passed to 
The method produces results similar to function smooth.spline
, but
the smoothing function is a natural smoothing spline rather than a Bspline
smooth, and as a consequence will differ slightly for norder = 2
over the
initial and final intervals.
The main extension is the possibility of setting the order of
derivative to be penalized, so that derivatives of any order can be
computed using the companion function predict.smooth.Pspline
. The
algorithm is of order N, meaning that the number of floating point
operations is proportional to the number of values being smoothed.
Note that the argument values must be strictly increasing, a condition
that is not required by smooth.spline
.
Note that the appropriate or minimized value of the smoothing parameter
spar
will depend heavily on the order; the larger the order, the smaller
this parameter will tend to be.
an object of class "smooth.Pspline"
is returned, consisting of the fitted
smoothing spline evaluated at the supplied data, some fitting criteria
and constants. This object contains the information necessary to evaluate
the smoothing spline or one of its derivatives at arbitrary argument
values using predict.smooth.Pspline
. The components of the returned
list are
norder 
the order of the spline 
x 
values of the predictor variable 
ysmth 
a matrix with 
lev 
leverage values, which are the diagonal elements of the smoother matrix S. 
gcv 
generalized crossvalidation criterion value 
cv 
ordinary crossvalidation criterion value 
df 
a number which supplies the degrees of freedom = trace(S) rather than a smoothing parameter. 
spar 
the final smoothing parameter for smoothing splines. This
is unchanged if 
call 
the call that produced the fit. 
Heckman, N. and Ramsay, J. O. (1996) Spline smoothing with model based penalties. McGill University, unpublished manuscript.
predict.smooth.Pspline
, smooth.spline
1 2 3 4 5 6 7 
Call:
smooth.Pspline(x = ux, y = tmp[, 1], w = tmp[, 2], method = method)
Smoothing Parameter (Spar): 366.8429
Equivalent Degrees of Freedom (Df): 2.428851
GCV Criterion: 29.54554
CV Criterion: 39.18787
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.