pt_from_power: Design Preference Trials with Power Constraint(s)

Description Usage Arguments Examples

View source: R/preference-trial.r

Description

Create a set of preference trials with specified power. The power parameter guarantees that the power will be at least what is specified for each of the three arms.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
pt_from_power(
  power,
  pref_effect,
  selection_effect,
  treatment_effect,
  sigma2,
  pref_prop,
  choice_prop = 0.5,
  stratum_prop = 1,
  alpha = 0.05,
  k = 1
)

Arguments

power

the desired power(s) for the trial(s)

pref_effect

the effect size of the preference arm (delta_pi).

selection_effect

the effect size of selection arm (delta_nu).

treatment_effect

the sample size of the treatment arm (delta_tau)

sigma2

the variance estimate of the outcome of interest. This value 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.

pref_prop

the proportion of patients preferring treatment 1. This value should be between 0 and 1 (phi).

choice_prop

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

stratum_prop

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) (xi).

alpha

the desired type I error rate (default 0.05).

k

the ratio of treatment A to treatment B in the random arm (default 1)..

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Unstratified trials with power constraints.
pt_from_power(power=seq(.1, 0.8, by=0.1), pref_effect=1, selection_effect=1, 
  treatment_effect=1, sigma2=1, pref_prop=0.6)

# Stratified trials with power constraints. Note that the proportion
# of patients in the choice arm (choice prop) is fixed for all strata.
pt_from_power(power=seq(0.1, 0.8, by=0.1), pref_effect=1, 
  selection_effect=1, treatment_effect=1,
  sigma2=list(c(1, 0.8)), pref_prop=list(c(0.6, 0.3)),
  choice_prop=0.5, stratum_prop=list(c(0.3, 0.7)))

# or...

pt_from_power(power=seq(0.1, 0.8, by=0.1), pref_effect=1, 
  selection_effect=1, treatment_effect=1,
  sigma2=c(1, 0.8), pref_prop=c(0.6, 0.3),
  choice_prop=0.5, stratum_prop=c(0.3, 0.7))

kaneplusplus/preference documentation built on Sept. 12, 2020, 12:37 p.m.