power_disc {R2sample}R Documentation

Find the power of various tests via permutation.

Description

Find the power of various tests via permutation.

Usage

power_disc(
  rxy,
  TS,
  typeTS,
  TSextra,
  alpha = 0.05,
  samplingmethod = 2L,
  B = as.numeric(c(1000, 2000)),
  xparam = 0,
  yparam = 0
)

Arguments

rxy

a function that generates x and y data.

TS

routine to calculate test statistics for non-chi-square tests

typeTS

indicator for type of test statistics

TSextra

additional info passed to TS, if necessary

alpha

A numeric constant

samplingmethod

=2, 1 for independence sampling, 2 for MCMC in discrete data case

B

Number of simulation runs.

xparam

arguments for r1.

yparam

arguments for r2.

Value

A numeric matrix of powers


[Package R2sample version 2.2.0 Index]