SMART
program. The ridge
functions can be smooth functions fitted either by the non-parametric
super smoother or by smoothing splines. Methods are supplied for
print
,
summary
,
plot
and
predict
.
ppr(formula, data=sys.parent(), weights, subset, na.action, contrasts=NULL, ww=rep(1,q), nterms, max.terms=nterms, optlevel=2, sm.method=c("supsmu", "spline", "gcvspline"), bass=0, span=0, df=5, gcvpen=1) ppr(x, y, weights=rep(1,n), ww=rep(1,q), nterms, max.terms=nterms, optlevel=2, sm.method=c("supsmu", "spline", "gcvspline"), bass=0, span=0, df=5, gcvpen=1)
formula
in the code.)
formula
are
preferentially to be taken.
i
and responses
j
of
w_i ww_j (y_ij - fit_ij)^2
divided by the sum of
w_i
.
NA
s are found. The
default action is for the procedure to fail. An alternative is
na.omit
, which leads to rejection of cases with missing values on
any required variable. (NOTE: If given, this argument must be named.)
supsmu
. The alternatives are to use
the smoothing spline code underlying
smooth.spline
, either with a
specified (equivalent) degrees of freedom for each ridge function, or
to allow the smoothness to be chosen by GCV.
supsmu
); the range of values is 0 to 10, with larger values
resulting in increased smoothing.
supsmu
). The default,
0
,
results in automatic span selection by local cross validation.
span
can also take a value in
(0, 1]
.
sm.method
is
"spline"
specifies the smoothness of each ridge
term via the requested equivalent degrees of freedom.
sm.method
is
"gcvspline"
this is the penalty used in the GCV
selection for each degree of freedom used.
nterms
max.terms
max.terms
. Will be invalid (and zero) for less than
nterms
.
df
sm.method
is
"spline"
or
"gcvspline"
the equivalent number of
degrees of freedom for each ridge term used.
ys
to have unit total weighted sum of squares.
q > 1
q > 1
The basic method is given by Friedman (1984), and is essentially the
same code used by
ppreg
. The code is extremely sensitive to the
compiler used, and this version uses double precision to try to reduce
differences between machines. The differences are the ability to use
spline smoothers and the interface which should be much easier to use.
The algorithm first adds up to
max.terms
ridge terms one at a time;
it will use less if it is unable to find a term to add that makes
sufficient difference. It then removes the least "important" term at
each step until
nterm
terms are left. The levels of optimization
differ in how thoroughly the models are refitted during this process.
At level 0 the existing ridge terms are not refitted. At level 1 the
projection directions are not refitted, but the ridge functions and
the regression coefficients are. Levels 2 and 3 refit all the terms
and are equivalent for one response; level 3 is more careful to
re-balance the contributions from each regressor at each step and so
is a little less likely to converge to a saddle point of the sum of
squares criterion.
There is a limit of 2500 rows when using spline-based methods.
Friedman, J. H. and Stuetzle, W. (1981)
Projection pursuit regression.
Journal of the American Statistical Association
76, 817-823.
Friedman, J. H. (1984)
SMART User's Guide.
Laboratory for Computational Statistics, Stanford University Technical
Report No. 1.
attach(rock) rock1 <- data.frame(area=area/10000, peri=peri/10000, shape=shape, perm=perm) detach() rock.ppr <- ppr(log(perm) ~ area + peri + shape, data=rock1, nterms=2, max.terms=5) rock.ppr summary(rock.ppr) par(mfrow=c(1,2), pty="s") plot(rock.ppr) plot(update(rock.ppr, bass=5)) plot(update(rock.ppr, sm.method="gcv", gcvpen=2))