Learn R Programming

MD2sample (version 1.0.0)

run.studies: Benchmarking for Multivariate Two-Sample Tests

Description

This function runs the case studies included in the package.

Usage

run.studies(
  Continuous = TRUE,
  study,
  TS,
  TSextra,
  With.p.value = FALSE,
  nsample = 200,
  alpha = 0.05,
  param_alt,
  SuppressMessages = FALSE,
  B = 1000,
  maxProcessor
)

Value

A (list of ) matrices of p.values.

Arguments

Continuous

=TRUE, run cases for continuous data.

study

either the name of the study, or its number in the list. If missing all the studies are run.

TS

routine to calculate new test statistics.

TSextra

list passed to TS (optional).

With.p.value

=FALSE, does user supplied routine return p values?

nsample

= 200, desired sample size. 200 is used in included case studies.

alpha

=0.05, type I error probability of tests. 0.05 is used in included case studies.

param_alt

(list of) values of parameter under the alternative hypothesis. If missing included values are used.

SuppressMessages

=FALSE, should informative messages be printed?

B

= 1000, number of simulation runs.

maxProcessor

number of cores to use. If missing the number of physical cores-1 is used. If set to 1 no parallel processing is done.

Details

For details consult vignette(package="MD2sample")

Examples

Run this code
#The new test is a (included) chi square test:
TSextra=list(which="pval", nbins=rbind(c(3,3), c(4,4)))
run.studies(Continuous=TRUE, study=c("NormalD2", "tD2"), 
          TS=MD2sample::chiTS.cont, TSextra=TSextra, B=100)

Run the code above in your browser using DataLab