bp {event} | R Documentation |
Create a Vector of Cumulative Numbers of Previous Events for a Point Process (Birth Processes)
Description
bp
creates a vector of length sum(y)
of cumulative
numbers of previous events for each individual for use in fitting
birth processes with ehr
. Add one if the process starts
at an event.
Usage
bp(y, id, censor=1)
Arguments
y |
Vector of times. |
id |
Vector of corresponding individual identifiers for who had which sequence of times. |
censor |
Vector of censoring indicators. |
Value
bp
creates a vector of length sum(y)
of cumulative
numbers of previous events for each individual for use in fitting
birth processes with ehr
. Add one if the process starts
at an event.
Author(s)
J.K. Lindsey
See Also
ehr
, ident
, pp
, tccov
,
tpast
, ttime
, tvcov
.
Examples
y <- c(5,3,2,4)
i <- c(1,1,2,2)
birth <- bp(y, i)
birth
[Package event version 1.1.1 Index]