## S3 method for class 'cgOneFactorFit':
errorBarGraph(fit, mcadjust = FALSE, alpha =0.05,
cgtheme = TRUE, device = "single", ...)cgOneFactorFit.FALSE.
If mcadjust=TRUE is specified, there will be a 0.05, which
equates to a 95% confidence level.TRUE, ensures a trellis device is active with
limited color scheme. Namely background,
strip.shingle, and strip.background are each set to "white".errorBarGraph.cgOneFactorFit returns
an invisible NULL. The main purpose is the side
effect of graphing to the current device.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 interval calculations.
The errorBarGraph.cgOneFactorFit method is only relevant for
classical least squares and resistant & robust fits in the
cgOneFactorFit object. There is an
errorbargraph core function that could be used for
approximations in other cases like accelerated failure time or unequal
variance fits.
The statistical method of Andrews, Sarner, and Snee (1980) is applied to
visualize significant differences via non-overlapping error bars. The
method is exact when there are equal sample sizes amongst the
groups for the classical least squares case. When there are unequal
group sample sizes or a resistant & robust fit is used to create the
graph, the method is approximate, and this is noted in the main title
section of the graph. For the unequal sample sizes, the harmonic mean
is calculated to use for all the groups. The method's usefulness
declines as the sample sizes become more disparate.
When two groups are compared, nonoverlapping error bars indicate a
statistically significant pairwise difference. Conversely, if the
error bars overlap, there is no such significant difference. In cases
of approximation, or borderline overlap that is seen, the
cgOneFactorComparisonsTable object created with
type="pairwisereflect" or type="pairwise" needs to be
consulted to judge significance with a p-value.
The minimum and maximum values across all the bar ends
are added inside the plot region in blue, flush against the
y-axis. The number of decimal places are determined by the
digits value in the fit$settings slot.
If group labels along the x-axis seem to overlap in the standard
horizontal form, they will be rotated 45 degrees.multcomp R package.
Hothorn, T., Bretz, F., and Westfall, P. (2008).
"Simultaneous Inference in General Parametric Models",
Biometrical Journal, 50, 3, 346-363.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