s

A new function to plot convergence diagnostics from lme4::allFit()

Post

When a model has struggled to find enough information in the data to account for every predictor—especially for every random effect—, convergence warnings appear (Brauer & Curtin, 2018; Singmann & Kellen, 2019). In this article, I review the issue of convergence before presenting a new plotting function in R that facilitates the visualisation of the fixed effects fitted by different optimization algorithms (also dubbed optimizers).

Assigning participant-specific parameters automatically in OpenSesame

Post

Python inline script for OpenSesame that automatically loads participant-specific parameters from a CSV file, enabling complex counterbalancing schemes beyond the standard interface options.

Pronominal object clitics in preverbal position are a hard nut to crack for Google Translate

Post

Analysis of how Google Translate handles pronominal object clitics in preverbal position in Romance languages, which serve to emphasize the agent and require marked translations to preserve this focus in English.

Specifying version number in OSF download links

Post

How to append version numbers to OSF download links using the ‘?version=X’ parameter to document and preserve the exact versions of files used in research projects.

Covariates are necessary to validate the variables of interest and to prevent bogus theories

Post

Covariates serve two essential purposes: statistically accounting for satellite variables that may affect variables of interest, and academically preventing the development of redundant theories by enabling direct comparisons between related theoretical constructs.

Cannot open plots created with brms::mcmc_plot due to lack of discrete_range function

Post

I would like to ask for advice regarding some plots that were created using brms::mcmc_plot(), and cannot be opened in R now. The plots were created last year using brms 2.17.0, and were saved in RDS objects. The problem I have is that I cannot open the plots in R now because I get an error related to a missing function. I would be very grateful if someone could please advise me if they can think of a possible reason or solution.

A table of results for Bayesian mixed-effects models: Grouping variables and specifying random slopes

Post

Here I share the format applied to tables presenting the results of Bayesian models in Bernabeu (2022). The sample table presents a mixed-effects model that was fitted using the R package ‘brms’ (Bürkner et al., 2022).

A table of results for frequentist mixed-effects models: Grouping variables and specifying random slopes

Post

Here I share the format applied to tables presenting the results of frequentist models in Bernabeu (2022). The sample table presents a mixed-effects model that was fitted using the R package ‘lmerTest’ (Kuznetsova et al., 2022).

Plotting two-way interactions from mixed-effects models using alias variables

Post

Custom function extending sjPlot that plots interactions between continuous and categorical variables while replacing categorical variables with alias variables to facilitate back-transformation of sum-coded predictors for clearer result communication.

Plotting two-way interactions from mixed-effects models using ten or six bins

Post

Custom functions extending sjPlot for plotting interactions between two continuous variables by dividing one into ten bins (deciles) or six bins (sextiles), with optional sample size display in legend for individual differences research.

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

Post

Frequentist and Bayesian statistics are sometimes regarded as fundamentally different philosophies. Indeed, can both qualify as philosophies or is one of them just a pointless ritual? Is frequentist statistics only about p values? Are frequentist estimates diametrically opposed to Bayesian posterior distributions? Are confidence intervals and credible intervals irreconcilable? Will R crash if lmerTest and brms are simultaneously loaded?

Bayesian workflow: Prior determination, predictive checks and sensitivity analyses

Post

This post presents a run-through of a Bayesian workflow in R. The content is closely based on Bernabeu (2022), which was in turn based on lots of other references, also cited here.

Avoiding (R) Markdown knitting errors using knit_deleting_service_files()

Post

The function knit_deleting_service_files() helps avoid (R) Markdown knitting errors caused by files and folders remaining from previous knittings (e.g., manuscript.tex, ZHJhZnQtYXBhLlJtZA==.Rmd, manuscript.synctex.gz). The only obligatory argument for this function is the name of a .Rmd or .md file. The optional argument is a path to a directory containing this file. The function first offers deleting potential service files and folders in the directory. A confirmation is required in the console (see screenshot below). Next, the document is knitted. Last, the function offers deleting potential service files and folders again.

Walking the line between reproducibility and efficiency in R Markdown: Three methods

Post

Three methods for balancing reproducibility and efficiency in R Markdown documents: embedding fast code directly, sourcing long but fast code from external scripts, and pre-running slow code while loading saved results.

Tackling knitting errors in R Markdown

Post

Three troubleshooting tips for resolving knitting errors in R Markdown: closing PDF reader windows, deleting service files with .tex and other extensions, and removing auto-generated appendix code chunks.

Parallelizing simr::powercurve() in R

Post

Three strategies for reducing computation time when using simr::powercurve with Kenward-Roger or Satterthwaite methods: using high-performance computing, parallelizing different effects, and parallelizing different sample sizes within the breaks argument.

Brief Clarifications, Open Questions: Commentary on Liu et al. (2018)

Post

Critical examination of Liu et al. (2018) claims about methodological inconsistencies in ERP studies of conceptual modality switching, arguing that their conclusions overlook theoretical and methodological justifications for varying analytical approaches.

Collaboration while using R Markdown

Post

Based on Michael Frank's presentation, three methods for collaborating on R Markdown documents: using GitHub for version control, copying text to trackable editors while preserving code, or knitting to Word/PDF formats.

Notes about punctuation in formal writing

Post

Common punctuation pitfalls in formal writing, including run-on sentences, comma splices, and the appropriate use of the Oxford comma based on whether disambiguation is needed.

Stray meetings in Microsoft Teams

Post

Unwanted, stranded meetings, overlapping with a general one in a channel, can occur when people click on the ‘Meet’ button, instead of clicking on the same ‘Join’ button in the chat field. This may especially happen to those who reach the channel first, or who cannot see the ‘Join’ button in the chat field because this field has been taken up by messages.