ssr(formula, rk, data = sys.parent(), subset, weights = NULL,
correlation = NULL, family = "gaussian", scale = FALSE,
spar = "v", varht = NULL, limnla = c(-10, 3), control = list())
formula
object, with the response on the left of a $\mbox{\textasciitilde}$ operator, and
the bases of the null space $H_0$, separated by + operators, on the right.
Thus it specifies the parametric part of the model that contains functirk
. If this option is not specified,
the variables should be on the search list. Missing values are not allowed.ssr
is returned. See ssr.object for details.
Note: output from earlier versions of ssr
shows incorrect smoothing spline parameters for SSANOVA, which is corrected in this version.smooth.spline
is more efficient.
Components can be extracted using extractor functions predict, deviance, residuals, and summary. The output can be modified using update.deviance.ssr
, hat.ssr
, plot.ssr
,
predict.ssr
, print.ssr
,
ssr.object
, summary.ssr
, smooth.spline
.library(MASS)
# fitting a cubic spline
fit1<- ssr(accel~times, data=mcycle, scale=T, rk=cubic(times))
summary(fit1)
# using GML to choose the smoothing parameter
fit2<- update(fit1, spar="m")
data(acid)
## fit an additive thin plate spline
acid.fit<- ssr( ph ~ t1 + x1 + x2, rk = list(tp(t1), tp(list(x1, x2))),
data = acid, spar = "m", scale = FALSE)
acid.fit
Run the code above in your browser using DataLab