Basic function for running the Bayesian repeated measures analysis of Variance

rm_banova_mf(
  cs1,
  cs2,
  data,
  subj,
  time = TRUE,
  group = NULL,
  phase = "acquisition",
  dv = "scr",
  exclusion = "full data",
  cut_off = "full data"
)

Arguments

cs1

The column name(s) of the conditioned responses for the first conditioned stimulus

cs2

The column name(s) of the conditioned responses for the second conditioned stimulus

data

A data frame containing all the relevant columns for the analyses

subj

The name of the column including the participant numbers. Unique numbers are expected

time

should time be included? Default to TRUE

group

the name of the group, if included, default to NULL

phase

The conditioned phase that the analyses refer to. Accepted values are acquisition, acq, extinction, or ext

dv

name of the measured conditioned response. Default to "SCR"

exclusion

Name of the data reduction procedure used. Default to full data

cut_off

cut off Name of the cut_off applied. Default to full data

Value

A tibble with the following column names: x: the name of the independent variable (e.g., cs) y: the name of the dependent variable as this defined in the dv argument exclusion: see exclusion argument model: the model that was run (e.g., rep ANOVA) controls: ignore this column for this test method: the model that was run p.value: irrelevant here effect.size: irrelevant here effect.size.ma: irrelevant here effect.size.lci: irrelevant here effect.size.hci: irrelevant here estimate: the estimate of the test run statistic: the Bayes factor conf.low: the lower confidence interval for the estimate conf.high: the higher confidence interval for the estimate framework: were the data analysed within a NHST or Bayesian framework? data_used: a list with the data used for the specific test

Details

In case the time argument is set to true, the function will include this as a within subjects factor, assuming that the columns in cs1 and cs2 correspond to ascending time points (e.g., cs1 trial 1, cs1 trial 2 ... cs1 trial n). If this is not the case, the results are not to be trusted.

The ANOVA will run *all* possible models and combinations. Please note that in case of many factors, this will mean that the analysis will take a long time to be completed.

Examples

# Briefly define argument values that will be plugged in later on in the functions.
# We only use two trials as the function takes a long time to run.

cs1 <- paste0("CSP", 1:2)
cs2 <- paste0("CSM", 1:2)
subj <- "id"

# Bayesian Repeated measures ANOVA without groups
rm_banova_mf(cs1 = cs1, cs2 = cs2, subj = subj,
data = example_data, time = TRUE)
#> # A tibble: 1 × 18
#>   x       y     exclusion cut_off   model    controls method p.value effect.size
#>   <chr>   <chr> <chr>     <chr>     <chr>    <lgl>    <chr>  <lgl>   <lgl>      
#> 1 cs:time scr   full data full data rep BAN… NA       rep B… NA      NA         
#> # … with 9 more variables: effect.size.ma <lgl>, effect.size.ma.lci <lgl>,
#> #   effect.size.ma.hci <lgl>, estimate <dbl>, statistic <lgl>, conf.low <lgl>,
#> #   conf.high <lgl>, framework <chr>, data_used <list>