treatment_effect_size {preference}R Documentation

Treatment Effect Back Calculation

Description

Calculates the treatment effect that can be detected given a desired study power and overall study sample size for the two-stage randomized design

Usage

treatment_effect_size(
  N,
  power,
  sigma2,
  alpha = 0.05,
  theta = 0.5,
  xi = 1,
  nstrata = 1
)

Arguments

N

overall study sample size.

power

desired study power. Should be numeric value between 0 and 1.

sigma2

variance estimate. Should be positive numeric values. If study is stratified, should be vector of within-stratum variances with length equal to the number of strata in the study.

alpha

desired type I error rate.

theta

proportion of patients assigned to choice arm in the initial randomization. Should be numeric value between 0 and 1 (default=0.5).

xi

a numeric vector of the proportion of patients in each stratum. Length of vector should equal the number of strata in the study and sum of vector should be 1. All vector elements should be numeric values between 0 and 1. Default is 1 (i.e. unstratified design).

nstrata

number of strata. Default is 1 (i.e. unstratified design).

Examples

treatment_effect_size(N=300, power=0.9, sigma2=c(1,0.8), xi=c(0.3,0.7), 
                      nstrata=2)

[Package preference version 1.1.6 Index]