Warning: There was 1 warning in `mutate()`.
ℹ In argument: `looking_time_s = as.numeric(lookin_time_s)`.
Caused by warning:
! NAs introduced by coercion
Just for fun.
ggplot(ghana, aes(x = trial_num, y = looking_time_s, col = trial_type)) +geom_jitter(width = .2, height =0, alpha = .5) +geom_smooth()
`geom_smooth()` using method = 'loess' and formula = 'y ~ x'
Warning: Removed 28 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: pseudoinverse used at -2.005
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: reciprocal condition number 0
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: There are other near singularities as well. 1.01
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
-2.005
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
1.005
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
number 0
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : There are other near
singularities as well. 1.01
Warning: Removed 28 rows containing missing values or values outside the scale range
(`geom_point()`).
ggplot(ghana, aes(x = looking_time_s, fill = trial_type)) +geom_histogram(binwidth =1)
Warning: Removed 28 rows containing non-finite outside the scale range
(`stat_bin()`).
Rows: 579 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): trial_type, lab, subid
dbl (2): trial_num, looking_time_s
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
ggplot(uganda, aes(x = trial_num, y = looking_time_s, col = trial_type)) +geom_jitter(width = .2, height =0, alpha = .5) +geom_smooth()
`geom_smooth()` using method = 'loess' and formula = 'y ~ x'
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: pseudoinverse used at -2.005
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: reciprocal condition number 0
Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
: There are other near singularities as well. 1.01
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
-2.005
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
1.005
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
number 0
Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
else if (is.data.frame(newdata))
as.matrix(model.frame(delete.response(terms(object)), : There are other near
singularities as well. 1.01
ggplot(uganda, aes(x = looking_time_s, fill = trial_type)) +geom_histogram(binwidth =1)
Warning: One or more parsing issues, call `problems()` on your data frame for details,
e.g.:
dat <- vroom(...)
problems(dat)
Rows: 883 Columns: 24
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (11): SubjectID, Phase, Order (randomization), Trial, Repeat, EndType, H...
dbl (9): Trial Start, Trial End, TotalLook, TotalLookAway, TotalLeft, Total...
lgl (4): StimLabel, Left, Right, ISS
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Warning: One or more parsing issues, call `problems()` on your data frame for details,
e.g.:
dat <- vroom(...)
problems(dat)
Rows: 1787 Columns: 24
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (11): SubjectID, Phase, Order (randomization), Trial, Repeat, EndType, H...
dbl (9): Trial Start, Trial End, TotalLook, TotalLookAway, TotalLeft, Total...
lgl (4): StimLabel, Left, Right, ISS
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Warning: One or more parsing issues, call `problems()` on your data frame for details,
e.g.:
dat <- vroom(...)
problems(dat)
Rows: 2886 Columns: 24
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (11): SubjectID, Phase, Order (randomization), Trial, Repeat, EndType, H...
dbl (9): Trial Start, Trial End, TotalLook, TotalLookAway, TotalLeft, Total...
lgl (4): StimLabel, Left, Right, ISS
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Warning: One or more parsing issues, call `problems()` on your data frame for details,
e.g.:
dat <- vroom(...)
problems(dat)
Rows: 1858 Columns: 24
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (11): SubjectID, Phase, Order (randomization), Trial, Repeat, EndType, H...
dbl (9): Trial Start, Trial End, TotalLook, TotalLookAway, TotalLeft, Total...
lgl (4): StimLabel, Left, Right, ISS
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 491 Columns: 24
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (10): SubjectID, Phase, Order (randomization), Trial, Repeat, EndType, H...
dbl (9): Trial Start, Trial End, TotalLook, TotalLookAway, TotalLeft, Total...
lgl (5): StimLabel, Left, Right, ISS, Looks
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Warning: There was 1 warning in `mutate()`.
ℹ In argument: `order = as.numeric(str_sub(order_randomization, 7, 7))`.
Caused by warning:
! NAs introduced by coercion
Joint analysis
d <-bind_rows(ghana, uganda, log_labs_data)
We investigate what the different columns mean. Our hypothesis: - looking_time_s: total look = looking time, not including lookaways - enabled_diff: look_disabled - look_enabled = looking time, including lookaways but not attn getters - looking_time_diff: trial_end - trial_start = including lookaways AND attention getters
Warning: Removed 28 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 28 rows containing missing values or values outside the scale range
(`geom_point()`).
We have issues with two labs.
Senegal has a lot of zero looking times. It appears that this is due plausibly to two intersecting issues:
a bug in habit such that if you hold down the key forever, you get LT = 0.
probable misuse of the software by holding down the key a lot.
Nigeria has no looking times and their enabled_diff is always 18s. I worry that they basically didn’t press any keys and just let the experiment run. I also think that they maybe did not use the orders that were assigned. (This is a separate problem).
Senegal
Can we rescue Senegal data? Let’s look at their data. They have a few looking times that are not 0 or 18.