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

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
tpast(y)

Arguments

y

Vector of times.

Value

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

Author(s)

J.K. Lindsey

See Also

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

Examples

1
2
3
y <- c(5,3,2,4)
ptime <- tpast(y)
ptime

Example output

Loading required package: rmutil

Attaching package: 'rmutil'

The following object is masked from 'package:stats':

    nobs

The following objects are masked from 'package:base':

    as.data.frame, units

 [1] 1 2 3 4 5 1 2 3 1 2 1 2 3 4

event documentation built on May 2, 2019, 4:07 a.m.