smoothing: Basis smoothing

Description Usage Arguments Details Value Functions References See Also Examples

Description

Constructs a set of basis vectors for distances between distributed lag points, and apply as a linear transformation of a concentration matrix.

Usage

1
2
3
cr(x, Z, ...)

sm(x, Z, ..., .fun = NULL)

Arguments

x

a vector of values to construct the basis from. Missing values are not allowed

Z

a covariate matrix (or object that can be coerced to a matrix) to apply the linear basis transformation to. length(x) should be the same as ncol(Z)

...

arguments to be passed to basis

Details

These functions are little more than convenient wrappers to the function basis and the SmoothLag class constructor. They are intended to simplify the task of specifying lag terms in a model formula. The functions compute a set of basis vectors for parameter x and applies this basis as a linear transformation of the covariate/concentration matrix parameter, Z. For example, if cr is used and Z is the identity matrix, the model fit will simply be the natural cubic spline of x.

Note that other basis extensions should always return an object that inherits from SmoothLag

Value

An S4 object of class SmoothLag.

Functions

References

Rupert D, Wand MP, & Carroll RJ (2003) Semiparametric Regression. New York: Cambridge University Press.

See Also

basis, SmoothLag

Examples

1
2
3
4
5
6
7
## load simulated data set and extract concentration matrix
data (simdata)
Conc <- simdata[, -(1:3)]  # First columns are Y, Age, and Gender

## radial lag (distance) each concentration was measured at
x <- seq(0.1, 10, length.out = ncol(Conc))
crb <- cr(x, Conc)

Biostatistics4SocialImpact/dlm documentation built on May 19, 2019, 10:47 p.m.