smartsizer (version 1.0.0)

computePower: Compute the Power in a SMART

Description

Computes the power in an arbitrary SMART design with the goal of identifying optimal embedded dynamic treatment regime (EDTR). The power is the probability of excluding from the set of best EDTRs all EDTRs which are inferior to the best EDTR by min_Delta or more.

Usage

computePower(V, Delta, min_Delta, alpha = 0.05, sample_size)

Arguments

V

The covariance matrix of mean EDTR estimators.

Delta

The vector of effect sizes with a zero indicating the best EDTR.

min_Delta

The minimum desired detectable effect size.

alpha

The Type I error rate for not including the true best EDTR.

sample_size

The sample size.

Value

The power to exclude from the set of best EDTR all EDTR which are inferior to the best EDTR by min_Delta or more.

Details

The true best EDTR is included in the set of best with probability at least 1-alpha. Multiple comparisons are adjusted for using the Multiple Comparison with the Best methodology.

See Also

computeSampleSize

Examples

Run this code
# NOT RUN {
  
# }
# NOT RUN {
  V <- rbind(c(1, 0.3, 0.3, 0.3),
             c(0.3, 1, 0.3, 0.3),
             c(0.3, 0.3, 1, 0.3),
             c(0.3, 0.3, 0.3, 1))

  #Compute power to exclude EDTRs inferior to the best by 0.3 or more
  #The first DTR is best and the other three are inferior by 0.2, 0.6, and 0.3
  #The best DTR is included with probability greater than or equal to 95%.
  computePower(V,
               Delta = c(0, 0.2, 0.6, 0.3),
               min_Delta = 0.3,
               sample_size = 200)
  
# }

Run the code above in your browser using DataLab