This function reruns the desired wintime package method on a given number of permutations. This resampling method is recommended for the Expected win time (EWT) and Restricted mean survival in favor of treatment (RMT) methods.
perm(
type,
rmst_restriction,
model,
n,
m,
Time,
Delta,
trt,
cov,
z_ewtr,
z_comp,
resample_num,
seed
)
A vector of length resample_num containing the treatment effect estimates (for type='max' these are z-statistics) for each permutation.
A string value indicating the wintime package method that will run with resampling.
The RMT cutoff value (days).
A string value indicating the model used on observed data ('markov' or 'km').
The total number of trial participants.
The number of events in the hierarchy.
A m x n matrix of event times (days). Rows should represent events and columns should represent participants. Event rows should be in increasing order of clinical severity.
A m x n matrix of event indicators. Rows should represent events and columns should represent participants. Event rows should be in increasing order of clinical severity.
A numeric vector of treatment arm indicators (1 for treatment, 0 for control).
A n x p matrix of covariate values, where p is the number of covariates. Rows should represent participants and columns should represent covariate values.
The Z-statistic of EWTR.
The Z-statistic of the composite event approach.
The number of desired permutations.
The seed used for random number generation.