Clean data by removing high-trackloss trials/subjects.

Share:

Description

Remove trials/participants with too much trackloss, with a customizable threshold.

Usage

1
2
clean_by_trackloss(data, participant_prop_thresh = 1, trial_prop_thresh = 1,
  window_start_time = -Inf, window_end_time = Inf)

Arguments

data

Data already run through make_eyetrackingr_data

participant_prop_thresh

Maximum proportion of trackloss for participants

trial_prop_thresh

Maximum proportion of trackloss for trials

window_start_time, window_end_time

Time-window within which you want trackloss analysis to be based. Allows you to keep the entire trial window for data, but clean based on the trackloss within a subset of it

Value

Cleaned data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
data(word_recognition)
data <- make_eyetrackingr_data(word_recognition, 
                               participant_column = "ParticipantName",
                               trial_column = "Trial",
                               time_column = "TimeFromTrialOnset",
                               trackloss_column = "TrackLoss",
                               aoi_columns = c('Animate','Inanimate'),
                               treat_non_aoi_looks_as_missing = TRUE
)

# scrub all trials with greater than 25% trackloss, and all
# participants with greater than 25% trackloss on average
# during the timeperiod 15500-2100
data_clean <- clean_by_trackloss(data,
                                 participant_prop_thresh = .25, 
                                 trial_prop_thresh = .25,
                                 window_start_time = 15500, 
                                 window_end_time = 21000
)

# scrub all trials with greater than 25% trackloss, but leave participants with a high average
data_clean <- clean_by_trackloss(data,
                                 trial_prop_thresh = .25,
                                 window_start_time = 15500, 
                                 window_end_time = 21000
)
  

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.