csRobustnessPlot: Plot robustness results

View source: R/csRobustnessPlot.R

csRobustnessPlotR Documentation

Plot robustness results

Description

Plots the results of robustness test

Usage

csRobustnessPlot(
  cs1,
  cs2,
  group = NULL,
  data = NULL,
  alternative = "two.sided",
  conf.level = 0.95,
  mu = 0,
  rscaleSens = c("medium", "wide", "ultrawide"),
  BF01 = TRUE,
  ylimz = NULL,
  sensitivity = FALSE
)

Arguments

cs1

a numeric vector of values. If the data argument is defined, it can refer to either the column index or the column name of the data object. See Details for more information.

cs2

a numeric vector of values. If the data argument is defined, it can refer to either the column index or the column name of the data object. See Details for more information.

group

column index or name that contain the group data. See Details for more information.

data

numeric matrix or data frame that contains the relevant data.

alternative

a character string for the specification of the alternative hypothesis. Possible values: "two.sided" (default), "greater" or "less".

conf.level

Interval's confidence level.

mu

a numeric value for the mean value or mean difference.

rscaleSens

the scale factor for the prior used in the Bayesian t.test

BF01

Should the BF01 be plotted (default is set to TRUE). If FALSE, the BF10 is plotted.

ylimz

the limits of the y-axis (default to NULL).

sensitivity

Should the sensitivity results be returned (default is set to FALSE).

Details

This plot template is influenced by the JASP way (https://jasp-stats.org/) for plotting sensitivity analysis results. On the x-axis or the width of the Cauchy's Scale is plotted. On the y-axis either BF01 is plotted (if BF01 is set to TRUE) or BF10 (if BF01 is set to FALSE).

References

JASP Team (2019). JASP (Version 0.11.1)[Computer software].

Krypotos, A. M., Klugkist, I., & Engelhard, I. M. (2017). Bayesian hypothesis testing for human threat conditioning research: An introduction and the condir R package. European Journal of Psychotraumatology, 8.

See Also

csCompare, csSensitivity

Examples

set.seed(1000)
csRobustnessPlot(cs1 = rnorm(n = 100, mean = 10),
cs2 = rnorm(n = 100, mean = 9))

condir documentation built on Sept. 22, 2023, 5:08 p.m.