survTP {TPmsm} | R Documentation |
Create a survTP object
Description
Creates a ‘survTP’ object, usually used as input to other functions.
Usage
survTP(time1, event1, Stime, event, ...)
is.survTP(x)
Arguments
time1 |
Time of the transition into state 2, state 3 or censoring time. |
event1 |
Indicator of transition into state 2 or state 3; 0 if the transition time is censored and 1 otherwise. |
Stime |
The total time of the process. |
event |
Censoring indicator of the total time of the process; 0 if the total time is censored and 1 otherwise. |
... |
Any number of covariates can be specified. |
x |
Any R object. |
Value
An object of class ‘survTP’.
‘survTP’ objects are implemented as a single element list
data |
a data.frame
with |
In the case of is.survTP
, a logical value TRUE
if x
inherits from class ‘survTP’, otherwise FALSE
.
Author(s)
Artur Araújo, Javier Roca-Pardiñas and Luís Meira-Machado
References
Araújo A, Meira-Machado L, Roca-Pardiñas J (2014). TPmsm: Estimation of the Transition Probabilities in 3-State Models. Journal of Statistical Software, 62(4), 1-29. doi:10.18637/jss.v062.i04
Examples
data(bladderTP);
bladderTP_obj <- with( bladderTP, survTP(time1, event1, Stime, event) );
#or
bladderTP_obj <- survTP(bladderTP$time1, bladderTP$event1, bladderTP$Stime,
bladderTP$event);
data(heartTP);
heartTP_obj <- with( heartTP, survTP(time1, event1, Stime, event, age=age) );
#or
heartTP_obj <- survTP(heartTP$time1, heartTP$event1, heartTP$Stime,
heartTP$event, age=heartTP$age);