plot.mr.sig.cell: Plot significant cells

View source: R/plot.mr.sig.cell.R

plot.mr.sig.cellR Documentation

Plot significant cells

Description

This function plots the results coming from mr.sig.cell.

Usage

## S3 method for class 'mr.sig.cell'
plot(
  x,
  alpha.1 = 0.05,
  alpha.2 = 0,
  choice = "percent.derived.cont",
  col.greater.1 = "green3",
  col.lower.1 = "orangered",
  col.greater.2 = "lightgreen",
  col.lower.2 = "lightsalmon",
  ...
)

Arguments

x

A list returned by mr.sig.cell.

alpha.1

The alpha risk to consider the tests as significant.

alpha.2

The alpha risk to consider the tests as showing a trend. If trends are not to be considered, alpha.2 can be set to 0 (Default).

choice

Which table from res should be plotted? Default is percent.derived.cont.

col.greater.1

The color used to highlight significant positive associations.

col.lower.1

The color used to highlight significant negative associations.

col.greater.2

The color used to highlight positive associations showing a trend.

col.lower.2

The color used to highlight negative associations showing a trend.

...

further arguments passed to or from other methods.

Value

A table with cells highlighted.

Examples

nb.obs=200
nb.response=5
nb.category=5
vec.category=paste("C",1:nb.category,sep="")
right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response)
category=sample(vec.category,nb.obs,replace = TRUE)
dset=cbind.data.frame(category,right)
dset$category=as.factor(dset$category)

res=mr.sig.cell(dset)

plot(res)

MultiResponseR documentation built on March 23, 2026, 5:07 p.m.