Plot a time-window dataset

Description

Plots the data returned from make_time_window_data. Data can be mapped onto (up to two) predictor columns. If no predictor columns are supplied, AOI is placed on the x-axis; otherwise, data for each AOI is set in a separate facet.

Usage

1
2
3
## S3 method for class 'time_window_data'
plot(x, predictor_columns = NULL, dv = "Prop",
  ...)

Arguments

x

The data returned by make_time_window_data()

predictor_columns

Up to two columns indicating predictors. The first maps to the X-axis, the second to group/color. If the latter is numeric, a median split is performed.

dv

Which dv should be used in plotting? Raw proportion-looking ("Prop"), empirical logit ("Elog"), or "ArcSin"?

...

Ignored

Details

Data are collapsed by-participants for plotting.

Value

A ggplot object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)
response_window_agg_by_sub <- make_time_window_data(data, 
                                                    aois='Animate',
                                                    predictor_columns=c('Age','MCDI_Total'))
                                                    
plot(response_window_agg_by_sub, predictor_columns="Age", dv = "LogitAdjusted") 

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