This script creates visualizations for Social Cross-situational Word Learning Project. For the statistical models, see the .Rmd file for the manuscript.

Clear workspace and set working directory

Read in data from all 4 Experiments:

Experiment 1

Get the number of subjects in each condition.

condition intervalNum numPicN n_subs
No-Social 0 2 46
No-Social 0 4 39
No-Social 0 6 39
No-Social 0 8 44
No-Social 1 2 45
No-Social 1 4 47
No-Social 1 6 35
No-Social 1 8 37
No-Social 3 2 42
No-Social 3 4 46
No-Social 3 6 36
No-Social 3 8 41
No-Social 7 2 50
No-Social 7 4 42
No-Social 7 6 34
No-Social 7 8 40
Social 0 2 48
Social 0 4 82
Social 0 6 37
Social 0 8 43
Social 1 2 44
Social 1 4 88
Social 1 6 44
Social 1 8 44
Social 3 2 47
Social 3 4 87
Social 3 6 40
Social 3 8 43
Social 7 2 47
Social 7 4 90
Social 7 6 38
Social 7 8 38

Set up filters

Get test trials for analysis. Here we have 2 filters:

  • Remove fast/slow RTs
  • Remove fast/slow RTs & subjects who performed below chance selecting gaze target on exposure trials

Get the number of subjects filtered out

condition n_subs n_subs_filt
No-Social 663 663
Social 847 770

Accuracy on exposure trials in social condition

Get means and CIs for each combination of number of referents and interval

Now plot those means and CIs.

RT on exposure trials

Next we compare reaction times across social/no-social at different levels of attention and memory demands.

Clean up the variable names for plotting.

Now we plot mean reaction times for each condition.

Accuracy on test trials

Experiment 2

In Experiment 2, we chose a subset of the referent/interval conditions: numPic = 4, and interval = 0 and 3.

Get the number of subjects in each condition.

condition interval n_subs
No-socialFirst Three 81
No-socialFirst Zero 79
SocialFirst Three 80
SocialFirst Zero 82

Set up filters

Exposure trials.

Get the number of subjects filtered out by the subject level filter.

condition n_subs n_subs_filt
No-socialFirst 159 159
SocialFirst 162 162

Test trial filters.

Analyze Exposure Trials

Accuracy, selecting target of gaze.

## # A tibble: 2 x 3
##   condition_trial median_rt  mean_rt
##            <fctr>     <dbl>    <dbl>
## 1       no-social    5010.5 5388.491
## 2          social    3942.5 4148.283

RT on exposure trials.

Plot RT differences

Analyze test trials

Get means and CIs for each condition.

Now plot accuracy for test trials.

Accuracy barplots

Experiment 3

Get the number of subjects in each experiment and condition.

prop_cond_clean experiment n_subs
0% replication 99
100% replication 96
25% replication 97
50% replication 100
75% replication 98

Analyze performance on test block

Plot proportion of participants who chose target of gaze as a function of condition.

Plot relationship between reliablity condition and subjective reliabiltiy judgments.

Plot subjective reliability as a function of choosing the gaze target.

Final plot

Inspection time analysis

Here we plot accuracy at test as a function of how long participants inspected the display during exposure at the trial level.

First we need to get RT on exposure for each test trial

Experiment 4

interval inspection_cond n_subs
Three long 93
Three short 89
Zero long 93
Zero short 90

Now plot.

Now the same plot, but collapsed across inspection conditions.

Finally, we want to compare the inpection time data to the participant controlled version (experiment 2).

Overall, we see a similar pattern of data. Interval affects same trials more than switch trials. Same trials are easier than switch trials. And participants in the no-gaze condition do better on switch trials.

But maybe some tricky things to interpret here? One, it looks like adding fixed inspection time made the task harder overall. Two, there is a small difference on Same trials, with better performance in the Gaze condition. And three, inspection time seems to affect switch trial performance in the no-gaze condition more than the gaze condition. Why?

Now the same plot, but as a bar graph.