tvcov: Create a Vector of Time-varying Covariates for a Point...

Description Usage Arguments Value Author(s) See Also Examples

Description

tvcov creates a vector of length sum(y) of time-varying covariates for use with ehr. It may also be used to create weight vectors.

Usage

1
tvcov(y, x, tx)

Arguments

y

Vector of times.

x

Vector covariate.

tx

Vector of times at which x changes.

Value

tvcov creates a vector of length sum(y) of time-varying covariates for use with ehr. It may also be used to create weight vectors.

Author(s)

J.K. Lindsey

See Also

bp, ehr, ident, pp, tccov, tpast, ttime.

Examples

1
2
3
4
5
y <- c(5,3,2,4)
x <- c(1,2,2,1,2,2,1)
tx <- c(2,3,1,2,2,2,2)
zcov <- tvcov(y, x, tx)
zcov

swihart/event documentation built on May 30, 2019, 9:38 p.m.