csPlot {condir}R Documentation

Plot CRs for each CS

Description

Plot the mean of median of each CRs, for each CS

Usage

csPlot(
  cs1,
  cs2,
  group = NULL,
  data = NULL,
  ylab = "CRs",
  col = c("black", "grey"),
  legend = c("cs1", "cs2")
)

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.

ylab

Label for the x-axis

col

The color of the error bars to be used (either given as a numeric vector or a character string). The length of the chosen colors should be equal to the length of the legend names otherwise a warning is returned.

legend

The legend names to be used. The length of the legend labels should be the same as the length of the color string, otherwise a warning is returned.

Details

csCompare performs both a student t-test (using the stats::t.test function) and a Bayesian t-test (using the BayesFactor::ttest.tstat). In case group is not defined, paired-samples t-tests are run. In case the group is defined, then the csCompare first computes difference scores between the cs1 and the cs2 (i.e., cs1 - cs2). In case the group argument is defined but, after removal of NA's (stats::na.omit), only one group is defined, a paired samples t-test is run.

See Also

t.test, ttest.tstat

Examples

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

[Package condir version 0.1.4 Index]