SMCtest {strata.MaxCombo}R Documentation

This function performs stratified Max-Combo test.

Description

This function performs stratified Max-Combo test.

Usage

SMCtest(
  time,
  event,
  group,
  stratum,
  alternative = c("two.sided", "less", "greater"),
  rho = c(0, 1, 1, 0),
  gamma = c(0, 0, 1, 1)
)

Arguments

time

a vector of event or censored times.

event

a vector with entries 0 or 1, indicating event occurrence (1) or time being censored (0).

group

a vector indicating treatment groups.

stratum

a vector of stratification factor.

alternative

choose from "two.sided", "less" or "greater" to determine which type of tests to conduct and calculate the corresponding p-values.

rho

a vector indicating different values of rho in Fleming-Harrington weight.

gamma

a vector indicating different values of gamma in Fleming-Harrington weight.

Value

A list with components:

z.list

a vector of z values calculated from all startified weighted log-rank tests under stratification method 1.

z.max

the z value that is the furthest away from 0 under stratification method 1.

cov

the covariance matrix of different startified weighted log-rank tests under stratification method 1.

pval

p-value of desired alternative test under stratification method 1.

z.list2

a vector of z values calculated from all startified weighted log-rank tests under stratification method 2.

z.max2

the z value that is the furthest away from 0 under stratification method 2.

cov2

the covariance matrix of different startified weighted log-rank tests under stratification method 2.

pval2

p-value of desired alternative test under stratification method 2.

z.list3

a vector of z values calculated from all startified weighted log-rank tests under stratification method 3.

z.max3

the z value that is the furthest away from 0 under stratification method 3.

cov3

the covariance matrix of different startified weighted log-rank tests under stratification method 3.

pval3

p-value of desired alternative test under stratification method 3.

References

Magirr, D. and Jiménez, J. (2023). Stratified modestly-weighted log-rank tests in settings with an anticipated delayed separation of survival curves. Biometrical Journal., 2023;65:2200126 doi: 10.1002/bimj.202200126

See Also

WLRtest

Examples

data(sim_data)
##load survival data
time <- sim_data$event_time
event <- sim_data$event_status
group <- sim_data$group
stratum <- sim_data$strata

##perform stratified max-combo test
SMCtest(time,event,group,stratum,alternative="two.sided",rho=c(0,1,1,0),gamma=c(0,0,1,1))


[Package strata.MaxCombo version 0.0.1 Index]