plotT: Plot or Print ordering function for unconditional exact test

Description Usage Arguments Details Examples

View source: R/rankPlots.R

Description

The function orderMat prints the values for the ordering function for all possible values of X1 and X2 in matrix form.

The function plotT plots the ranking of the ordering function on an n1+1 by n2+1 grid, where each square represents a possible values for (x1,x2). The default colors are from dark blue (highest) to light blue to white (middle) to light red to dard red (lowest), with black=NA.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
plotT(x, ...)

## S3 method for class 'function'
plotT(x, n1, n2, delta0 = 1, main = "",...)


## S3 method for class 'numeric'
plotT(x, n1, n2, delta0 = 1, main = "",...)


orderMat(x, ...)

## S3 method for class 'function'
orderMat(x,n1,n2,delta0,graphStyle=FALSE,...)

## S3 method for class 'numeric'
orderMat(x,n1,n2,delta0,graphStyle=FALSE,...)

Arguments

x

object, either a Tstat function, or a vector of all (n1+1)*(n2+1) possible values of the function (see details).

n1

sample size in group 1

n2

sample size in group 2

delta0

null value of parameter (if needed for Tstat function)

main

plot title

graphStyle

logical, order rows with lowest x1 value on the bottom?

...

arguments to be passed to the Tstat function

Details

If x is all the values of the Tstat function, then the values should be ordered by cycling through the x1 values (0 to n1) for each x2 value. Specifically, it should be the result of Tstat(X1,n1,X2,n2,delta0) where X1=rep(0:n1,n2+1) and X2=rep(0:n2,each=n1+1).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
parorig<- par(no.readonly=TRUE)
par(mfrow=c(2,2),mar=c(1,3,3,1))
TT1<-pickTstat(method="score", parmtype="ratio", tsmethod="central", alternative="two.sided")
round(orderMat(TT1,8,8,1,graphStyle=TRUE),2)
TT2<-pickTstat(method="simple", parmtype="ratio", tsmethod="central", alternative="two.sided")
TT3<-pickTstat(method="simple", parmtype="difference", tsmethod="central", alternative="two.sided")
plotT(TT2, 8,8, 1, main="Ratio, Simple")
plotT(TT3, 8,8, 0, main="Difference, Simple")
plotT(TT1, 8,8, 1, main="Ratio, Score (delta0=1)")
TF<-pickTstat(method="FisherAdj", parmtype="ratio", tsmethod="central", alternative="two.sided")
plotT(TF,8,8,1, main="FisherAdj")
par(parorig)

exact2x2 documentation built on Dec. 11, 2021, 9:43 a.m.