ANOMgen: Generic Function for Drawing ANOM Decision Charts

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/ANOMgen.R

Description

Graphical representation of the analysis of means: convert simultaneous confidence intervals (that were computed with ANY method) into ANOM decision limits and draw a decision chart as commonly used in technometrics.

Usage

1
2
3
4
ANOMgen(mu, n=NULL, gm=NULL, lo, up, names, alternative="two.sided",
        xlabel="Group", ylabel="Endpoint", printn=TRUE, p=NULL, bg="white",
        bgrid=TRUE, axlsize=18, axtsize=25, npsize=5, psize=5, lwidth=1,
        dlstyle="dashed", fillcol="darkgray")

Arguments

mu

A numeric vector of group means.

n

A numeric vector of sample sizes per group. Either n or gm must be provided.

gm

A single numeric value giving the grand mean of all groups. Either n or gm must be provided.

lo

A numeric vector of lower (simultaneous) confidence interval bounds for comparisons to the grand mean.

up

A numeric vector of upper (simultaneous) confidence interval bounds for comparisons to the grand mean.

names

An (optional) vector of characters specifying the groups' names.

alternative

A character string indicating the direction of the alternative hypothesis. Default is "two.sided", but may be changed to one-sided alternatives (either "greater" or "less").

xlabel

A character string specifying the label of the horizontal axis.

ylabel

A character string specifying the label of the vertical axis.

printn

A logical. Should per-group sample sizes be included in the chart? Default is TRUE. If n ist left at NULL, the function automatically sets printn to FALSE.

p

An (optional) numeric vector of (simultaneous) p-values to be printed.

bg

A character string. Should the plot's background be "white" (default) or "gray" (or "grey")?

bgrid

A logical. Should background grid lines be plotted? Default is TRUE.

axlsize

A numerical value specifying the font size of the axis labels. Default is 18.

axtsize

A numerical value specifying the font size of the axis titles. Default is 25.

npsize

A numerical value specifying the font size of the sample sizes and p-values (if printed). Default is 5.

psize

A numerical value specifying the size of the points (group means). Default is 5.

lwidth

A numerical value specifying the width of the lines (grand mean, decision limits, vertical connections). Default is 1.

dlstyle

A character string specifying the style of the decision limits. Default is "dashed".

fillcol

A character string specifying the color of the area of no significant deviation from the grand mean. Default is "darkgray".

Details

This is a generic tool that translates (simultaneous) confidence intervals into ANOM decision limits.

Value

An ANOM decision chart.

Note

The confidence intervals must arise from comparisons to the grand mean; otherwise the ANOM chart is meaningless!

Author(s)

Philip Pallmann p.pallmann@lancaster.ac.uk

References

Pallmann, P. and Hothorn, L. A. (2016) Analysis of means (ANOM): A generalized approach using R. Journal of Applied Statistics, 43(8), 1541–1560.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
### A toy example (n given, two-sided)
groupmeans <- c(2.8, 2.3, 3.4, 5.6)
samplesizes <- c(5, 5, 10, 5)
low <- c(-1.2, -1.7, -0.4, 1.6)
upp <- c(-0.2, -0.7, 0.2, 2.6)
names <- c("1st", "2nd", "3rd", "4th")
ANOMgen(mu=groupmeans, n=samplesizes, lo=low, up=upp, names=names, alternative="two.sided")

### Another toy example (gm given, one-sided, with p-values)
groupmeans <- c(2.8, 2.3, 3.4, 5.6)
gm <- 3.5
low <- rep(-Inf, 4)
upp <- c(-0.2, -0.7, 0.2, 2.6)
names <- c("1st", "2nd", "3rd", "4th")
pvalues <- c(0.01, 0.003, 0.8, 1)
ANOMgen(mu=groupmeans, gm=gm, lo=low, up=upp, names=names, alternative="less", p=pvalues)

Example output



ANOM documentation built on May 2, 2019, 2:04 a.m.