Arguments
argvals
a vector or matrix of covariates.
effect
predictor whose effect varies with respect to argvals
.
E.g., if the effect of diagnosis
varies with age
, use
sf(age, effect = diagnosis)
. Similar to argument by
in
s
. k
number of B-spline basis functions.
norder
order of B-splines: the default, 4
, gives cubic
B-splines.
pen.order
order of the penalty, i.e., of the derivative defining the
penalty.
range.basis
a numeric vector of length 2 defining the interval over
which the B-spline basis is created. If NULL
, set to the range of the
variable.
knots
knots placement method for B-spline smoothing. The default,
"quantile", places the knots at equally spaced quantiles of the data;
"equispaced" gives equally spaced knots.