Description Usage Arguments Value Examples
View source: R/SphereKaji20140527.R
Generate random K statistic values with rmway function's output reused
1 | rmway.alt.only(alt.hx, odds.ratio.table, or, rmway.out, n.alt, K.alt)
|
alt.hx |
A matrix or array of a table which indicates the direction of alternative hypothesis along with an argument odds.ratio.table |
odds.ratio.table |
A matrix or array of a table with cell values being 0,1,2,3 or 4: Odds ratio of table is indicated by the (sum(cells of 1)*sum(cells of 4))/(sum(cells of 2)*sum(cells of 3)) |
or |
A number indicating odds ratio defined by odds.ratio.table argument |
rmway.out |
rmway function's output |
n.alt |
Optional. An integer which makes a one-dimensional grid with n points, among which the table with odds ratio closest to the argument or is selected |
K.alt |
Optional. A number indicating the maximum value of square of chi-square value to search the table of alternative hypothsis |
"t.sphere" Output of table.sphere(A)
"alt.table"Argument alt.table itself
"tests"Argument tests
"test.vecs"Matrix whose rows are test vectors
"runitstat.out"Output of runitstat function
"alt.intersect.out"Output of alt.intersect function
"n"Argument n
"A"Argument A
"alt.hx"Argument alt.hx
"odds.ratio.table"Argument odds.ratio.table
"or"Argument or
"n.alt"Argument n.alt
"K.alt"Argument K.alt
"rmvn"A matrix of random unit vectors, each row of which is a random unit vector
1 2 3 4 5 6 7 8 9 10 11 | 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
rmway.out <- rmway(n,A,tests)
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
rmway.alt.only(test.table,odds.ratio.table,or,rmway.out)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.