| tvcov {event} | R Documentation |
Create a Vector of Time-varying Covariates for a Point Process
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
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
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
[Package event version 1.1.1 Index]