Learn R Programming

bdlim (version 0.5.0)

makebasis: Make orthonomal basis for weight functions

Description

Make orthonomal basis for weight functions

Usage

makebasis(exposure, df)

Value

A matrix with orthonormal basis expansions of exposure time. The matrix is T x df. These have the span of natural splines with an intercept and df degrees of freedom.

Arguments

exposure

Matrix of repeated measures of exposure that is n x T where n is the number of observations and T is the number of time points.

df

Degrees of freedom (including intercept) for the natural spline basis to be used.

Examples

Run this code
  B <- makebasis(sbd_bdlim[,paste0("pm25_",1:37)], df=4)

Run the code above in your browser using DataLab