plot.multfisher {multfisher} | R Documentation |
Plot Rejection Region from a multfisher
Object
Description
Plot two dimensions of the rejection region.
Usage
## S3 method for class 'multfisher'
plot(x, dim = c(1, 2), slice = NULL,
show.titles = TRUE, ...)
Arguments
x |
an object of class |
dim |
a vector of length two, indicating which two dimensions of the rejection region to plot. The default is |
slice |
a named list of numeric values at which the test statistics for the dimensions (assumedly) not included in |
show.titles |
logical indicating whether the plot title and explanatory subtitles are shown. |
... |
further arguments passed to the generic |
Details
The function produces plots of the multivariate rejection regions calculated by mfisher.test
.
For more than two dimensions, the default slice=NULL
shows a
projection of the rejection region on the two dimensions indicated in dim
. slice
may be specified to produce plots of slices through the
multivariate rejection region. In that case slice
must be a named list of numeric objects. The names must be of the form Ti
, where i
is replaced
by the number of the dimension to be indicated. The numeric value defines at which value the test statistic for the indicated dimension is held constant.
(If there are dimensions that are neither indicated in dim
nor in slice
, the plot is still a projection.)
Author(s)
Robin Ristl, robin.ristl@meduniwien.ac.at
See Also
mfisher.test
, print.multfisher
Examples
## Example with two endpoints
data<-data.frame(endpoint1=c(0,0,1,1,1,0,0,0,0,1,1,1,1,1,1, 0,0,1,0,0,1,1,1,1,1,1,1,1,1,1),
endpoint2= c(0,0,0,0,0,1,1,1,1,1,1,1,1,1,1, 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1),
group=rep(c(0,1),each=15))
plot(mfisher.test(x=data[,c(1:2)],y=data$group,show.region=TRUE),cex=2)
## Example with three endpoints
data3EP<-data.frame(endpoint1= c(0,0,0,0,0,1,1,0,0,0, 0,0,0,0,1,1,1,1,1,1),
endpoint2= c(0,0,0,0,0,1,0,1,0,0, 0,0,1,1,1,1,1,1,1,1),
endpoint3= c(0,0,0,0,0,0,0,0,1,1, 0,0,0,1,1,1,1,1,1,1),
group=rep(c(0,1),each=10))
testgreedy3EP<-mfisher.test(x=data3EP[,1:3],y=data3EP$group,method="alpha.greedy",
show.region=TRUE,closed.test=TRUE)
## Projecion on the first two dimensions
plot(testgreedy3EP,dim=c(1,2),cex=2)
## Slice at a value of 5 for the third dimension
plot(testgreedy3EP,dim=c(1,2),slice=list(T3=5),cex=2)
## Show all slices through the third dimension
par(mfrow=c(3,3))
for(i in 1:9) {
plot(testgreedy3EP,dim=c(1,2),slice=list(T3=i),show.titles=FALSE,cex=2,xlim=c(0,8),ylim=c(0,10))
title(paste("T3 =",i))
}