a list of variables that are the covariates that this
smooth is a function of.
the dimension of the basis used to represent the smooth term.
The default depends on the number of variables that the smooth is a
function of. k should not be less than the dimension of the
null space of the penalty for the term (see
null.space.dimension), but will be reset if
it is. See choose.k for further information.
indicates whether the term is a fixed d.f. regression
spline (TRUE) or a penalized regression spline (FALSE).
a two letter character string indicating the (penalized) smoothing basis to use.
(eg "tp" for thin plate regression spline, "cr" for cubic regression spline).
see smooth.terms for an over view of what is available.
The order of the penalty for this term (e.g. 2 for
normal cubic spline penalty with 2nd derivatives when using
default t.p.r.s basis). NA signals
autoinitialization. Only some smooth classes use this. The "ps"
class can use a 2 item array giving the basis and penalty order separately.
a numeric or factor variable of the same dimension as each covariate.
In the numeric vector case the elements multiply the smooth, evaluated at the corresponding
covariate values (a ‘varying coefficient model’ results). For the numeric by variable case the
resulting smooth is not usually subject to a centering constraint (so the by variable should
not be added as an additional main effect).
In the factor by variable case a replicate of the smooth is produced for
each factor level (these smooths will be centered, so the factor usually needs to be added as
a main effect as well). See gam.models for further details. A by variable may also be a matrix
if covariates are matrices: in this case implements linear functional of a smooth
(see gam.models and linear.functional.terms for details).
Any extra information required to set up a particular basis. Used
e.g. to set large data set handling behaviour for "tp" basis.
A label or integer identifying this term in order to link its smoothing
parameters to others of the same type. If two or more terms have the same
id then they will have the same smoothing paramsters, and, by default,
the same bases (first occurance defines basis type, but data from all terms
used in basis construction). An id with a factor by variable causes the smooths
at each factor level to have the same smoothing parameter.
any supplied smoothing parameters for this term. Must be an array of the same
length as the number of penalties for this smooth. Positive or zero elements are taken as fixed
smoothing parameters. Negative elements signal auto-initialization. Over-rides values supplied in
sp argument to gam. Ignored by gamm.
The function does not evaluate the variable arguments. To use this function to specify use of
your own smooths, note the relationships between the inputs and the output object and see the example
A class xx.smooth.spec object, where xx is a basis identifying code given by
the bs argument of s. These smooth.spec objects define smooths and are turned into
bases and penalties by smooth.construct method functions.
The returned object contains the following items:
An array of text strings giving the names of the covariates that
the term is a function of.
The dimension of the basis used to represent the smooth.
TRUE if the term is to be treated as a pure regression
spline (with fixed degrees of freedom); FALSE if it is to be treated
as a penalized regression spline
The dimension of the smoother - i.e. the number of
covariates that it is a function of.
The order of the t.p.r.s. penalty, or 0 for
auto-selection of the penalty order.
is the name of any by variable as text ("NA" for none).
A suitable text label for this smooth term.
The object passed in as argument xt.
An identifying label or number for the smooth, linking it to other
smooths. Defaults to NULL for no linkage.
array of smoothing parameters for the term (negative for
auto-estimation). Defaults to NULL.