rmway.table: Generate random tables under unll or alternative hypothesis

Description Usage Arguments Details Value Examples

View source: R/SphereKaji20140527.R

Description

Generate random tables under unll or alternative hypothesis

Usage

1
rmway.table(n, A, tests, nc, one.side)

Arguments

n

Number of random tables to be generated

A

An array or matrix of table that specifies marginal counts and also alternative hypothesis if nc is TRUE

tests

Optional. When TRUE, test statistics and maximum among them are calculated and returned

nc

Optional. When FALSE, random tables are in null hypothesis and when TRUE in alternative hypothesis with its ccenter being table A

one.side

Optional. When TRUE, tests are one-sided, otherwise two-sided

Details

This function is one of three major functions in this package. Functions for a distribution are rxxxx,dxxxx, pxxxx and qxxxx in general and this package provides three of them, rmway.table, pmway.table and qmway.table functions.

Value

Examples

1
2
3
4
A <- matrix(c(10,20,30,40,50,60),2,3)
n <- 1000
rmway.tables.null <- rmway.table(n,A)
rmway.tables.alt <- rmway.table(n,A,nc=TRUE)

ryamada22/mwaytable documentation built on May 28, 2019, 10:44 a.m.