pmway.table: Estimate p-values/cumulative probability of maximum...

Description Usage Arguments Details Value Examples

View source: R/SphereKaji20140527.R

Description

Estimate p-values/cumulative probability of maximum statistics on multi-way table under unll or alternative hypothesis

Usage

1
pmway.table(x, A, tests, lower.tail, nc, one.side, n)

Arguments

x

A vector of K^2 quantiles

A

An array or matrix of table that specifies marginal counts

tests

A list of tables

lower.tail

logical; if TRUE (default), probabilities are P[X ?????? x], otherwise, P[X > x].

nc

Optional. if FALSE (default), random tables are in null hypothesis and otherwise in alternative hypothesis with its ccenter being table A

one.side

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

n

number of random unit vectors used for estimation

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
5
6
7
8
A <- matrix(c(10,20,30,40,50,60),2,3)
t1 <- t2 <- t3 <- matrix(c(1,0,0,0,0,0),byrow=TRUE,2,3)
t2[1,2] <- 0.5
t3[1,2] <- 1
tests <- list(t1,t2,t3)
n <- 1000
x <- 0:10
pmway.table(x,A,tests)

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