View source: R/plot_functions.R
| effect_plot | R Documentation |
effect_plot constructs plots with error bars on which the upper and lower limits
of the bars are given by the variables CI_high and CI_low, respectively.
effect_plot(data, x, y, orientation = "x")
data |
A data frame. |
x |
A variable in the data frame. |
y |
A variable in the data frame. |
orientation |
A string indicating the orientation of the bars. |
An error bars plot, for example, those to show the effects of a categorical variable on a numerical variable.
data(Fentress)
require(dplyr, quietly = TRUE)
require(sjlabelled, quietly = TRUE)
pain_cis <- Fentress |>
gen_bst_df(pain ~ group)
names(pain_cis)[1] = "Mean"
pain_cis = pain_cis |>
var_labels(Mean = "Pain reduction")
pain_cis |>
effect_plot(x = Cohort, y = Mean)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.