Description Usage Arguments Value Author(s) References See Also Examples

Computation of equivalence and binding futility boundaries for group sequential designs in studies with equivalence hypothesis via Monte Carlo simulations

1 2 3 |

`l` |
lower equivalence bound as given in the equivalence hypothesis |

`u` |
upper equivalence bound as given in the equivalence hypothesis |

`theta` |
true mean difference between 2 groups |

`sigma` |
between-subject standard deviation of the response variable for two independent groups; within subject standard deviation of the response variable for paired groups |

`n1` |
size (number of subjects) in group 1 |

`n2` |
size (number of subjects) in group 2 |

`t.vec` |
cumulative time points for the interim looks assuming a constant accrual rate. For example, if a study has equally spaced 4 looks including the final look, then t.vec=1:4/4. It can any vector as long as it is increasing and the last element is 1. |

`type1` |
pverall Type I error rate |

`type2` |
overall Type II error rate |

`gamma` |
The gamma parameter in the gamma cumulative error spending function (Hwang, Shih, and DeCani 1990). Error spending given a t.vec is = total error rate*(1-exp(-gamma*t.vec))/(1-exp(-gamma)). gamma= 1 produces Pocock-type error spending function; gamma = -4 produces O'Brien-Fleming type error spending function. Default gamma = -4 |

`crange` |
a 2-dimensional vector containing the end-points of the interval from which the critical values for claiming equivalence will be solved. Default crange = c(-10,10) |

`drange` |
a 2-dimensional vector containing the end-points of the interval from which the critical values for claiming fultility will be solved. Default drange = c(-10,10) |

`force` |
Whether to force the futlitity boundaries to equal to the equilvence boundaries in the last look. Default force = TRUE |

`plot` |
Whether to generate the boundaries plot. Default plot = TRUE |

`ll` |
a parameter in the boundary plot; the short arm of the t(L) and t(U) axes |

`ul` |
a parameter in the boundary plot; the long arm of the t(L) and t(U) axes |

`n.sim` |
number of randomly simulated samples in computation of the boundaries via the Monte Carlo simulation approach. Default n.sim=1e4 |

`seed` |
seed used in the Monte Carlo computation. If non-specified, the seed is set randomly. |

`typeI` |
vector of cumulative stage Type I error rate |

`typeII` |
vector of cumulative stage Type II error rate |

`equivL` |
vector of the equivalence boundary c(L) at each stage |

`equivU` |
vector of the equivalence boundary c(U) at each stage |

`futilL` |
vector of the futility boundary d(L) at each stage |

`futilU` |
vector of the futility boundary d(U) at each stage |

`boundary plots` |
if plot=TRUE, a series of bounary plots will be produced, one for look |

Fang Liu ([email protected])

Liu, F. and Li, Q. (2014), Sequential Equivalence Testing based on the Exact Distribution of Bivariate Noncentral $t$-statistics, Computational Statistics and Data Analysis, 77:14-24

Liu, F. (2014), gset: an R package for exact sequential test of equivalence hypothesis based on bivariate non-central $t$-statistics, the R Journal (to appear)

`nonbinding`

,`equivonly`

,`nminmax`

,`nfix`

,`oc`

,`figureE`

,`figureEF`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ```
## Not run:
L <- -0.2
U <- 0.2
theta <- 0
sigma <- 0.4
alpha <- 0.05
beta <- 0.2
K <- 4
r <- 1
# the sample size per group with a traditional nonsequential design
n.fix <- nfix(r, L,U,theta,sigma,alpha,beta)
# default
# there are two ways to generate the boundary plots
# 1. specify plot=TRUE (default) in "binding()"
binding(L, U, theta, sigma, n.fix$n1, n.fix$n2, 1:K/K, alpha, beta)
# 2. specify plot=FALSE in "binding()" and apply the "figureEF()" command
bound <- binding(L, U, theta, sigma, n.fix$n1, n.fix$n2, 1:K/K, alpha, beta, plot=FALSE)
figureEF(bound, K)
# obtain nminmax
bound <- nminmax(L, U, theta, sigma, n.fix$n1, n.fix$n2, 1:K/K, alpha, beta, binding=TRUE)
bound
figureEF(bound, K)
## End(Not run)
``` |

gset documentation built on May 30, 2017, 5:12 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.