mt_check_resolution {mousetrap}R Documentation

Check logging resolution by looking at timestamp differences.

Description

mt_check_resolution computes the timestamp differences as a measure of the logging resolution. It provides various descriptive statistics to check the logging resolution.

Usage

mt_check_resolution(
  data,
  use = "trajectories",
  timestamps = "timestamps",
  desired = NULL,
  digits = NULL
)

Arguments

data

a mousetrap data object created using one of the mt_import functions (see mt_example for details). Alternatively, a trajectory array can be provided directly (in this case use will be ignored).

use

a character string specifying which trajectory data should be used.

timestamps

a character string specifying the trajectory dimension containing the timestamps.

desired

an optional integer. If specified, additional statistics are computed concerning the (relative) frequencies with which exactly the desired timestamp difference (with tolerance 1e-12) occurred.

digits

an optional integer. If specified, timestamps will be rounded before performing any checks. Potentially useful if timestamps are recorded with submillisecond precision.

Details

If mouse-tracking experiments are conducted using the mousetrap plug-ins for OpenSesame, the logging resolution can be specified explicitly in the experiment under "Logging resolution", which corresponds to the delay (in milliseconds) between recordings of the mouse position. By default, mouse positions are recorded every 10 ms (corresponding to a 100 Hz sampling rate). As the actual resolution achieved depends on the performance of the hardware, it makes sense to check the logging resolution using mt_check_resolution. Note that delays smaller than the specified delay typically result from mouse clicks in the experiment.

Value

A list with various descriptive statistics. For convenience, the relative frequencies are rounded to 4 decimal places.

Author(s)

Pascal J. Kieslich

Felix Henninger

Examples

mt_check_resolution(mt_example)


[Package mousetrap version 3.2.3 Index]