Learn R Programming

vows (version 0.5)

sf: Defining smooth functions in semiparametric model formulae

Description

This function is called by semipar.mp to define B-spline smooths.

Usage

sf(argvals, effect = NULL, k = 10, norder = 4, pen.order = 2, range.basis = NULL, knots = "quantile")

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.