MyNixOS website logo
Description

An Implementation of Common Response Time Trimming Methods.

Provides various commonly-used response time trimming methods, including the recursive / moving-criterion methods reported by Van Selst and Jolicoeur (1994). By passing trimming functions raw data files, the package will return trimmed data ready for inferential testing.

trimr: Response Time Trimming in R

For a detailed overview of how to use trimr, please see the vignettes.

Installation

A stable release of trimris available on CRAN. To install this, use:

install.packages("trimr")

You can also install the latest developmental version of trimr. Please note, though, that this version is undergoing testing and potentially has unidentified bugs. (If you do use this version and note a bug, please log it as an issue). To install the developmental version, you will first need to install the devtools package and install trimr directly from GitHub by using the following commands:

# install devtools
install.packages("devtools")

# install trimr from GitHub
devtools::install_github("JimGrange/trimr")

Overview

trimr is an R package that implements most commonly-used response time trimming methods, allowing the user to go from a raw data file to a finalised data file ready for inferential statistical analysis.

The trimming functions available in trimr fall broadly into three families:

  1. Absolute Value Criterion
  2. Standard Deviation Criterion
  3. Recursive / Moving Criterion

The latter implements the methods first suggsted by Van Selst & Jolicoeur (1994).

Example

In the example below, we go from a data frame containing data from 32 participants (in total, 20,518 trials) to a trimmed data set showing the mean trimmed RT for each experimental condition & participant using the modified recursive trimming procedure of Van Selst & Jolicoeur (1994):

# load trimr's library
library(trimr)

# load the example data that ships with trimr
data(exampleData)

# look at the top of the example raw data
head(exampleData)
#>   participant condition   rt accuracy
#> 1           1    Switch 1660        1
#> 2           1    Switch  913        1
#> 3           1    Repeat 2312        1
#> 4           1    Repeat  754        1
#> 5           1    Switch 3394        1
#> 6           1    Repeat  930        1

# perform the trimming
trimmedData <- modifiedRecursive(data = exampleData, minRT = 150, digits = 0)

# look at the trimmedData
trimmedData
#>    participant Switch Repeat
#> 1            1   1047    717
#> 2           10    779    647
#> 3           11   1075    931
#> 4           12    871    638
#> 5           13    911    763
#> 6           14   1014    799
#> 7           15   1151    831
#> 8           16    983    675
#> 9           17    831    664
#> 10          18    870    761
#> 11          19    672    584
#> 12           2   1118   1022
#> 13          20   1035    718
#> 14          21    807    680
#> 15          22   1239    941
#> 16          23    786    685
#> 17           3   1020    793
#> 18           4   1103    804
#> 19           5   1184    916
#> 20           6   1430   1123
#> 21           7    994    851
#> 22           8   1118    930
#> 23           9    951    721
#> 24          24    627    589
#> 25          25    590    602
#> 26          26    721    682
#> 27          27    826    784
#> 28          28    706    653
#> 29          29    543    560
#> 30          30    751    652
#> 31          31   1080    977
#> 32          32    686    634

Installation Instructions

To install the package from GitHub, you need the devools package:

install.packages("devtools")
library(devtools)

Then trimr can be directly installed:

devtools::install_github("JimGrange/trimr")

References

Van Selst, M., & Jolicoeur, P. (1994). A solution to the effect of sample size on outlier elimination. Quarterly Journal of Experimental Psychology, 47 (A), 631–650.

Metadata

Version

1.1.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows