logbin.smooth
model formulae. The function does not evaluate a smooth - it exists purely to help
set up a model using smooths.B(..., knots = NULL, knot.range = 0:5)
Iso(...)
gam
,
smooths that are functions of more than one variable are not supported.knots
is not specified, a vector containing a series of non-negative
integers denoting the number of interior knots for which the model will be fit.
These are placed at evenly-spaced quantiles of the observed covariate values."B.smooth"
(for B
) or
"Iso.smooth"
(for Iso
), which is a list with
the following elements:...
argument."x"
it will be "B(x)"
or
"Iso(x)"
.NA
for Iso
.NA
for Iso
.logbin.smooth.design
, which
constructs the actual basis functions.
B
is used to specify an order-3 B-spline basis (which can be
restricted to be monotonically non-decreasing via the
mono
argument in logbin.smooth
). If
length(knot.range) > 1
, models with each of the
specified number of interior knots will be fit, and the model
with the best (smallest) aic.c
will be returned.
Iso
is used to specify an isotonic basis, designed
such that the resulting function has non-negative
increments at each observed covariate value. When
Iso
is used, the resulting function will always be
monotonically non-decreasing, regardless of the value of
mono
.logbin.smooth
,
logbin.smooth.design
s
performs a similar function in the mgcv
package.## See example(logbin.smooth) for an example of specifying smooths in model
## formulae.
Run the code above in your browser using DataLab