confirmatory_bayes_factor: Primary analysis: Bayes factors analysis

Description Usage Arguments Value See Also Examples

View source: R/analysis_confirmatory.R

Description

The function computes the BF01 based on the successful guesses and the total number of erotic trials. M0 is a point-value model denoting that the chance of each successful guess is 50 three different beta priors on the probability of correct guesses: knowledge-base prior, uniform prior, replication prior. In all cases we use a one-tailed hypothesis testing (p > 0.5 and p < 1).

Usage

1
confirmatory_bayes_factor(success, total_n)

Arguments

success

numeric, total number of successful guesses on erotic trials

total_n

numeric, total number of all erotic trials

Value

The function returns a list of three numeric values with the rounded Bayes factor calculated with each M1 beta prior.

See Also

Other confirmatory functions: confirmatory_mixed_effect()

Examples

1
2
3
4
5
# Including only erotic trials
tpp_processed_data <- clean_data(raw_data = tppr::example_m0)
# Running the confirmatory analysis
confirmatory_bayes_factor(success = sum(tpp_processed_data$sides_match, na.rm = TRUE),
                          total_n = nrow(tpp_processed_data))

marton-balazs-kovacs/tppr documentation built on Oct. 27, 2021, 3:04 p.m.