nfix: sample size calculation for equivalence studies

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

Description

calculates sample size for equivalence studies in the traditional non-sequential setting

Usage

1
nfix(r, l, u, theta, sigma, type1, type2, nrange = c(0, 1000))

Arguments

r

sampling ratio of the two groups. For paired samples (such as in crossover studies), r=1

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

type1

overall Type I error rate

type2

overall Type II error rate

nrange

a 2-dimensional vector containing the end-points of the interval from which thesample size will be solved. Default crange = c(0,1000)

Value

n1

sample size in group 1

n2

sample size in group 1

Author(s)

Fang Liu (fang.liu.131@nd.edu)

References

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)

See Also

nonbinding,binding,equivonly,nminmax, oc,figureE,figureEF

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 ## Not run: 
  L <- -0.2
  U <- 0.2
  theta <- 0
  sigma <- 0.4  
  alpha <- 0.05
  beta  <- 0.2
  r<- 1 
  n.fix <- nfix(r, L,U,theta,sigma,alpha,beta)
  
## End(Not run)

Example output

Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, units

Loading required package: mvtnorm
Loading required package: MCMCpack
Loading required package: coda
Loading required package: MASS
##
## Markov Chain Monte Carlo Package (MCMCpack)
## Copyright (C) 2003-2020 Andrew D. Martin, Kevin M. Quinn, and Jong Hee Park
##
## Support provided by the U.S. National Science Foundation
## (Grants SES-0350646 and SES-0350613)
##

gset documentation built on May 2, 2019, 2:09 p.m.