The project contains the code to reproduce the reanalysis of the simulated data from van Doorn et al. (in press). The following `R` scripts are included:
- `vanDoorn_code.R`: This is mostly the original code of van Doorn et al. that generates the data and analysis it using Bayes factors. Our additions to this code are: saving the generated data in `allDat_effect.rda` (binary `R` data file) and producing the log(BF) plot of the data, `bf_doorn.pdf`.
- `bfrms_analysis-standarised.R`: Fits the default Bayes factor (i.e., standardised) LMM to the data using package [`bfrms`](https://github.com/bayesstuff/bfrms). It saves the summary statistics of the posterior in binary `R` data file `bfrms_df.rda` and produces the plot comparing effect size posterior and prior, `es_posterior.pdf`
- `stanova_analysis-unstandardised.R`: Fits the unstandardised Bayesian LMM using [`stanova`](https://github.com/bayesstuff/stanova) and calculates Bayes factors. It saves the summary statistics of the posterior in binary `R` data file `stanova_df.rda`
- `posterior_plot.R: Requires the summary statistic files `stanova_df.rda` and `bfrms_df.rda` and produces the plot showing the behaviour of the posterior as a function of aggregation for both models.
- `frequentist_analysis.R`: Frequentist analysis of the simulated data using `afex`.
The files of the full posteriors of the Bayesian models are not included here due to their size (over 2.5 GB for each approach).