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

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.

Value

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

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.

Author

Pascal J. Kieslich

Felix Henninger

Examples

mt_check_resolution(mt_example)
#> $summary
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>   1.000  10.000  10.000   9.977  10.000  14.000 
#> 
#> $sd
#> [1] 0.4015953
#> 
#> $frequencies
#> log_diffs
#>    1    2    3    4    6    7    8   10   11   14 
#>    4    7    4    1    8    4    8 7504    5    1 
#> 
#> $relative_frequencies
#> log_diffs
#>      1      2      3      4      6      7      8     10     11     14 
#> 0.0005 0.0009 0.0005 0.0001 0.0011 0.0005 0.0011 0.9944 0.0007 0.0001 
#>