View source: R/plot_paired_equivalence.R
plot.paired_equivalence | R Documentation |
Plot the outcome of a paired equivalence test
## S3 method for class 'paired_equivalence' plot(x, shade = "auto", ...) shaded_equivalence_plot(results, ...) unshaded_equivalence_plot(results, ...)
x |
the object to be plotted |
shade |
logical. Should the results be plotted using a shaded equivalence region? |
... |
arguments passed to |
results |
data frame. The |
shaded_equivalence_plot
plots the results of an equivalence test in
which a single equivalence region applies to all variables. In that case, the
equivalence region is displayed as a shaded region.
unshaded_equivalence_plot
plots the results of an equivalence test in
which variables have unique equivalence regions. In that case, the
equivalence regions are displayed as dodged "confidence intervals".
A plot of the equivalence test
set.seed(1544) y <- rnorm(500, 17.4, 9) z <- data.frame( var1 = rnorm(500, 15, 4), var2 = rnorm(500, 23, 7.3) ) # Optionally create artificial missing values to trigger unshaded plot missing_indices <- sample(seq(nrow(z)), 250) z$var1[missing_indices] <- NA x <- paired_equivalence_test( z, y, "criterion", scale = "relative", relative_region_width = 0.25 ) plot(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.