powered by
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.
tvcov
sum(y)
ehr
tvcov(y, x, tx)
Vector of times.
Vector covariate.
Vector of times at which x changes.
bp, ehr, ident, pp, tccov, tpast, ttime.
bp
ident
pp
tccov
tpast
ttime
# NOT RUN { 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 # }
Run the code above in your browser using DataLab