frob

Fit an M-type smoothing spline to the input data.

DESCRIPTION:

USAGE:

frob(xx, yy, lambda, chuber=1.345, n.orig=length(xx), compteurmax=500., mytol=.Machine$double.eps^0.25, Smat=F)

REQUIRED ARGUMENTS:

xx
Values of the predictor variable.
yy
Response variable, of the same length as xx.
lambda
Smoothing parameter corresponding to the formulation of the reference paper. Note that it is not the same parameter as spar in the function smooth.spline() in S-PLUS. In fact spar = (lambda * sigma)/epsiprime/(max(xx) - min(xx))^3.

OPTIONAL ARGUMENTS:

chuber
Tuning constant of the Huber psi function. The default value is set to 1.345.
n.orig
Number of original observations. This parameter controls the weighting procedure when there are ties and is used to assess the condition sum(w)=n.orig in my.smooth.spline(). The default is set to length(xx).
compteurmax
Maximum number of iterations of the fitting algorithm.
mytol
Convergence threshold.
Smat
Logical value indicating wheter the whole smoother matrix has to be computed. The default is F. In this case, only the diagonal elements of the smoother matrix are computed. Moreover, the RCp criterion is not computed, and only the cross-validation score is given.

VALUE:

A list is returned with the following components:
estim
The fitted M-type smoothing spline corresponding to the ordered xx.
sigmahat
The associated estimation of scale (Huber Proposal 2).
sigma.ext
The external estimation of scale used in the construction of RCp (if Smat=T).
x
The ordered distinct values of xx.
yin
The y-values used at the unique x values (weighted averages of the input yy).
myo
Value of match(xx, unique(sort(xx))). This allow one to recover the vector of fitted values with respect to the original xx by considering estim[myo].
weights
weights used in the fit. This has the same length as xx, and in the case of ties, will consist of the accumulated weights at each unique value of x.
Smatrix
The smoother matrix S, if Smat=T.
diagS
The diagonal elements of the smoother matrix S.
epsiprime
The expectation of the derivative of the psi function.
epsicarre
The expectation of the squared psi function.
cv.score
The value of the robust cross-validation criterion.
RCp
The value of the robust Cp criterion, if Smat=T.
chuber
The tuning constant used for the fit.
lambda
The smoothing parameter used for the fit.

REFERENCES:

Eva Cantoni and Elvezio Ronchetti, "Resistant Selection of the Smoothing Paramater for Smooting Splines", 2001, Statistics and Computing, 11, 141-146.

SEE ALSO:

opt.cv, opt.RCp.

EXAMPLES:


myfit<- frob(myx,myy,lambda=0.01) 
motif() 
plot(myx,myy) 
lines(myfit$x,myfit$estim)