Learn R Programming

event (version 1.1.2)

ttime: Create a Vector of Total Time Elapsed for each Individual for a Point Process

Description

ttime creates a vector of length sum(y) of times since each individual began for use with ehr.

Usage

ttime(y, id)

Value

ttime creates a vector of length sum(y) of times since each individual began for use with ehr.

Arguments

y

Vector of times.

id

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

Author

J.K. Lindsey

See Also

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

Examples

Run this code
y <- c(5,3,2,4)
id <- c(1,1,2,2)
itime <- ttime(y, id)
itime

Run the code above in your browser using DataLab