Description Usage Arguments Value Methods (by class) See Also Examples
Estimate and make inference on the overall and component-wise restricted mean times in favor of treatment.
1 2 3 4 5 6 7 |
... |
Further arguments. |
id |
A vector of id variable. |
time |
A vector of follow-up times. |
status |
For |
trt |
A vector of binary variable for treatment group. |
type |
|
formula |
A formula object. For multistate data, use |
data |
A data frame, which contains the variables names in the formula. |
An object of class rmtfit
. See rmtfit.object
for details.
default
: Default
formula
: Formula
rmtfit.object
,
summary.rmtfit
, plot.rmtfit
, bouquet
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #######################
# Multistate outcome #
#######################
# load the colon cancer trial data
library(rmt)
head(colon_lev)
# fit the data
obj=rmtfit(ms(id,time,status)~rx,data=colon_lev)
# print the event numbers by group
obj
# summarize the inference results for tau=7.5 years
summary(obj,tau=7.5)
############################
# Recurrent event outcome #
############################
# load the HF-ACTION trial data
library(rmt)
head(hfaction)
# fit the data
obj=rmtfit(rec(patid,time,status)~trt_ab,data=hfaction)
# print the event numbers by group
obj
# summarize the inference results for tau=3.5 years
summary(obj,tau=3.5,Kmax=4) # aggregating results for recurrent-event
# frequency >=4.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.