Description Usage Arguments Value Author(s) References Examples

View source: R/rmst2adapt-ver001.R

Performs the procedure proposed by Horiguchi et al. (2018) <doi:10.1002/sim.7661>. The method specifies a set of truncation time points tau's for calculating restricted mean survival times (RMST), performs testing for equality, and estimates the difference in RMST between two groups at the specified tau's. Multiplicity by specifying several tau's is taken into account in this procedure.

1 2 | ```
rmst2adapt(indata, tau_star, method="perturbation", nmethod=100000,
seed=NULL, test="2_side", conf.int=0.95)
``` |

`indata` |
A data matrix (data frame). The 1st column is time-to-event variable, the 2nd column is event indicator (1=event, 0=censor), and the 3rd column is the treatment indicator (1=treatment, 0=control). No missing values are allowed in this data matrix. |

`tau_star` |
A vector indicating a set of tau's. All elements in |

`method` |
A name of the resampling method. It supports |

`nmethod` |
A number of iterations for the resampling. Recommended to specify at least 100000 (default) or larger. |

`seed` |
An integer value, used for the random number generation in the resampling procedures. Default is |

`test` |
Specify |

`conf.int` |
Specify confidence coefficient for confidence bands of the differences in RMST. Default is |

an object of class rmst2adapt.

`method` |
The resampling method used in the analyses |

`nmethod` |
The number of iterations for the resampling |

`test` |
The type of test used in the analyses |

`candidate_taus` |
The set of tau's used in the analyses |

`observed_z` |
The observed test statistic Z_star |

`p_value` |
The p-value of testing for equality |

`conf_band` |
The difference in RMST between two groups at the specified tau's |

`selected_tau` |
The value of tau selected to summarize the treatment effect |

Miki Horiguchi, Hajime Uno

Horiguchi M, Cronin A, Takeuchi M, Uno H. A flexible and coherent test/estimation procedure based on restricted mean survival times for censored time-to-event data in randomized clinical trials. Statistics in Medicine 2018. doi:10.1002/sim.7661.

1 2 3 4 5 6 7 8 | ```
#--- sample data ---#
data = rmst2adapt.sample.data()
nmethod = 100 #This is only for example use.
#Recommended to specify at least 100000 (default) or larger.
a = rmst2adapt(indata=data, tau_star=seq(6,12,2), method="perturbation",
nmethod=nmethod, test="2_side")
print(a)
``` |

```
<Test result>
Candidate tau's: 6 8 10 12
P-value: 0.81
<Treatment effect estimation>
Selected tau: 6
RMST(arm1) RMST(arm0)
4.985 4.885
RMST(arm1-arm0) lower 0.95 upper 0.95
0.100 -0.367 0.568
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.