| Survr | R Documentation |
Creates a survival recurrent object, usually used as the response variable in a model formula.
Survr(id, time, event)
is.Survr(x)
id |
identifier of each subject; the same value for all the recurrent times of a subject. |
time |
gap times of recurrence. The last time of each subject is censored. |
event |
status indicator: 1 = recurrence, 0 = censored. Only these values are accepted. |
x |
any R object. |
Each subject must contribute one censored time (its last, incomplete
gap time), so id must have exactly as many distinct values as there
are zeros in event. Rows are assumed to be grouped by subject and in
chronological order within subject.
An object of class Survr, implemented as a matrix with
columns id, time and event.
is.Survr() returns TRUE if x inherits from class Survr and
FALSE otherwise.
survfitr(), psh_fit(), wc_fit(), mlefrailty_fit()
data(MMC)
x <- Survr(MMC$id, MMC$time, MMC$event)
is.Survr(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.