alt.intersect: Calculate K statistics of tests for output of...

Description Usage Arguments Value Examples

View source: R/SphereKaji20140527.R

Description

Calculate K statistics of tests for output of make.alternative.table

Usage

1
alt.intersect(alt.tables, test.vecs)

Arguments

alt.tables

Output of make.alternative.table, that is a list of table and vector in df-dimensional space of alternative hypothesis

test.vecs

A number-of-test rows x df columns matrix of test vectos, each row of which is a test vector

Value

A vector of K statisitc values

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
A <- matrix(c(10,20,30,40,50,60),2,3)
t.sphere <- table.sphere(A)
test.table <- matrix(c(1,0.5,0,0,0,0),byrow=TRUE,2,3)
odds.ratio.table <- matrix(c(1,0,2,3,0,4),byrow=TRUE,2,3)
or <- 2
n <- 1000
K <- 10
alt.out <- make.alternative.table(t.sphere,test.table,odds.ratio.table,or,n,k)
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)
test.vecs <- make.test.vecs(t.sphere,tests)
alt.intersect(alt.out,test.vecs)

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