R/analysis_confirmatory.R
confirmatory_mixed_effect.Rd
This function calculates the mixed-effects logistic regression for the primary analysis. A random intercept is placed on the participants to predict the outcome of the guesses in erotic trials. Then the function calculates the Wald confidence interval around the estimate of the odds ratio of success and transforms it to logit probability.
confirmatory_mixed_effect(processed_data, n_iteration = 1)
a dataframe containing only erotic and non empty trials
numeric, the nth time the analysis is conducted
A list of three containing the width, the lower and the upper border of the confidence interval of 95
If the mixed-effects logistic regression is run by multiple times during the primary confirmatory analysis the alpha level is corrected by for each iteration.
Other confirmatory functions:
confirmatory_bayes_factor()
# \donttest{
# Including only erotic trials
tpp_processed_data <- clean_data(raw_data = example_m0)
# Running the confirmatory analysis
confirmatory_mixed_effect(processed_data = tpp_processed_data, n_iteration = 1)
#> $mixed_ci_width
#> [1] 0.9975
#>
#> $mixed_ci_l
#> [1] 0.4905717
#>
#> $mixed_ci_u
#> [1] 0.5039654
#>
#> $n_iteration
#> [1] 1
#>
#> $mixed_nhst_inference
#> [1] "M0"
#>
# }