Description Usage Arguments Value Examples
Function for fitting and testing two Kaplan Meier curves S_1, S_2 at t_0 concerning the hypotheses of non-inferiority
H_0:S_1(t_0)-S_2(t_0)≥q ε\ vs.\ H_1: S_1(t_0)-S_2(t_0)< ε
or equivalence
H_0:|S_1(t_0)-S_2(t_0)|≥q ε\ vs.\ H_1: |S_1(t_0)-S_2(t_0)|< ε.
1 | test_nonpar(epsilon, alpha, t0, type, data_r, data_t, plot = TRUE)
|
epsilon |
non-inferiority/equivalence margin |
alpha |
significance level |
t0 |
time point of interest |
type |
type of the test. "ni" for non-inferiority, "eq" for equivalence test |
data_r, data_t |
datasets containing time and status for each individual |
plot |
if TRUE, a plot of the two Kaplan Meier curves will be given |
A list containing the difference S_1(t_0)-S_2(t_0), the lower and upper (1-α)-confidence bounds, the chosen margin and significance level and the test decision. Further a plot of the curves is given.
1 2 3 4 5 6 7 | data(veteran)
veteran_r <- veteran[veteran$trt==1,]
veteran_t <- veteran[veteran$trt==2,]
alpha<-0.05
t0<-80
epsilon<-0.15
test_nonpar(epsilon=epsilon,alpha=alpha,t0=t0,type="eq",data_r=veteran_r,data_t=veteran_t)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.