Publications by R on Pablo Bernabeu

FAIR standards for the creation of research materials, with examples

01.11.2023

Notwithstanding the need for speed in most scientific projects, what should be the minimum acceptable standards in the creation of research materials such as stimuli, custom software for data collection (e.g., experiment in jsPsych, OpenSesame or psychoPy), or scripts for statistical analysis? The answer to this question is contingent upon the fiel...

14580 sym R (1162 sym/3 pcs)

FAQs on mixed-effects models

03.11.2023

I am dealing with nested data, and I remember from an article by Clark (1973) that nested should be analysed using special models. I’ve looked into mixed-effects models, and I’ve reached a structure with random intercepts by subjects and by items. Is this fine? In early days, researchers would aggregate the data across these repeated measures ...

5829 sym Python (311 sym/2 pcs)

ggplotting power curves from simr package

26.06.2023

The R package simr has greatly facilitated power analysis for mixed-effects models using Monte Carlo simulation (i.e., hundreds or thousands of tests under slight variations of the data). The powerCurve function is used to estimate the statistical power for various sample sizes in one go. Since it runs serially, it can take a VERY long time to fini...

861 sym

How to break down colour variable in sjPlot::plot_model into equally-sized bins

24.06.2023

Whereas the direction of main effects can be interpreted from the sign of the estimate, the interpretation of interaction effects often requires plots. This task is facilitated by the R package sjPlot (Lüdecke, 2022). For instance, using the plot_model function, I plotted the interaction between two continuous variables. library(lme4) #> Loading r...

1396 sym R (3252 sym/3 pcs) 6 img

How to visually assess the convergence of a mixed-effects model by plotting various optimizers

24.06.2023

To assess whether convergence warnings render the results invalid, or on the contrary, the results can be deemed valid in spite of the warnings, Bates et al. (2023) suggest refitting models affected by convergence warnings with a variety of optimizers. The authors argue that, if the different optimizers produce practically-equivalent results, the ...

1544 sym R (3788 sym/2 pcs) 2 img

How to map more informative values onto fill argument of sjPlot::plot_model

24.06.2023

Whereas the direction of main effects can be interpreted from the sign of the estimate, the interpretation of interaction effects often requires plots. This task is facilitated by the R package sjPlot (Lüdecke, 2022). For instance, using the plot_model function, I plotted the interaction between a continuous variable and a categorical variable. Th...

1301 sym R (2300 sym/2 pcs) 4 img

How to break up colour variable in sjPlot into equally-sized bins

24.06.2023

Whereas the direction of main effects can be interpreted from the sign of the estimate, the interpretation of interaction effects often requires plots. This task is facilitated by the R package sjPlot (Lüdecke, 2022). For instance, using the plot_model function, I plotted the interaction between two continuous variables. library(lme4) #> Loading r...

1387 sym R (3180 sym/3 pcs) 6 img

Why can’t we be friends? Plotting frequentist (lmerTest) and Bayesian (brms) mixed-effects models

22.12.2022

Frequentist and Bayesian statistics are sometimes regarded as fundamentally different philosophies. Indeed, can both methods qualify as philosophies, or is one of them just a pointless ritual? Is frequentist statistics about \(p\) values only? Are frequentist estimates diametrically opposed to Bayesian posterior distributions? Are confidence inte...

5054 sym R (2179 sym/1 pcs)

Why can’t we be friends? Plotting frequentist (lme4) and Bayesian (brms) mixed-effects models

22.12.2022

Frequentist and Bayesian statistics are sometimes regarded as fundamentally different philosophies. Indeed, can both methods qualify as philosophies, or is one of them just a pointless ritual? Is frequentist statistics about \(p\) values only? Are frequentist estimates diametrically opposed to Bayesian posterior distributions? Are confidence inte...

5046 sym R (2179 sym/1 pcs)

Bayesian workflow: Prior determination, predictive checks and sensitivity analyses

21.12.2022

This post presents a code-through of a Bayesian workflow in R, which can be reproduced using the materials at https://osf.io/gt5uf. The content is closely based on Bernabeu (2022), which was in turn based on lots of other references. In addition to those, you may wish to consider Nicenboim et al. (2023), a book in preparation that is already avai...

7380 sym