Learn R Programming

cg (version 1.0-2)

errorBarGraph: Create an Error Bar graph amongst groups

Description

Generic function to create a Error Bar graph based on a fit by the cg package.

Usage

errorBarGraph(fit, mcadjust=FALSE, alpha = 0.05,
 cgtheme = TRUE, device="single", ...)

Arguments

fit
A fit object created by a fit method from the cg package.
mcadjust
Do a multiple comparisons adjustment, based on the simultaneous inference capabilities of the multcomp package. See Details below. The default value is FALSE. If mcadjust=TRUE is specified, there will b
alpha
Significance level, by default set to 0.05 so that confidence levels are 95%.
cgtheme
When set to the default TRUE, ensures a trellis device is active with limited color scheme. Namely background, strip.shingle, and strip.background are each set to "white".
device
Can be one of three values: [object Object],[object Object],[object Object]
...
Additional arguments, depending on the specific method written for the object. See the method-specific documentation for additional details.

Value

  • The main purpose is the side effect of graphing to the current device. See specific methods for discussion of any return values.

concept

  • error bars
  • comparison

Details

When mcadjust=TRUE, a status message of "Some time may be needed" "as the critical point from the multcomp::summary.glht function call is calculated" is displayed at the console. This computed critical point is used for all subsequent p-value and confidence interval calculations.

References

Hothorn, T., Bretz, F., Westfall, P., Heiberger, R.M., and Schuetzenmeister, A. (2010). The multcomp R package. Hothorn, T., Bretz, F., and Westfall, P. (2008). "Simultaneous Inference in General Parametric Models", Biometrical Journal, 50, 3, 346-363.

See Also

errorBarGraph.cgOneFactorFit

Examples

Run this code
data(canine)
canine.data <- prepareCGOneFactorData(canine, format="groupcolumns",
                                      analysisname="Canine",
                                      endptname="Prostate Volume",
                                      endptunits=expression(plain(cm)^3),
                                      digits=1, logscale=TRUE, refgrp="CC")
canine.fit <- fit(canine.data)

errorBarGraph(canine.fit)

errorBarGraph(canine.fit, mcadjust=TRUE, model="olsonly")

Run the code above in your browser using DataLab