R

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.

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.

Language and vision in conceptual processing: Multilevel analysis and statistical power

Publication

Research has suggested that conceptual processing depends on both language-based and vision-based information. We tested this interplay at three levels of the experimental structure: individuals, words and tasks. To this end, we drew on three …

Language and sensorimotor simulation in conceptual processing: Multilevel analysis and statistical power

Publication

Multilevel analyses investigating the interplay between language-based and vision-based information in conceptual processing across semantic priming, semantic decision and lexical decision paradigms, with power analyses revealing sample size requirements for examining perceptual simulation and individual differences.

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.

Preregistration: The interplay between linguistic and embodied systems in conceptual processing

Publication

This preregistration outlines a study that will investigate the dynamic nature of conceptual processing by examining the interplay between linguistic distributional systems—comprising word co-occurrence and word association—and embodied systems—comprising sensorimotor and emotional information. A set of confirmatory research questions are addressed using data from the Calgary Semantic Decision project, along with additional measures for the stimuli corresponding to distributional language statistics, embodied information, and individual differences in vocabulary size.

WebVTT caption transcription app

Software Web application

Open-source, R-based application that converts video captions from the WebVTT format into plain text, automatically removing timestamps and formatting the content into accessible documents.

Mixed-effects models in R and a new tool for data simulation

Presentation

In this talk, I will look over the rationale for LMEMs, and demonstrate how to fit them in R (Brauer & Curtin, 2018; Luke, 2017). Challenges will also be covered. For instance, when using the widely-accepted ‘maximal’ approach, based on fitting all possible random effects for each fixed effect, models sometimes fail to find a solution, or ‘convergence’. Advice for the problem of nonconvergence will be demonstrated, based on the progressive lightening of the random effects structure (Singman & Kellen, 2017; for an alternative approach, especially with small samples, see Matuschek et al., 2017). At the end, on a different note, I will present a web application that facilitates data simulation for research and teaching (Bernabeu & Lynott, 2020).

Reproducibilidad en torno a una aplicación web

Presentation

Las aplicaciones web nos ayudan a facilitar el uso de nuestro trabajo, ya que no requieren programación para utilizarlas. Crear estas aplicaciones en R, mediante paquetes como “shiny” o “flexdashboard”, ofrece múltiples ventajas. Entre ellas destaca la reproducibilidad, tal como veremos en torno a una aplicación para la simulación de datos (https://github.com/pablobernabeu/Experimental-data-simulation).

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.

R Markdown amidst Madison parks

Post

This document is part of teaching materials created for the workshop ‘Open data and reproducibility v2.1: R Markdown, dashboards and Binder’, delivered at the CarpentryCon 2020 conference. The purpose of this specific document is to practise R Markdown, including basic features such as Markdown markup and code chunks, along with more special features such as cross-references for figures, tables, code chunks, etc. Since this conference was originally going to take place in Madison, let's look at some open data from the City of Madison.

Web application for the simulation of experimental data

Software Web application

Open-source, R-based web application for creating experimental data sets with customisable structures, including between-group and within-participant variables that can be categorical or continuous.

Data dashboard: Butterfly species richness in Los Angeles

Software Web application

Dashboard presenting open data from Prudic et al. (2018), who compared three ways of recording butterfly species richness in Los Angeles: Pollard walks by trained volunteers, Malaise traps with expert identification and crowd-sourced iNaturalist …

Data is present: Workshops and datathons

Post

This project offers free activities to learn and practise reproducible data presentation. Pablo Bernabeu organises these events in the context of a Software Sustainability Institute Fellowship. Programming languages such as R and Python offer free, powerful resources for data processing, visualisation and analysis. Experience in these programs is highly valued in data-intensive disciplines. Original data has become a public good in many research fields thanks to cultural and technological advances. On the internet, we can find innumerable data sets from sources such as scientific journals and repositories (e.g., OSF), local and national governments, non-governmental organisations (e.g., data.world), etc. Activities comprise free workshops and datathons.

Event-related potentials: Why and how I used them

Post

Overview of event-related potentials as a research method, covering electroencephalography fundamentals, ERP definitions and processing, and their application to studying the time course of cognitive processes like conceptual processing.