lagIndex: Extract list of indices of lag terms

Description Usage Arguments See Also Examples

Description

Intended for use in conjunction with the estimands functions. For each set of distributed lag terms in the model, find and return the integer indices that would extract the corresponding coefficients from the vector returned by vcoef.

Usage

1
2
3
4
lagIndex(object, ...)

## S4 method for signature 'dlMod'
lagIndex(object, .fixed = TRUE, ...)

Arguments

object

a fitted model object

.fixed

a logical flag (default .fixed = TRUE) to indicate whether the fixed/unpenalized DL term coefficient indices should be included or not.

See Also

vcoef

Examples

1
2
3
4
5
6
7
8
data (simdata)

## Setup distance count matrix and corresponding lag distances
X <- as.matrix(simdata[, -(1:3)])
lag <- seq(0.1, 10, length.out = ncol(X))

fit <- dlm(Y ~ Age + Gender + cr(lag, X), data = simdata)
vcoef(fit)[lagIndex(fit)[[1]]]

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