nevents {survidm} | R Documentation |
Count number of observed transitions.
Description
Given a dataset of class "survIDM", this function counts the number of observed transitions in the multi-state model.
Usage
nevents(dataidm, state.names=NULL)
Arguments
dataidm |
A dataframe including at least four columns named
|
state.names |
Names for the transition states. If |
Details
The colums of the dataset needs to have the format of class "survIDM",
which holds the transition matrix of the multi-state model. The arguments time1
and Stime
must be numeric and nonnegative; event1
and event
must
be 0 or 1 if numeric and TRUE or FALSE if logical. Stime
must be greater or
equal to argument arguments time1
. Stime
and time1
must be equal
when argument event1
equals 0 or FALSE. Argument event
must be equal
to 0 or FALSE when argument event1
equals 0 or FALSE. When arguments
Stime
and time1
are equal and argument event1
equals 1 or
TRUE, argument event
must be equal to 1 or TRUE.
Author(s)
Luis Meira-Machado, Marta Sestelo and Gustavo Soutinho.
References
L. Meira-Machado, J. de Una-Alvarez, C. Cadarso-Suarez, and P. Andersen. Multi-state models for the analysis of time to event data. Statistical Methods in Medical Research, 18:195-222, 2009.
J. de Una-Alvarez and L. Meira-Machado. Nonparametric estimation of transition probabilities in the non-markov illness-death model: A comparative study. Biometrics, 71(2):364-375, 2015.
L. Meira-Machado and M. Sestelo. Estimation in the progressive illness-death model: A nonexhaustive review. Biometrical Journal, 2018.
Examples
nevents(colonIDM)
nevents(colonIDM, c('State0','State1', 'State2'))