size.tau: Empirical Size Associated with Decay Parameter

Description Usage Arguments Value References Examples

View source: R/sci.R

Description

Find the empirical size associated with the decay parameter conditional on a dataset

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
size.tau(
  X,
  tau,
  alpha = 0.05,
  side = "==",
  B = ceiling(50/alpha),
  pairs = NULL,
  verbose = F,
  method = "MGB",
  R = ceiling(10/alpha),
  ncore = 1,
  cuda = T,
  nblock = 32,
  tpb = 64,
  seed = sample.int(2^30, 1)
)

Arguments

X

a matrix (one-sample) or a list of matrices (multiple-samples), with each row representing an observation.

tau

real number(s) in the interval [0,1) for which the empirical size will be evaluated.

alpha

significance level; default value: 0.05.

side

either of '<=','>=' or '=='; default value: '=='.

B

the number of bootstrap replicates; default value: ceiling(50/alpha).

pairs

a matrix with two columns, only used when there are more than two populations, where each row specifies a pair of populations for which the SCI is constructed; default value: NULL, so that SCIs for all pairs are constructed.

verbose

TRUE/FALSE, indicator of whether to output diagnostic information or report progress; default value: FALSE.

method

the evaluation method tau; possible values are 'MGB' (default), 'MGBA', 'RMGB', 'RMGBA', 'WB' and 'WBA' (see hdsci for details).

R

the number of iterations; default value: ceiling(25/alpha).

ncore

the number of CPU cores to be used; default value: 1.

cuda

T/F to indicate whether to use CUDA GPU implementation when the package hdanova.cuda is installed. This option takes effect only when ncore=1.

nblock

the number of block in CUDA computation

tpb

number of threads per block; the maximum number of total number of parallel GPU threads is then nblock*tpb

seed

the seed for random number generator

Value

a vector of empirical size corresponding to tau.

References

\insertRef

Lopes2020hdanova

\insertRef

Lin2020hdanova

Examples

1
2
3
4
# simulate a dataset of 4 samples
X <- lapply(1:4, function(g) MASS::mvrnorm(30,rep(0.3*g,10),diag((1:10)^(-0.5*g))))

size.tau(X,tau=seq(0,1,by=0.1),alpha=0.05,pairs=matrix(1:4,2,2),R=100)

linulysses/hdanova documentation built on Feb. 13, 2021, 9:10 a.m.