Learn R Programming

event (version 1.1.2)

tpast: Create a Vector of Times Past since Previous Events for a Point Process

Description

tpast creates a vector of length sum(y) of times since the immediately preceding event occurred for use with ehr.

Usage

tpast(y)

Value

tpast creates a vector of length sum(y) of times since the immediately preceding event occurred for use with ehr.

Arguments

y

Vector of times.

Author

J.K. Lindsey

See Also

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

Examples

Run this code
y <- c(5,3,2,4)
ptime <- tpast(y)
ptime

Run the code above in your browser using DataLab