Description Usage Arguments Details Value Examples

View source: R/Bayes_Ord_Design_Switch.R

When there lacks of sufficient information to determine which of these two models (PO or NPO) is more appropriate, PO/NPO switch model-based design is utilized to obtain estimated sample size based on user specified type I error, power and expected effect.

1 2 3 4 5 6 7 8 9 10 11 12 |

`alpha` |
the desirable type I error rate to be controlled |

`power` |
the desirable power to be achieved |

`n_po` |
sample size for the treatment and control groups, at each stage based on PO model |

`n_npo` |
sample size for the treatment and control groups, at each stage based on NPO model |

`or_alt` |
expected treatment efficacy effect size to be detected (under H_1) in terms of odds ratio |

`pro_ctr` |
distribution of clinical categories for the control group |

`U` |
the desirability of each outcome level |

`ntrial` |
the number of simulated trials |

`method` |
whether the statistical test for interim/final analysis is Bayesian or Frequentist. method = "Frequentist" for Frequentist approach; method = "Bayesian" for Bayesian approach |

`n_range` |
the additional sample size for each arm each stage after n_po, n_npo. |

Grid search of sample size is used for guarantee a desirable type I error rate. The upper limitation is 200, and lower limitation default is sample size 50 for the control and treatment groups at each stage. Default increment of the sequence is 10.

For the parameter estimation section, we have two options, and can be selected using the method argument.Two following options are available: (i) method = "Frequentist", (ii) method = "Bayesian". If method = "Frequentist", parameters are estimated via package ordinal, which is based on frequentist method, while method = "Bayesian", parameters are estimated through Bayesian model.

Specifically, the numerical utilities U reflect the desirability of each outcome level. To do this, in our example, we first set U[1] = 100 and U[5] = 0, and then asked physicians to specify numerical values for the intermediate levels, that reflect their desirability relative to the best and worst levels.

Arguments n_po and n_npo are the estimated sample size for the treatment and control groups at each stage based on PO model and NPO model respectively. Users can obtained them through function ss_po and ss_npo.

ss_switch() returns recommended sample size for each group at every interim look, with assumption that the sample size in the control arm of the study is same as in the treatment arm, and the sample size at each interim look is same.

1 2 3 4 |

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.