Description Usage Arguments References Examples
View source: R/preference-trial.r
Create a Preference Trial
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | preference.trial(
pref_ss,
pref_effect,
selection_ss,
selection_effect,
treatment_ss,
treatment_effect,
sigma2,
pref_prop,
choice_prop = 0.5,
stratum_prop = 1,
alpha = 0.05,
k = 1
)
|
pref_ss |
the sample size of the preference arm. |
pref_effect |
the effect size of the preference arm (delta_pi). |
selection_ss |
the sample size of the selection arm. |
selection_effect |
the effect size of selection arm (delta_nu). |
treatment_ss |
the sample size of the treatment arm . |
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).. |
Turner RM, et al. (2014). "Sample Size and Power When Designing a Randomized Trial for the Estimation of Treatment, Selection, and Preference Effects." Medical Decision Making, 34:711-719. (PubMed)
Cameron B, Esserman D (2016). "Sample Size and Power for a Stratified Doubly Randomized Preference Design." Stat Methods Med Res. (PubMed)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Unstratified single trial.
preference.trial(pref_ss=100, pref_effect=1, selection_ss=100,
selection_effect=1, treatment_ss=100, treatment_effect=1,
sigma2=1, pref_prop=0.6)
# Stratified single trial.
preference.trial(pref_ss=100, pref_effect=1, selection_ss=100,
selection_effect=1, treatment_ss=100, 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)))
# Multiple trials unstratified.
preference.trial(pref_ss=100, pref_effect=seq(0.1, 2, by=0.5),
selection_ss=100, selection_effect=1, treatment_ss=100,
treatment_effect=1, sigma2=1, pref_prop=0.6)
# Multiple, stratified trials.
preference.trial(pref_ss=100, pref_effect=seq(0.1, 2, by=0.5),
selection_ss=100, selection_effect=1, treatment_ss=100,
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)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.