Plot Means Comparison
plotMeansComparison.Rd
Provides a plot of the confidence intervals for the means and mean difference of a specified comparison.
Usage
# S3 method for data.frame
plotMeansComparison(frame, ylab="Outcome", xlab="", mu=0, conf.level=.95, rope=NULL, values=TRUE, main=NULL, ylim=NULL, digits=3)
# S3 method for formula
plotMeansComparison(formula, ylab="Outcome", xlab="", mu=0, conf.level=.95, rope=NULL, values=TRUE, main=NULL, ylim=NULL, digits=3)
# S3 method for wsm
plotMeansComparison(moments, corrs, ylab="Outcome", xlab="", mu=0, conf.level=.95, rope=NULL, values=TRUE, main=NULL, ylim=NULL, digits=3)
# S3 method for bsm
plotMeansComparison(moments, ylab="Outcome", xlab="", mu=0, conf.level=.95, rope=NULL, values=TRUE, main=NULL, ylim=NULL, digits=3)
Arguments
- frame
a set of (non-empty) numeric vectors of data values
- formula
a formula of the form
lhs ~ rhs
wherelhs
is a numeric variable giving the data values andrhs
a factor giving the corresponding groups- moments
a matrix/frame of descriptive/summary statistics
- corrs
a matrix/frame of correlations among the measures
- ylab
a label for the y-axis
- xlab
a label for the x-axis
- mu
a number indicating the true/hypothesized value of the mean difference
- conf.level
confidence level of the interval
- rope
lower and upper values for a region of practical equivalence
- values
whether the points should be labeled with their values
- main
a custom title for the graph
- ylim
custom limits for the y axis
- digits
the specified number of decimal places
Details
This function compares two groups or variables. As such, the supplied factor or table of summary statistics should contain only two groups or two variables.
Value
The returned plot contains the following components:
- M
the means for the variables or groups
- LL
the lower limit of the confidence interval of the means
- UL
the upper limit of the confidence interval of the means
- Diff
the difference between the two means
- LL
the lower limit of the confidence interval for the difference
- UL
the upper limit of the confidence interval for the difference
- mu
a horizontal line for the true/hypothesized value
- rope
a shaded region of practical equivalence