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.

# S3 method for 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

Value

A ggplot object

Details

Data are collapsed by-participants for plotting.

Examples

if (FALSE) {
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")
}