Learn R Programming

pubh (version 1.1.3)

multiple: Multiple comparisons with plot.

Description

multiple displays results from post-doc analysis and constructs corresponding plot.

Usage

multiple(model, formula, adjust = "mvt", digits = 2)

Arguments

model

A fitted model supported by emmeans, such as the result of a call to aov, lm, glm, etc.

formula

A formula with shape: ~ y or ~ y|x (for interactions). Where y is the term of the model that on which comparisons are made and x is a term interacting with y.

adjust

Method to adjust CIs and p-values (see details).

digits

Number of digits for rounding (default = 2).

Value

A list with objects: df A data frame with ajusted p-values, fig_ci a plot with confidence intervals, fig_pval a plot comparing adjusted p-values.

Details

The default adjusting method is "mvt" which uses the multivariate t distribution. Other options are: "bonferroni", "holm", "hochberg", "tukey" and "none".

See Also

emmeans, pwpp.

Examples

Run this code
# NOT RUN {
data(birthwt, package = "MASS")
birthwt$race <- factor(birthwt$race, labels = c("White", "African American", "Other"))

model_1 <- aov(bwt ~ race, data = birthwt)
multiple(model_1, ~ race)$df

multiple(model_1, ~ race)$fig_ci %>%
gf_labs(y = 'Race', x = 'Birth weight (g)')

multiple(model_1, ~ race)$fig_pval %>%
gf_labs(y = 'Race')
# }

Run the code above in your browser using DataLab