Description Usage Arguments References Examples

Calculates the sample size required to detect a given preference effect in a two-stage randomized clinical trial

1 2 | ```
preference_sample_size(power, phi, sigma2, delta_pi, delta_nu, alpha = 0.05,
theta = 0.5, xi = 1, nstrata = 1)
``` |

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

`phi` |
the proportion of patients preferring treatment 1. Should be numeric value between 0 and 1. If study is stratified, should be vector with length equal to the number of strata in the study. |

`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. |

`delta_pi` |
overall study preference effect. |

`delta_nu` |
overall study selection effect. |

`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). |

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 | ```
# Unstratified
preference_sample_size(power=0.8, phi=0.6, sigma2=1, delta_pi=1, delta_nu=0.5)
# Stratified
preference_sample_size(power=0.8, phi=c(0.5, 0.5), sigma2=c(1, 1), delta_pi=1,
delta_nu=0.5,xi=c(0.3,0.7),nstrata=2)
``` |

preference documentation built on Nov. 29, 2017, 1:01 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.