Basic function for running the Bayesian t-tests included in the main analyses
bt_test_mf(
cs1,
cs2,
data,
subj,
group = NULL,
na.rm = FALSE,
paired = TRUE,
rscale = "medium",
phase = "acquisition",
dv = "scr",
exclusion = "full data",
cut_off = "full data"
)
The column name(s) of the conditioned responses for the first conditioned stimulus
The column name(s) of the conditioned responses for the second conditioned stimulus
A data frame containing all the relevant columns for the analyses
The name of the column including the participant numbers. Unique numbers are expected
the name of the group, if included, default to NULL
Whether NAs should be removed, default to FALSE
Whether the t-test refers to dependent (i.e., paired) or to independent sample(s). Default to TRUE
r scale to be used in the prior of the alternative hypothesis, default to "medium".
The conditioned phase that the analyses refer to. Accepted values are acquisition
, acq
, extinction
, or ext
name of the measured conditioned response. Default to "SCR"
Name of the data reduction procedure used. Default to full data
cut off Name of the cut_off applied. Default to full data
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., t-test)
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
estimate: the estimate of the test run
statistic: the t-value
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
This is a wrapper function function around the BayesFactor::ttestBF(),
running multiple Bayesian t-tests. Similar to the t_test_mf
function, the function will run different t-tests based on the phase that the t-tests refer to. So, in case of the acquisition phase, there will be a t-test of differences and positive differences, whereas for the extinction phase a t-test for differences and negative differences.
# Load example data
data(example_data)
# Paired sample t-tests
bt_test_mf(cs1 = "CSP1", cs2 = "CSM1", subj = "id", data = example_data)
#> # A tibble: 2 × 18
#> x y exclusion cut_off model controls method p.value effect.size
#> <chr> <chr> <chr> <chr> <chr> <lgl> <chr> <lgl> <lgl>
#> 1 cs scr full data full data Bayesian … NA Bayes… NA NA
#> 2 cs scr full data full data Bayesian … NA Bayes… NA NA
#> # … with 9 more variables: effect.size.lci <lgl>, effect.size.hci <lgl>,
#> # effect.size.ma <lgl>, estimate <dbl>, statistic <lgl>, conf.low <lgl>,
#> # conf.high <lgl>, framework <chr>, data_used <list>
# Independent sample t-tests
bt_test_mf(cs1 = "CSP1", cs2 = "CSM1", subj = "id", group = "group", data = example_data)
#> # A tibble: 2 × 18
#> x y exclusion cut_off model controls method p.value effect.size
#> <chr> <chr> <chr> <chr> <chr> <lgl> <chr> <lgl> <lgl>
#> 1 cs scr full data full data Bayesian … NA Bayes… NA NA
#> 2 cs scr full data full data Bayesian … NA Bayes… NA NA
#> # … with 9 more variables: effect.size.lci <lgl>, effect.size.hci <lgl>,
#> # effect.size.ma <lgl>, estimate <dbl>, statistic <lgl>, conf.low <lgl>,
#> # conf.high <lgl>, framework <chr>, data_used <list>