R/analysis_confirmatory.R
confirmatory_bayes_factor.Rd
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).
confirmatory_bayes_factor(success, total_n)
numeric, total number of successful guesses on erotic trials
numeric, total number of all erotic trials
The function returns a list of three numeric values with the rounded Bayes factor calculated with each M1 beta prior.
Other confirmatory functions:
confirmatory_mixed_effect()
# \donttest{
# 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))
#> $bf_replication
#> [1] 388.701
#>
#> $bf_uniform
#> [1] 395.869
#>
#> $bf_buj
#> [1] 134.995
#>
#> $bf_inference
#> [1] "M0"
#>
# }