Running online behavioral experiments using R: Implementation of a response-time decision making task as an R-Shiny app

Online experiments allow for fast, massive, cost-efficient data collection. However, uncontrolled conditions in online experiments can be problematic, particularly when inferences hinge on response-times (RTs) in the millisecond range. To address this challenge, we developed a mobile-friendly open-s...

Full description

Bibliographic Details
Main Authors: Agustín Perez Santangelo, Guillermo Solovey
Format: Article
Language:English
Published: Ubiquity Press 2022-01-01
Series:Journal of Cognition
Subjects:
Online Access:https://www.journalofcognition.org/articles/200
_version_ 1819278851703832576
author Agustín Perez Santangelo
Guillermo Solovey
author_facet Agustín Perez Santangelo
Guillermo Solovey
author_sort Agustín Perez Santangelo
collection DOAJ
description Online experiments allow for fast, massive, cost-efficient data collection. However, uncontrolled conditions in online experiments can be problematic, particularly when inferences hinge on response-times (RTs) in the millisecond range. To address this challenge, we developed a mobile-friendly open-source application using R-Shiny, a popular R package. In particular, we aimed to replicate the numerical distance effect, a well-established cognitive phenomenon. In the task, 169 participants (109 with a mobile device, 60 on a desktop computer) completed 116 trials displaying two-digit target numbers and decided whether they were larger or smaller than a fixed standard number. Sessions lasted ~7-minutes. Using generalized linear mixed models estimated with Bayesian inference methods, we observed a numerical distance effect: RTs decreased with the logarithm of the absolute difference between the target and the standard. Our results support the use of R-Shiny for RT-data collection. Furthermore, our method allowed us to measure systematic shifts in recorded RTs related to different OSs, web browsers, and devices, with mobile devices inducing longer shifts than desktop devices. Our work shows that precise RT measures can be reliably obtained online across mobile and desktop devices. It further paves the ground for the design of simple experimental tasks using R, a widely popular programming framework among cognitive scientists.
first_indexed 2024-12-24T00:18:35Z
format Article
id doaj.art-e44480fc2ea74854b5cc0a8454dae918
institution Directory Open Access Journal
issn 2514-4820
language English
last_indexed 2024-12-24T00:18:35Z
publishDate 2022-01-01
publisher Ubiquity Press
record_format Article
series Journal of Cognition
spelling doaj.art-e44480fc2ea74854b5cc0a8454dae9182022-12-21T17:24:39ZengUbiquity PressJournal of Cognition2514-48202022-01-015110.5334/joc.200219Running online behavioral experiments using R: Implementation of a response-time decision making task as an R-Shiny appAgustín Perez Santangelo0Guillermo Solovey1Laboratorio de Neurociencia, Universidad Torcuato Di Tella, Buenos AiresInstituto de Cálculo, Universidad de Buenos Aires, Buenos AiresOnline experiments allow for fast, massive, cost-efficient data collection. However, uncontrolled conditions in online experiments can be problematic, particularly when inferences hinge on response-times (RTs) in the millisecond range. To address this challenge, we developed a mobile-friendly open-source application using R-Shiny, a popular R package. In particular, we aimed to replicate the numerical distance effect, a well-established cognitive phenomenon. In the task, 169 participants (109 with a mobile device, 60 on a desktop computer) completed 116 trials displaying two-digit target numbers and decided whether they were larger or smaller than a fixed standard number. Sessions lasted ~7-minutes. Using generalized linear mixed models estimated with Bayesian inference methods, we observed a numerical distance effect: RTs decreased with the logarithm of the absolute difference between the target and the standard. Our results support the use of R-Shiny for RT-data collection. Furthermore, our method allowed us to measure systematic shifts in recorded RTs related to different OSs, web browsers, and devices, with mobile devices inducing longer shifts than desktop devices. Our work shows that precise RT measures can be reliably obtained online across mobile and desktop devices. It further paves the ground for the design of simple experimental tasks using R, a widely popular programming framework among cognitive scientists.https://www.journalofcognition.org/articles/200online experimentsr-shinyresponse timenumerical cognition
spellingShingle Agustín Perez Santangelo
Guillermo Solovey
Running online behavioral experiments using R: Implementation of a response-time decision making task as an R-Shiny app
Journal of Cognition
online experiments
r-shiny
response time
numerical cognition
title Running online behavioral experiments using R: Implementation of a response-time decision making task as an R-Shiny app
title_full Running online behavioral experiments using R: Implementation of a response-time decision making task as an R-Shiny app
title_fullStr Running online behavioral experiments using R: Implementation of a response-time decision making task as an R-Shiny app
title_full_unstemmed Running online behavioral experiments using R: Implementation of a response-time decision making task as an R-Shiny app
title_short Running online behavioral experiments using R: Implementation of a response-time decision making task as an R-Shiny app
title_sort running online behavioral experiments using r implementation of a response time decision making task as an r shiny app
topic online experiments
r-shiny
response time
numerical cognition
url https://www.journalofcognition.org/articles/200
work_keys_str_mv AT agustinperezsantangelo runningonlinebehavioralexperimentsusingrimplementationofaresponsetimedecisionmakingtaskasanrshinyapp
AT guillermosolovey runningonlinebehavioralexperimentsusingrimplementationofaresponsetimedecisionmakingtaskasanrshinyapp