tccov: Create a Vector of Time-constant Covariates for a Point...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ehr.r

Description

tccov creates a vector of length sum(y) of time-constant covariates for use with ehr. id must be numbered consecutively. x must have one value for each distinct id,

Usage

1
tccov(y, x, id)

Arguments

y

Vector of times.

x

Vector covariate.

id

Vector of corresponding individual identifiers for who had which sequence of times.

Value

tccov creates a vector of length sum(y) of time-constant covariates for use with ehr. id must be numbered consecutively. x must have one value for each distinct id,

Author(s)

J.K. Lindsey

See Also

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

Examples

1
2
3
4
5
y <- c(5,3,2,4)
id <- c(1,1,2,2)
x <- c(5.2,3.1)
xcov <- tccov(y, x, id)
xcov

swihart/event documentation built on May 26, 2017, 11:09 p.m.