Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

multicomp.reverse

Force all comparisons in a "multicomp" object to have the same sign.


Description

Force all comparisons in a "multicomp" object to have the same sign. If the contrast "A-B" has a negative estimate, reverse it show the contrast "B-A" with a positive estimate. If a contrast name does not include a minus sign "-" and the contrast is reversed, then an informative message is printed.

Usage

multicomp.reverse(y, estimate.sign = 1, ...)

Arguments

y

"multicomp" object

estimate.sign

If estimate.sign==1, reverse the negatives. If estimate.sign==-1, reverse the positives. Both the names of the comparisons and the numerical values are reversed. If estimate.sign==0, return the argument.

...

other arguments not used.

Value

The result is a "multicomp" object containing the same contrasts as the argument but with the sign of the contrasts changed as needed.

Note

S-Plus use the multicomp functions and R uses the multcomp package.

Author(s)

Richard M. Heiberger <rmh@temple.edu>

References

Heiberger, Richard M. and Holland, Burt (2015). Statistical Analysis and Data Display: An Intermediate Course with Examples in R. Second Edition. Springer-Verlag, New York. https://www.springer.com/us/book/9781493921218

Heiberger, Richard M. and Holland, Burt (2006). "Mean–mean multiple comparison displays for families of linear contrasts." Journal of Computational and Graphical Statistics, 15:937–955.

See Also

Examples

## see example in multicomp.order

HH

Statistical Analysis and Data Display: Heiberger and Holland

v3.1-43
GPL (>= 2)
Authors
Richard M. Heiberger
Initial release
2020-11-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.