checktest: Calculates values associated with testing using two-stage...

Description Usage Arguments Value Examples

View source: R/checktest.R

Description

Calculates values associated with testing using two-stage Mann-Whitney-Wilcoxon statistic.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
checktest(
  m1,
  n1,
  m2,
  n2,
  delta,
  quantiles = c(0.98, 0.95),
  docheck = TRUE,
  ctl = FALSE
)

Arguments

m1

Number in group 1, first evaluation

n1

Number in group 2, first evaluation

m2

Number in group 1, second evaluation

n2

Number in group 2, second evaluation

delta

Under normal unit variance model for responses, separation between means in groups.

quantiles

Quantiles for first stage and overall 1-size.

docheck

Flag controling whether checking vs a table of the joint distribution is done. Default is true.

ctl

Flag controling whether simulation is used to get emprical distribution.

Value

List with componets delta, quantiles at which critical values ought to be calculated, m1, n2, m2, n2 from input,normal-approximation critical values, Cornish-Fisher critical values,true size of normal theory test, true size of Cornish-Fisher test, true power under delta, Edgworth approximation to power under normal critical values, Edgeworth approximation to power under Cornish-Fisher critical values.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#For two stage testing paper
l1<-checktest(5,5,5,5,1.5,quantiles=c(.98,.95),docheck=TRUE,ctl=TRUE)
l2<-checktest(5,5,5,5,1.5,quantiles=c(.99,.975),docheck=TRUE,ctl=TRUE)
#Giving equal normal approximate critical values at each stage
l3<-checktest(5,5,5,5,1.5,quantiles=c(.96993,.95),docheck=TRUE,ctl=TRUE)
l4<-checktest(5,5,5,5,1.5,quantiles=c(.98544,.975),docheck=TRUE,ctl=TRUE)
#Giving O'Brien and Fleming cutoff
l5<-checktest(5,5,5,5,1.5,quantiles=c(.99125,.95),docheck=TRUE,ctl=TRUE)
l6<-checktest(5,5,5,5,1.5,quantiles=c(.99743,.975),docheck=TRUE,ctl=TRUE)
#Second table
l7<-checktest(8,7,8,7,1.5,quantiles=c(.99125,.95),docheck=TRUE,ctl=TRUE)
l8<-checktest(8,7,8,7,1.5,quantiles=c(.99743,.975),docheck=TRUE,ctl=TRUE)

kolassa-dev/twostage documentation built on Sept. 12, 2021, 3:21 a.m.