1. Code and Documentation

Load all the necessary packages

library(tidyverse)
library(janitor)
library(broom)
library(gridExtra)
library(qualtRics)

Experiment 1

Read the file

For the first step I remembered about the read_csv function that I learnt so I decided to use that. I want to make sure there is a raw dataframe I can always go back to, and one that to use for all my reproducibility. I used clean_names just to make sure naming schemes are standardised. The original file name was called “Study 8 data”.

exp1_raw <- read_csv("Study 8 data.csv") %>%
  clean_names()
## Rows: 373 Columns: 340
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (340): StartDate, EndDate, Status, IPAddress, Progress, Duration (in sec...
## 
## ℹ 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.
glimpse(exp1_raw)
## Rows: 373
## Columns: 340
## $ start_date           <chr> "Start Date", "{\"ImportId\":\"startDate\",\"time…
## $ end_date             <chr> "End Date", "{\"ImportId\":\"endDate\",\"timeZone…
## $ status               <chr> "Response Type", "{\"ImportId\":\"status\"}", "0"…
## $ ip_address           <chr> "IP Address", "{\"ImportId\":\"ipAddress\"}", "**…
## $ progress             <chr> "Progress", "{\"ImportId\":\"progress\"}", "100",…
## $ duration_in_seconds  <chr> "Duration (in seconds)", "{\"ImportId\":\"duratio…
## $ finished             <chr> "Finished", "{\"ImportId\":\"finished\"}", "1", "…
## $ recorded_date        <chr> "Recorded Date", "{\"ImportId\":\"recordedDate\",…
## $ response_id          <chr> "Response ID", "{\"ImportId\":\"_recordId\"}", "R…
## $ recipient_last_name  <chr> "Recipient Last Name", "{\"ImportId\":\"recipient…
## $ recipient_first_name <chr> "Recipient First Name", "{\"ImportId\":\"recipien…
## $ recipient_email      <chr> "Recipient Email", "{\"ImportId\":\"recipientEmai…
## $ external_reference   <chr> "External Data Reference", "{\"ImportId\":\"exter…
## $ location_latitude    <chr> "Location Latitude", "{\"ImportId\":\"locationLat…
## $ location_longitude   <chr> "Location Longitude", "{\"ImportId\":\"locationLo…
## $ distribution_channel <chr> "Distribution Channel", "{\"ImportId\":\"distribu…
## $ user_language        <chr> "User Language", "{\"ImportId\":\"userLanguage\"}…
## $ consent              <chr> "If you would like to take part in this study, pl…
## $ pid                  <chr> "Your 24 character Prolific ID should have been e…
## $ gender               <chr> "Please select your gender", "{\"ImportId\":\"QID…
## $ age                  <chr> "Please enter your age", "{\"ImportId\":\"QID156_…
## $ qid2_first_click     <chr> "Timing - First Click", "{\"ImportId\":\"QID2_FIR…
## $ qid2_last_click      <chr> "Timing - Last Click", "{\"ImportId\":\"QID2_LAST…
## $ qid2_page_submit     <chr> "Timing - Page Submit", "{\"ImportId\":\"QID2_PAG…
## $ qid2_click_count     <chr> "Timing - Click Count", "{\"ImportId\":\"QID2_CLI…
## $ qid4_first_click     <chr> "Timing - First Click", "{\"ImportId\":\"QID4_FIR…
## $ qid4_last_click      <chr> "Timing - Last Click", "{\"ImportId\":\"QID4_LAST…
## $ qid4_page_submit     <chr> "Timing - Page Submit", "{\"ImportId\":\"QID4_PAG…
## $ qid4_click_count     <chr> "Timing - Click Count", "{\"ImportId\":\"QID4_CLI…
## $ qid6_first_click     <chr> "Timing - First Click", "{\"ImportId\":\"QID6_FIR…
## $ qid6_last_click      <chr> "Timing - Last Click", "{\"ImportId\":\"QID6_LAST…
## $ qid6_page_submit     <chr> "Timing - Page Submit", "{\"ImportId\":\"QID6_PAG…
## $ qid6_click_count     <chr> "Timing - Click Count", "{\"ImportId\":\"QID6_CLI…
## $ qid8_first_click     <chr> "Timing - First Click", "{\"ImportId\":\"QID8_FIR…
## $ qid8_last_click      <chr> "Timing - Last Click", "{\"ImportId\":\"QID8_LAST…
## $ qid8_page_submit     <chr> "Timing - Page Submit", "{\"ImportId\":\"QID8_PAG…
## $ qid8_click_count     <chr> "Timing - Click Count", "{\"ImportId\":\"QID8_CLI…
## $ qid10_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID10_FI…
## $ qid10_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID10_LAS…
## $ qid10_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID10_PA…
## $ qid10_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID10_CL…
## $ qid12_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID12_FI…
## $ qid12_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID12_LAS…
## $ qid12_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID12_PA…
## $ qid12_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID12_CL…
## $ qid14_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID14_FI…
## $ qid14_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID14_LAS…
## $ qid14_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID14_PA…
## $ qid14_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID14_CL…
## $ qid16_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID16_FI…
## $ qid16_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID16_LAS…
## $ qid16_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID16_PA…
## $ qid16_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID16_CL…
## $ qid18_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID18_FI…
## $ qid18_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID18_LAS…
## $ qid18_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID18_PA…
## $ qid18_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID18_CL…
## $ qid20_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID20_FI…
## $ qid20_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID20_LAS…
## $ qid20_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID20_PA…
## $ qid20_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID20_CL…
## $ qid22_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID22_FI…
## $ qid22_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID22_LAS…
## $ qid22_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID22_PA…
## $ qid22_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID22_CL…
## $ qid24_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID24_FI…
## $ qid24_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID24_LAS…
## $ qid24_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID24_PA…
## $ qid24_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID24_CL…
## $ qid26_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID26_FI…
## $ qid26_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID26_LAS…
## $ qid26_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID26_PA…
## $ qid26_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID26_CL…
## $ qid28_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID28_FI…
## $ qid28_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID28_LAS…
## $ qid28_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID28_PA…
## $ qid28_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID28_CL…
## $ qid30_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID30_FI…
## $ qid30_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID30_LAS…
## $ qid30_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID30_PA…
## $ qid30_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID30_CL…
## $ qid32_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID32_FI…
## $ qid32_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID32_LAS…
## $ qid32_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID32_PA…
## $ qid32_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID32_CL…
## $ qid34_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID34_FI…
## $ qid34_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID34_LAS…
## $ qid34_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID34_PA…
## $ qid34_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID34_CL…
## $ qid36_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID36_FI…
## $ qid36_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID36_LAS…
## $ qid36_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID36_PA…
## $ qid36_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID36_CL…
## $ qid38_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID38_FI…
## $ qid38_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID38_LAS…
## $ qid38_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID38_PA…
## $ qid38_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID38_CL…
## $ qid40_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID40_FI…
## $ qid40_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID40_LAS…
## $ qid40_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID40_PA…
## $ qid40_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID40_CL…
## $ qid42_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID42_FI…
## $ qid42_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID42_LAS…
## $ qid42_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID42_PA…
## $ qid42_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID42_CL…
## $ qid44_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID44_FI…
## $ qid44_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID44_LAS…
## $ qid44_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID44_PA…
## $ qid44_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID44_CL…
## $ qid46_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID46_FI…
## $ qid46_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID46_LAS…
## $ qid46_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID46_PA…
## $ qid46_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID46_CL…
## $ qid48_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID48_FI…
## $ qid48_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID48_LAS…
## $ qid48_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID48_PA…
## $ qid48_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID48_CL…
## $ qid50_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID50_FI…
## $ qid50_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID50_LAS…
## $ qid50_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID50_PA…
## $ qid50_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID50_CL…
## $ qid52_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID52_FI…
## $ qid52_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID52_LAS…
## $ qid52_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID52_PA…
## $ qid52_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID52_CL…
## $ qid54_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID54_FI…
## $ qid54_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID54_LAS…
## $ qid54_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID54_PA…
## $ qid54_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID54_CL…
## $ qid56_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID56_FI…
## $ qid56_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID56_LAS…
## $ qid56_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID56_PA…
## $ qid56_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID56_CL…
## $ qid58_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID58_FI…
## $ qid58_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID58_LAS…
## $ qid58_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID58_PA…
## $ qid58_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID58_CL…
## $ qid60_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID60_FI…
## $ qid60_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID60_LAS…
## $ qid60_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID60_PA…
## $ qid60_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID60_CL…
## $ qid62_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID62_FI…
## $ qid62_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID62_LAS…
## $ qid62_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID62_PA…
## $ qid62_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID62_CL…
## $ qid64_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID64_FI…
## $ qid64_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID64_LAS…
## $ qid64_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID64_PA…
## $ qid64_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID64_CL…
## $ qid66_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID66_FI…
## $ qid66_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID66_LAS…
## $ qid66_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID66_PA…
## $ qid66_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID66_CL…
## $ qid68_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID68_FI…
## $ qid68_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID68_LAS…
## $ qid68_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID68_PA…
## $ qid68_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID68_CL…
## $ qid70_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID70_FI…
## $ qid70_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID70_LAS…
## $ qid70_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID70_PA…
## $ qid70_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID70_CL…
## $ qid72_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID72_FI…
## $ qid72_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID72_LAS…
## $ qid72_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID72_PA…
## $ qid72_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID72_CL…
## $ qid74_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID74_FI…
## $ qid74_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID74_LAS…
## $ qid74_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID74_PA…
## $ qid74_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID74_CL…
## $ qid76_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID76_FI…
## $ qid76_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID76_LAS…
## $ qid76_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID76_PA…
## $ qid76_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID76_CL…
## $ qid78_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID78_FI…
## $ qid78_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID78_LAS…
## $ qid78_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID78_PA…
## $ qid78_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID78_CL…
## $ qid80_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID80_FI…
## $ qid80_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID80_LAS…
## $ qid80_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID80_PA…
## $ qid80_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID80_CL…
## $ qid82_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID82_FI…
## $ qid82_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID82_LAS…
## $ qid82_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID82_PA…
## $ qid82_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID82_CL…
## $ qid84_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID84_FI…
## $ qid84_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID84_LAS…
## $ qid84_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID84_PA…
## $ qid84_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID84_CL…
## $ qid86_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID86_FI…
## $ qid86_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID86_LAS…
## $ qid86_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID86_PA…
## $ qid86_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID86_CL…
## $ qid88_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID88_FI…
## $ qid88_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID88_LAS…
## $ qid88_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID88_PA…
## $ qid88_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID88_CL…
## $ qid90_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID90_FI…
## $ qid90_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID90_LAS…
## $ qid90_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID90_PA…
## $ qid90_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID90_CL…
## $ qid92_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID92_FI…
## $ qid92_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID92_LAS…
## $ qid92_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID92_PA…
## $ qid92_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID92_CL…
## $ qid94_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID94_FI…
## $ qid94_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID94_LAS…
## $ qid94_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID94_PA…
## $ qid94_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID94_CL…
## $ qid96_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID96_FI…
## $ qid96_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID96_LAS…
## $ qid96_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID96_PA…
## $ qid96_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID96_CL…
## $ qid98_first_click    <chr> "Timing - First Click", "{\"ImportId\":\"QID98_FI…
## $ qid98_last_click     <chr> "Timing - Last Click", "{\"ImportId\":\"QID98_LAS…
## $ qid98_page_submit    <chr> "Timing - Page Submit", "{\"ImportId\":\"QID98_PA…
## $ qid98_click_count    <chr> "Timing - Click Count", "{\"ImportId\":\"QID98_CL…
## $ qid100_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID100_F…
## $ qid100_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID100_LA…
## $ qid100_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID100_P…
## $ qid100_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID100_C…
## $ qid102_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID102_F…
## $ qid102_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID102_LA…
## $ qid102_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID102_P…
## $ qid102_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID102_C…
## $ qid104_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID104_F…
## $ qid104_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID104_LA…
## $ qid104_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID104_P…
## $ qid104_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID104_C…
## $ qid106_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID106_F…
## $ qid106_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID106_LA…
## $ qid106_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID106_P…
## $ qid106_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID106_C…
## $ qid108_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID108_F…
## $ qid108_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID108_LA…
## $ qid108_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID108_P…
## $ qid108_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID108_C…
## $ qid110_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID110_F…
## $ qid110_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID110_LA…
## $ qid110_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID110_P…
## $ qid110_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID110_C…
## $ qid112_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID112_F…
## $ qid112_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID112_LA…
## $ qid112_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID112_P…
## $ qid112_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID112_C…
## $ qid114_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID114_F…
## $ qid114_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID114_LA…
## $ qid114_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID114_P…
## $ qid114_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID114_C…
## $ qid116_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID116_F…
## $ qid116_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID116_LA…
## $ qid116_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID116_P…
## $ qid116_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID116_C…
## $ qid118_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID118_F…
## $ qid118_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID118_LA…
## $ qid118_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID118_P…
## $ qid118_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID118_C…
## $ qid120_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID120_F…
## $ qid120_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID120_LA…
## $ qid120_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID120_P…
## $ qid120_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID120_C…
## $ qid122_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID122_F…
## $ qid122_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID122_LA…
## $ qid122_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID122_P…
## $ qid122_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID122_C…
## $ qid124_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID124_F…
## $ qid124_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID124_LA…
## $ qid124_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID124_P…
## $ qid124_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID124_C…
## $ qid126_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID126_F…
## $ qid126_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID126_LA…
## $ qid126_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID126_P…
## $ qid126_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID126_C…
## $ qid128_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID128_F…
## $ qid128_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID128_LA…
## $ qid128_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID128_P…
## $ qid128_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID128_C…
## $ qid130_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID130_F…
## $ qid130_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID130_LA…
## $ qid130_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID130_P…
## $ qid130_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID130_C…
## $ qid132_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID132_F…
## $ qid132_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID132_LA…
## $ qid132_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID132_P…
## $ qid132_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID132_C…
## $ qid134_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID134_F…
## $ qid134_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID134_LA…
## $ qid134_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID134_P…
## $ qid134_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID134_C…
## $ qid136_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID136_F…
## $ qid136_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID136_LA…
## $ qid136_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID136_P…
## $ qid136_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID136_C…
## $ qid138_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID138_F…
## $ qid138_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID138_LA…
## $ qid138_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID138_P…
## $ qid138_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID138_C…
## $ qid140_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID140_F…
## $ qid140_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID140_LA…
## $ qid140_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID140_P…
## $ qid140_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID140_C…
## $ qid142_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID142_F…
## $ qid142_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID142_LA…
## $ qid142_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID142_P…
## $ qid142_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID142_C…
## $ qid144_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID144_F…
## $ qid144_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID144_LA…
## $ qid144_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID144_P…
## $ qid144_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID144_C…
## $ qid146_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID146_F…
## $ qid146_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID146_LA…
## $ qid146_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID146_P…
## $ qid146_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID146_C…
## $ qid148_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID148_F…
## $ qid148_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID148_LA…
## $ qid148_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID148_P…
## $ qid148_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID148_C…
## $ qid150_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID150_F…
## $ qid150_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID150_LA…
## $ qid150_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID150_P…
## $ qid150_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID150_C…
## $ qid152_first_click   <chr> "Timing - First Click", "{\"ImportId\":\"QID152_F…
## $ qid152_last_click    <chr> "Timing - Last Click", "{\"ImportId\":\"QID152_LA…
## $ qid152_page_submit   <chr> "Timing - Page Submit", "{\"ImportId\":\"QID152_P…
## $ qid152_click_count   <chr> "Timing - Click Count", "{\"ImportId\":\"QID152_C…
## $ contradiction_1      <chr> "Of the 19 headlines you just saw, two of them we…
## $ contradiction_2      <chr> "Of the 19 headlines you just saw, two of them we…
## $ contradiction_3      <chr> "Of the 19 headlines you just saw, two of them we…
## $ contradiction_4      <chr> "Of the 19 headlines you just saw, two of them we…
## $ contradiction_5      <chr> "Of the 19 headlines you just saw, two of them we…
## $ contradiction_6      <chr> "Of the 19 headlines you just saw, two of them we…
## $ confusion            <chr> "The headlines I was asked to remember create con…
## $ advancement          <chr> "When we take the results reported in these headl…
## $ memory_task          <chr> "Earlier you saw some headlines and were asked to…
## $ memory_task_do       <chr> "Earlier you saw some headlines and were asked to…
## $ serious_check        <chr> "Final questions...\n\n \n\nIt would be very help…
## $ sc0                  <chr> "Score", "{\"ImportId\":\"SC_2ae0VAgt5ExUmHj\"}",…
## $ prolific_pid         <chr> "Prolific_PID", "{\"ImportId\":\"Prolific_PID\"}"…
## $ random_id            <chr> "Random_ID", "{\"ImportId\":\"Random_ID\"}", "714…
## $ fl_10_do             <chr> "FL_10 - Block Randomizer - Display Order", "{\"I…

From the output, we can see the 373 responses, but this is because row 1 shows the title name again and row 2 is the metadata so we can delete those. Thus, we have 371 participants which is what the report stated. There seems to be a lot of variables because of Qualtrics, but we don’t need anything related to clicks and timings. So its time to clean up the data.

Cleaning the data

After looking through all the variables (rough), we only need about 20 or so. We need finished, prolific_id, and sc0 to exclude invalid participants. We need age and gender for demographics. We need contradiction 1-6, confusion, and advancement to replicate the figures. Finally, fl_10_do seems to be the conditions for the participants ranging from 1-4 since this experiment was a 2x2 factorial design.

exp1_edit <- exp1_raw  %>%
  filter(consent == 1) %>%
  filter(finished == 1) %>%
  filter(serious_check == 1) %>%
  rename(recall_score = sc0) %>% 
  filter(recall_score >= 4) %>%
  distinct(prolific_pid, .keep_all = TRUE) %>%             #Removes duplicated data
  select(finished, 
         gender, 
         age, 
         contradiction_1:advancement, 
         serious_check,
         recall_score,
         prolific_pid,
         fl_10_do)

distinct() allows us to filter any duplicate rows. From looking at the data and the report, we saw that sc0 was just the score in the memory task test, so we renamed it. The experimenters stated that the recall score had to be at least 4, so we did the same.

Experiment 1 only needed a total contradiction score, rather than each individually, so we summed it up altogether

exp1_edit <- exp1_edit %>% 
  mutate(sum_contradiction = contradiction_1 + contradiction_2 + contradiction_3 + contradiction_4 + contradiction_5 + contradiction_6)

At this point, I realised looking through the dataframe that ALL the variable names were characters. I was about to turn everything manually into a numeric value, but then Anderson found the Qualtrics package, and the read_survey function, which fixes everything for us. So now I’ll be redoing everything but with read_survey. Note that read_survey makes it a tibble so we have to make it a dataframe.

Side note, adding “eval=FALSE” in the chunk setup allows full runs even with not working code

exp1_raw <- read_survey("Study 8 data.csv") %>%
  clean_names() 
## 
## ── Column specification ────────────────────────────────────────────────────────
## cols(
##   .default = col_double(),
##   StartDate = col_character(),
##   EndDate = col_character(),
##   IPAddress = col_character(),
##   RecordedDate = col_character(),
##   ResponseId = col_character(),
##   RecipientLastName = col_character(),
##   RecipientFirstName = col_character(),
##   RecipientEmail = col_character(),
##   ExternalReference = col_character(),
##   LocationLatitude = col_character(),
##   LocationLongitude = col_character(),
##   DistributionChannel = col_character(),
##   UserLanguage = col_character(),
##   PID = col_logical(),
##   Memory_task = col_character(),
##   Memory_task_DO = col_character(),
##   Prolific_PID = col_character(),
##   FL_10_DO = col_character()
## )
## ℹ Use `spec()` for the full column specifications.
exp1_raw <- as.data.frame(exp1_raw)

exp1_edit <- exp1_raw  %>%
  filter(consent == 1) %>%
  filter(finished == 1) %>%
  filter(serious_check == 1) %>%
  rename(recall_score = sc0) %>% 
  filter(recall_score >= 4) %>%
  distinct(prolific_pid, .keep_all = TRUE) %>%             #Removes duplicated data
  select(finished, 
         gender, 
         age, 
         contradiction_1:advancement, 
         serious_check,
         recall_score,
         prolific_pid,
         fl_10_do)

glimpse(exp1_edit)
## Rows: 294
## Columns: 15
## $ finished        <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
## $ gender          <dbl> 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1, …
## $ age             <dbl> 50, 23, 28, 24, 26, 27, 19, 21, 19, 57, 38, 47, 29, 32…
## $ contradiction_1 <dbl> 5, 5, 1, 3, 4, 1, 1, 4, 4, 5, 1, 2, 2, 1, 1, 5, 4, 3, …
## $ contradiction_2 <dbl> 5, 5, 2, 4, 4, 3, 1, 4, 5, 4, 2, 3, 2, 4, 1, 5, 4, 4, …
## $ contradiction_3 <dbl> 4, 5, 1, 2, 4, 1, 5, 2, 2, 5, 1, 2, 2, 2, 1, 5, 4, 5, …
## $ contradiction_4 <dbl> 4, 5, 1, 2, 4, 4, 1, 4, 3, 3, 4, 3, 2, 3, 4, 4, 4, 5, …
## $ contradiction_5 <dbl> 4, 5, 4, 2, 4, 1, 1, 3, 2, 5, 1, 2, 2, 1, 3, 5, 3, 5, …
## $ contradiction_6 <dbl> 5, 5, 3, 1, 4, 1, 1, 4, 5, 3, 1, 2, 4, 2, 1, 5, 2, 5, …
## $ confusion       <dbl> 4, 5, 1, 4, 4, 2, 5, 4, 5, 5, 1, 3, 5, 2, 2, 5, 4, 4, …
## $ advancement     <dbl> -1, 0, 1, -1, 0, 0, -1, 0, -1, -1, 0, 0, -1, 0, 0, 0, …
## $ serious_check   <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
## $ recall_score    <dbl> 7, 7, 7, 7, 7, 7, 7, 6, 7, 7, 7, 7, 6, 7, 7, 7, 7, 7, …
## $ prolific_pid    <chr> "truncated5ea9f5919b12", "truncated5e70f7033953", "tru…
## $ fl_10_do        <chr> "Block_3_Qualified_Conflict", "Block_3_Qualified_Confl…
exp1_edit <- exp1_edit %>% 
  mutate(sum_contradiction = contradiction_1 + contradiction_2 + contradiction_3 + contradiction_4 + contradiction_5 + contradiction_6)

While this method is completely fine, I wanted something more efficient, especially since I’ll be using this a lot more in Experiment 2. I found online the rowsums() function, and used it alongside the across() function, then I just specified the contradiction columns.

exp1_edit <- exp1_edit %>%
  mutate(sum_contradiction = rowSums(across(starts_with("contradiction_")))) %>% 
  select(-starts_with("contradiction_"))

# Reorder columns
exp1_edit <- exp1_edit %>% 
  select(prolific_pid, finished, serious_check, recall_score,
         gender, age, 
         sum_contradiction, advancement, confusion,
         fl_10_do)

Next, we’ll separate “fl_10_do” into different columns. We found the separate() function which allows you to turn a single character column into multiple.

exp1_edit <- separate(data = exp1_edit, col = fl_10_do, into = c('block', 'number', 'format', 'conflict'), sep = '_')

exp1_edit <- exp1_edit %>% 
  select(-starts_with("block"))

glimpse(exp1_edit)
## Rows: 294
## Columns: 12
## $ prolific_pid      <chr> "truncated5ea9f5919b12", "truncated5e70f7033953", "t…
## $ finished          <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
## $ serious_check     <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
## $ recall_score      <dbl> 7, 7, 7, 7, 7, 7, 7, 6, 7, 7, 7, 7, 6, 7, 7, 7, 7, 7…
## $ gender            <dbl> 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1…
## $ age               <dbl> 50, 23, 28, 24, 26, 27, 19, 21, 19, 57, 38, 47, 29, …
## $ sum_contradiction <dbl> 27, 30, 12, 14, 24, 11, 10, 21, 21, 25, 10, 14, 14, …
## $ advancement       <dbl> -1, 0, 1, -1, 0, 0, -1, 0, -1, -1, 0, 0, -1, 0, 0, 0…
## $ confusion         <dbl> 4, 5, 1, 4, 4, 2, 5, 4, 5, 5, 1, 3, 5, 2, 2, 5, 4, 4…
## $ number            <chr> "3", "3", "2", "2", "1", "4", "2", "1", "3", "1", "4…
## $ format            <chr> "Qualified", "Qualified", "Generic", "Generic", "Gen…
## $ conflict          <chr> "Conflict", "Conflict", "Consistent", "Consistent", …

Demographics and Descriptives

Demographics

The demographics the experimenters discussed are: sample size (by gender, and total): Total = 294, Male = 126, Female = 168, age (min, max, mean, standard deviation): Min = 18, Max = 69, Mean = 34.29, SD = 12.97

This chunk is just for sample size

#Change gender value to male, female and other for clarity
exp1_edit <- exp1_edit %>%
  mutate(gender = case_when(
      gender == "1" ~ "Male",
      gender  == "2" ~ "Female",
      gender == "3" ~ "Other"))

#Calculate total sample size
exp1_edit %>% 
  count()
##     n
## 1 294
#Calculate sample size of gender
exp1_edit %>% 
  group_by(gender) %>% 
  count()
## # A tibble: 2 × 2
## # Groups:   gender [2]
##   gender     n
##   <chr>  <int>
## 1 Female   168
## 2 Male     126

This chunk is for age

exp1_edit %>% 
  summarise(min_age = min(age), 
            max_age = max(age), 
            mean_age = round(mean(age), 2),
            sd_age = round(sd(age), 2)
  )
##   min_age max_age mean_age sd_age
## 1      18      69    34.29  12.97

Descriptives

Participants exposed to conflicting headlines perceived greater contradiction between the six headline pairs (M = 25.3) than those exposed to non-conflicting headlines (M = 13.4). - Measured on contradiction scale ranging from 6 to 30

Participants exposed to conflicting headlines (M = 4.52) indicated greater agreement that ‘the headlines create confusion about how to be healthy’ than those exposed to non-conflicting (M = 3.65) headlines - Measured on a 5-point scale

The mean response of those exposed to non-conflicting headlines (0.007) was greater than the mean response of those exposed to conflicting headlines (-0.25) - Measured on a 3 point scale where 0 = We know the same amount as before, 1 = 1 We know more and -1 - We know less than before.

exp1_edit %>% 
  group_by(conflict) %>% 
  summarise("Mean Contradiction Score" = round(mean(sum_contradiction), 1), 
            "Mean Confusion Score" = round(mean(confusion), 2), 
            "Mean Advancement Response" = round(mean(advancement), 3)
            )
## # A tibble: 2 × 4
##   conflict  Mean Contradiction S…¹ `Mean Confusion Score` Mean Advancement Res…²
##   <chr>                      <dbl>                  <dbl>                  <dbl>
## 1 Conflict                    25.3                   4.52                 -0.245
## 2 Consiste…                   13.4                   3.65                  0.007
## # ℹ abbreviated names: ¹​`Mean Contradiction Score`,
## #   ²​`Mean Advancement Response`

Reproducing Figure 1

Anderson looked through the R script to see how they did it, and they used a function called pirateplot, which is from an external package from yarrr. We decided screw this and use ggplot since what they did looked pretty limited and we had no idea what we were gonna do. The plots are just boxplot, violin andjitter altogether.

We’ll just start with making a contradiction plot first

Create contradiction plot

Before trying to fix any aesthetics or specific details I just wanted to get the general plot down. I had a few ideas on how to plot the contradiction figure. Luke gave me some tips with the interaction function so I tried that. We wanted to try and have a separation just between the two formats.

Here’s just a bunch of plots when I was playing around trying to basically trial and error a solution.

plot(ggplot(data = exp1_edit, mapping = aes(x = conflict, y = sum_contradiction, fill = format)) +
        geom_violin() +
        geom_boxplot() 
  )

plot(ggplot(data = exp1_edit, mapping = aes(x = format, y = sum_contradiction, fill = conflict)) +
        geom_violin() +
        geom_boxplot() 
  )

plot(ggplot(data = exp1_edit, mapping = aes(x = number, y = sum_contradiction, fill = conflict)) +
        geom_violin() +
        geom_boxplot() 
  )

plot(ggplot(data = exp1_edit, mapping = aes(x = interaction(format, conflict), y = sum_contradiction)) +
        geom_violin() +
        geom_boxplot() +
        geom_jitter() +
        facet_wrap(~ format) +
        theme(panel.spacing = unit(0,'lines'))
  )

plot(ggplot(data = exp1_edit, mapping = aes(x = conflict, y = sum_contradiction)) +
      geom_violin(width = 0.3) +
      geom_jitter(width = 0.01, alpha = 0.3) +
      facet_wrap(~ format, strip.position = "bottom") +
      theme_minimal() +
       theme(
      panel.spacing = unit(0,'lines'),
      panel.background = element_rect()
      ) 
  )

They actually look fine for the most part except the first plot. The problem however with both is that because its facet wrapped there’s a problem with either a gap, and if we want a border around the plot it’ll go straight down the middle. This is mainly a theme_minimal problem but regardless I wanted everything to be together but it seemed too hard. I decided I’ll just look into it later, worry about aesthetics last (note: I couldn’t find a solution for facet_wrap but I was sunk cost until the end and just ended up following everyone else. Future code will be facet_wrapped and ugly though until not)

After a talk with the number we decided it was just best to use the number variable as fill. It was better to just have no gaps between the two formats than it is to have a line right down the middle. I still felt this would be better for the title on the bottom left but I left it to later.

plot(ggplot(data = exp1_edit, mapping = aes(x = conflict, y = sum_contradiction, fill = conflict)) +
      geom_violin(width = 0.3) +
      geom_jitter(width = 0.01, alpha = 0.3) +
      geom_boxplot() +
      facet_wrap(~ format, strip.position = "bottom") +
      theme_minimal() +
       theme(
      panel.spacing = unit(0,'lines'),
      panel.background = element_rect(),
      strip.placement = "outside"
      ) 
  )

Boxplot and jitter look completely different from the experimenter’s figure. I realise that boxplot is based on quartiles, with the middle line being the median, box covering IQR and the whiskers covers the entire range.

We figured out that we can have custom values for box and whiskers. Whiskers we can just have it equal to the same value as the box upper and lower values, but we need to manually find the values.

I did this manually first with formulas creating a dataframe

Manually finding the CI values
contradiction_ci_manual <- exp1_edit %>%
  group_by(number) %>%
  mutate(
    n = n()-1,
    mean = mean(sum_contradiction),
    SD = sd(sum_contradiction),
    SE = SD/sqrt(n)
  ) %>%
  select(number, n, mean, SE) %>%
  distinct(number, .keep_all = TRUE)

Anderson found another way using gathering data from the t.test function that is like the chunk below

contradiction_t1 <- exp1_edit %>% 
  subset(number == 1) %>% 
  t.test(.$sum_contradiction, conf.level = 0.95, data = .)

contradiction_t2 <- exp1_edit %>% 
  subset(number == 2) %>% 
  t.test(.$sum_contradiction, conf.level = 0.95, data = .)

contradiction_t3 <- exp1_edit %>% 
  subset(number == 3) %>% 
  t.test(.$sum_contradiction, conf.level = 0.95, data = .)

contradiction_t4 <- exp1_edit %>% 
  subset(number == 4) %>% 
  t.test(.$sum_contradiction, conf.level = 0.95, data = .)

contradiction_anderson <- map_df(
  list(contradiction_t1, contradiction_t2, contradiction_t3, contradiction_t4), tidy)

  
contradiction_anderson[c("estimate", "statistic", "p.value", "conf.low", "conf.high")]
## # A tibble: 4 × 5
##   estimate statistic  p.value conf.low conf.high
##      <dbl>     <dbl>    <dbl>    <dbl>     <dbl>
## 1     25.3      63.0 2.24e-63     24.5      26.1
## 2     12.7      30.9 2.71e-43     11.9      13.5
## 3     25.2      54.5 4.66e-62     24.3      26.1
## 4     14.2      30.4 3.14e-43     13.3      15.1

The tidy function from the broom package which is a really nice method to create a tibble with only the necessary data. The last line is similar to using select in tidyverse to remove unnecessary columns.

There was also a confusion here because this method and the manual method had slight differences in values. I asked Luke about this and he said he slightly preferred the t.test one since its cleaner and more efficient, but it didn’t really matter. I thought still to just use Anderson’s way because of those reasons.

However, I didn’t understand what the full stops for gathering each group meant, and this also felt quite repetitive, so I sought my own way using tidyverse and in a way that makes sense to me.

contradiction_ci_tidyverse <- exp1_edit %>% 
  group_by(number) %>% 
  summarise(tidy(t.test(sum_contradiction))) %>% 
  select(number, estimate, conf.low, conf.high)

By looking back and forth this is the same results just done in a style more fit to how we learnt R.

With this, we can now go back to our contradiction plot and manually add the boxplot values.

plot_contradiction <- ggplot (data = exp1_edit, 
                              mapping = aes(x = number, y = sum_contradiction, fill = conflict)) +
  geom_violin(width = 0.3) +
  geom_jitter(alpha = 0.3) +
  geom_boxplot(
    ymax = contradiction_ci_tidyverse$conf.high,
    upper = contradiction_ci_tidyverse$conf.high,
    middle = contradiction_ci_tidyverse$estimate,
    lower = contradiction_ci_tidyverse$conf.low,
    ymin = contradiction_ci_tidyverse$conf.low,
    fill = "white"
    ) +
  theme_minimal() 
  
plot(plot_contradiction)

This looks great. I just need to made the graph itself look aesthetically the same as the the Experimenter’s.

Aesthetically reproduce the experimenter’s plot

A lot of this is kind of just eyeballing (like the boxplot width and such).We learnt the power of the theme() function and how it can change things like minor breaks, which is what we need.

plot(ggplot(data = exp1_edit, mapping = aes(x = conflict, y = sum_contradiction, fill = conflict)) +
      geom_violin(width = 0.3) +
      geom_jitter(
        stroke = 0,
        size = 1.5, 
        alpha = 0.3, 
        position = position_jitter(
          height = 0, 
          width = 0.04
        )
      ) +
      geom_boxplot(
        ymax = contradiction_ci_tidyverse$conf.high,
        upper = contradiction_ci_tidyverse$conf.high,
        middle = contradiction_ci_tidyverse$estimate,
        lower = contradiction_ci_tidyverse$conf.low,
        ymin = contradiction_ci_tidyverse$conf.low,
        coef = 0,
        outliers = FALSE,
        alpha = 0.7,
        width = 0.5,
        linewidth = 1.1,
        fill = "white"
      ) +
      facet_wrap(~ format, strip.position = "bottom") +
      theme_minimal() +
      theme (
        panel.grid.minor = element_blank(),
        panel.grid.major = element_line(size = 1),
        panel.grid.major.x = element_blank(),
        plot.title = element_text(size = 16, face = "bold", hjust = 0.5),
        axis.title.x = element_text(hjust = 0, vjust = 14),
        panel.spacing = unit(0,'lines'),
        panel.background = element_rect(),
        strip.placement = "outside",
        legend.position = "none") +
      labs(
        title = "Contradiction",
        x = "Format
Conflict",
        y = "Perceived Contradiction"
    ) +
    scale_fill_manual(values = c(
    "slategray2", 
    "lightpink1"
    ))
  ) 
## Warning: The `size` argument of `element_line()` is deprecated as of ggplot2 3.4.0.
## ℹ Please use the `linewidth` argument instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

This plot looks great, except the bloody line down the middle. I looked up online and tried so many different ways but none of them worked don’t bother. Once again we could’ve just not used theme_minimal() but that goes against the other things. I spent a few hours tinkering here and there and looking through the depths of stack overflow to no avail. My understanding is that panel border puts it all around, and panel spacing = 0 just sticks it together, so its the right side of the left plot and left side of the right plot stuck together, which might just make it impossible. It was at this point where I gave up and just stuck to how the others did it using x = number and forgoing the gap.

plot(ggplot(data = exp1_edit, mapping = aes(x = number, y = sum_contradiction, fill = conflict)) +
      geom_violin(width = 0.3) +
      geom_jitter(
        stroke = 0,
        size = 1.5, 
        alpha = 0.3, 
        position = position_jitter(
          height = 0, 
          width = 0.04
        )
      ) +
      geom_boxplot(
        ymax = contradiction_ci_tidyverse$conf.high,
        upper = contradiction_ci_tidyverse$conf.high,
        middle = contradiction_ci_tidyverse$estimate,
        lower = contradiction_ci_tidyverse$conf.low,
        ymin = contradiction_ci_tidyverse$conf.low,
        coef = 0,
        outliers = FALSE,
        alpha = 0.7,
        width = 0.5,
        linewidth = 1.1,
        fill = "white"
      ) +
      theme_minimal() +
      theme (
        panel.grid.minor = element_blank(),
        panel.grid.major = element_line(size = 1),
        panel.grid.major.x = element_blank(),
        plot.title = element_text(size = 16, face = "bold", hjust = 0.5),
        axis.title.x = element_text(hjust = 0, vjust = 14),
        panel.spacing = unit(0,'lines'),
        panel.background = element_rect(),
        strip.placement = "outside",
        legend.position = "none") +
      labs(
        title = "Contradiction",
        x = "Format
Conflict",
        y = "Perceived Contradiction"
    ) +
    scale_fill_manual(values = c(
    "slategray2", 
    "lightpink1"
    ))
  ) 

Just changing the values and removing the facet wrap function didn’t go as planned. I also need to rename the labels for the x-axis now. as well as get the format and conflict on the bottom left, as well as the Generic vs qualified. I’ll fix the x-axis labels and such first then the bottom left.

plot(ggplot(data = exp1_edit, mapping = aes(x = number, y = sum_contradiction, fill = conflict)) +
      geom_violin(width = 0.3) +
      geom_jitter(
        stroke = 0,
        size = 1.5, 
        alpha = 0.3, 
        position = position_jitter(
          height = 0, 
          width = 0.04
        )
      ) +
      geom_boxplot(
        ymax = contradiction_ci_tidyverse$conf.high,
        upper = contradiction_ci_tidyverse$conf.high,
        middle = contradiction_ci_tidyverse$estimate,
        lower = contradiction_ci_tidyverse$conf.low,
        ymin = contradiction_ci_tidyverse$conf.low,
        coef = 0,
        outliers = FALSE,
        alpha = 0.7,
        width = 0.5,
        linewidth = 1.1,
        fill = "white"
      ) +
      theme_minimal() +
      theme (
        panel.grid.minor = element_blank(),
        panel.grid.major = element_line(size = 1),
        panel.grid.major.x = element_blank(),
        plot.title = element_text(size = 16, face = "bold", hjust = 0.5),
        panel.spacing = unit(0,'lines'),
        panel.background = element_rect(),
        strip.placement = "outside",
        legend.position = "none") +
      labs(
        title = "Contradiction",    
        x = "Generic                                           Qualified", 

        y = "Perceived Contradiction"
    ) +
    scale_fill_manual(values = c(
      "slategray2", 
      "lightpink1"
    )) +
    scale_x_discrete(labels = c("Conf.", "Non-Conf.", "Conf.", "Non-Conf."))
  )

Wow this actually looks really really good. But I’m still missing the Conflict and Format titles on the bottom left. The x-axis title is a really messy solution with the manually added whitespace but we weren’t sure how else to get this through without using facet_wrap.But probably the more important issue now is how are we supposed to get this. Since we already manually added whitespaces and the titles are a mess, we thought screw it we’ll just manually add something similar to a text box. We found the annotate function and basically added the conflict and format ourselves manually.

plot(plot_contradiction + 
       annotate(geom = "text", x = 0.5, y = -2, size = 3, label = "Conflict") + 
       annotate(geom = "text", x = 0.5, y = -3, size = 3, label = "Format") +
       coord_cartesian( # Override clipping
         ylim=c(0,30),
         clip="off"
       )
)

These aren’t outside of the plot like in the Experimenter’s figure but that we couldn’t really figure out how without altering the plot, pushing it away like shown below. The coord_cartesian function exists to make sure the title doesn’t clip into the figure like below.

plot(plot_contradiction + 
       annotate(geom = "text", x = -2, y = -2, size = 3, label = "Conflict") + 
       annotate(geom = "text", x = -2, y = -3, size = 3, label = "Format")
)

Although this isn’t exactly the same, we were plenty satisfied with this workaround. Obviously we would’ve preferred a cleaner process to reproduce this.

plot_contradiction <- plot_contradiction + 
       annotate(geom = "text", x = 0.5, y = -2, size = 3, label = "Conflict") + 
       annotate(geom = "text", x = 0.5, y = -3, size = 3, label = "Format") +
       coord_cartesian( # Override clipping
         ylim=c(0,30),
         clip="off"
       )

plot(plot_contradiction)

I’m really happy with this plot. However, I thought about whether or not I have to do this with the other two plots JUST for this figure, and god forbid what’ll happen with experiment 2. I was actually down to do it, but then we thought about whether we wanted to learn how to create functions. I have somea experience with coding so this was easy for me to just agree with, but for the others it seemed like a daunting and challenging task. In the end they said sure, and if they ever needed help the ones who know will help them anyways.

Creating our function

After some googling on how to create functions in R, this wasn’t too bad for me.

create_plot_t1 <- function(data, measurement, ci_values, name) {
  ggplot(data, mapping = aes(x = number, y = measurement, fill = conflict)) +
  geom_violin(
    width = 0.4, # All the aesthetics are matched by eye to the original
    linewidth = 0.9
  ) +
  geom_boxplot(
    ymax = ci_values$conf.high,
    upper = ci_values$conf.high,
    middle = ci_values$estimate,
    lower = ci_values$conf.low,
    ymin = ci_values$conf.low,
    coef = 0,
    outliers = FALSE,
    alpha = 0.7,
    width = 0.5,
    linewidth = 1.1,
    fill = "white"
  ) +
    
  geom_jitter(
    stroke = 0,
    size = 1.5, 
    alpha = 0.3, 
    position = position_jitter(
      height = 0, 
      width = 0.04
      )
    ) +
  labs(
    title = name,                                   
    x = "Generic                                           Qualified", 

    # White space added to create illusion of two Format labels 
    y = "Perceived Contradiction"
  )  +
  annotate(geom = "text", x = 0.5, y = -2, size = 3, label = "Conflict") + 
  annotate(geom = "text", x = 0.5, y = -3, size = 3, label = "Format") +
  coord_cartesian( # Override clipping
    ylim=c(0,30),
    clip="off"
  ) +

  theme_minimal() +
  theme(
    plot.title = element_text(size = 16, face = "bold", hjust = 0.5),
    axis.text.y = element_text(angle = 90, hjust=0.5),
    panel.grid.minor = element_blank(),
    panel.background = element_rect(fill = NA),
    panel.grid.major.x = element_blank(),
    panel.grid.major.y = element_line(
      linewidth = 0.3, 
      color="gray"
    ),
    panel.spacing = unit(0,'lines'),
    panel.border = element_rect(
      fill = NA, 
      colour = "black", 
      linewidth = 0.5,
    ),
    legend.position = "none",
    strip.background = element_blank(),
    strip.placement = "outside"
  ) +
  scale_x_discrete(labels = c("Conf.", "Non-Conf.", "Conf.", "Non-Conf.")) +
  scale_y_continuous(breaks = seq(0, 30, by = 5)) +
  scale_fill_manual(values = c(
    "slategray2",
    "lightpink1"
    )
  )
}

I’ll explain this function and how functions work. User made functions (so this right here like how I made it) are similar to the functions that you normally use in R, but we just made it ourselves. If you look inside the function, this looks really similar to how I previously constructed the plot before, except some values look different. This function is called “t1” because test 1 in case for the future.

The reason the values in the function are different from the previous plot is because they’re just general placeholder names for when we pass parameters into it. For example, the measurement parameter you can saee is also our y-axis and variable so if I plot it for contradiction I’ll use “sum_contradiction”, and if I do it for advancement then I’ll use “advancement”.

Inputs: data - data to pass in measurement - y-axis ci_value - the dataframe of the ci I wish to pass name - nawme of the plot for the title

Let’s test it out

plot(create_plot_t1(data = exp1_edit, measurement = sum_contradiction, ci_values = contradiction_ci_tidyverse, name = "Contradiction"))

Strange. sum_contradiction is not found. After troubleshooting a bit its because I realised I want a column within a dataframe, and I’m passing it as if its a dataframe itself. Lets try the same thing but with exp1_edit$ in front.

plot(create_plot_t1(data = exp1_edit, measurement = exp1_edit$sum_contradiction, ci_values = contradiction_ci_tidyverse, name = "Contradiction"))

Yup. This is it. Now I can go to create the other plots.

plot_contradiction <- create_plot_t1(data = exp1_edit, measurement = exp1_edit$sum_contradiction, ci_values = contradiction_ci_tidyverse, name = "Contradiction")

Create advancement plot

Basically the same process as the contradiction plot that we found (thank god we learnt how to do functions)

advancement_ci_tidyverse <- exp1_edit %>% 
  group_by(number) %>% 
  summarise(tidy(t.test(advancement))) %>% 
  select(number, estimate, conf.low, conf.high)

plot_advancement <- create_plot_t1(data = exp1_edit, measurement = exp1_edit$advancement, ci_values = advancement_ci_tidyverse, name = "Advancement")

plot(plot_advancement)

Ok we can see something is definitely wrong. And this looks like its because of contradiction limit. Lets make a better function to fix it

create_plot_t2
create_plot_t2 <- function(data, measurement, ci_values, name, y_title, lim1, lim2, breaks) {
  ggplot(data, mapping = aes(x = number, y = measurement, fill = conflict)) +
  geom_violin(
    width = 0.4, # All the aesthetics are matched by eye to the original
    linewidth = 0.9
  ) +
  geom_boxplot(
    ymax = ci_values$conf.high,
    upper = ci_values$conf.high,
    middle = ci_values$estimate,
    lower = ci_values$conf.low,
    ymin = ci_values$conf.low,
    coef = 0,
    outliers = FALSE,
    alpha = 0.7,
    width = 0.5,
    linewidth = 1.1,
    fill = "white"
  ) +
    
  geom_jitter(
    stroke = 0,
    size = 1.5, 
    alpha = 0.3, 
    position = position_jitter(
      height = 0, 
      width = 0.04
      )
    ) +
  labs(
    title = name,                                   
    x = "Generic                                           Qualified", 
    # White space added to create illusion of two Format labels 
    y = y_title
  )  +
  annotate(geom = "text", x = 0.5, y = -2, size = 3, label = "Conflict") + 
  annotate(geom = "text", x = 0.5, y = -3, size = 3, label = "Format") +
  coord_cartesian( # Override clipping
    ylim=c(0,30),
    clip="off"
  ) +

  theme_minimal() +
  theme(
    plot.title = element_text(size = 16, face = "bold", hjust = 0.5),
    axis.text.y = element_text(angle = 90, hjust=0.5),
    panel.grid.minor = element_blank(),
    panel.background = element_rect(fill = NA),
    panel.grid.major.x = element_blank(),
    panel.grid.major.y = element_line(
      linewidth = 0.3, 
      color="gray"
    ),
    panel.spacing = unit(0,'lines'),
    panel.border = element_rect(
      fill = NA, 
      colour = "black", 
      linewidth = 0.5,
    ),
    legend.position = "none",
    strip.background = element_blank(),
    strip.placement = "outside"
  ) +
  scale_x_discrete(labels = c("Conf.", "Non-Conf.", "Conf.", "Non-Conf.")) +
  scale_y_continuous(breaks = seq(lim1, lim2, by = breaks)) +
  scale_fill_manual(values = c(
    "slategray2",
    "lightpink1"
    )
  )
}

I added a couple new parameters: y_title - y axis title lim1 - min y value lim2 - max y value breaks - number of minor grid breaks in between each major break

plot_advancement <- create_plot_t2(
  data = exp1_edit, 
  measurement = exp1_edit$advancement, 
  ci_values = advancement_ci_tidyverse, 
  name = "Advancement",
  y_title = "Perceived Scientific Advancement",
  lim1 = -1,
  lim2 = 1,
  breaks = 0.5
  )

plot(plot_advancement)

Oh nope that is not how you do it.

Looking back at the code I was a bit silly. The problem is in coord-cartesian. And breaks is for major breaks only. Let’s go back and work on some names

create_plot_t3 <- function(data, measurement, ci_values, name, y_title, lim1, lim2, break_size, no.minor.breaks, violin_width) {
  ggplot(data, mapping = aes(x = number, y = measurement, fill = conflict)) +
  geom_violin(
    width = violin_width, # All the aesthetics are matched by eye to the original
    linewidth = 0.9
  ) +
  geom_boxplot(
    ymax = ci_values$conf.high,
    upper = ci_values$conf.high,
    middle = ci_values$estimate,
    lower = ci_values$conf.low,
    ymin = ci_values$conf.low,
    coef = 0,
    outliers = FALSE,
    alpha = 0.7,
    width = 0.5,
    linewidth = 1.1,
    fill = "white"
  ) +
    
  geom_jitter(
    stroke = 0,
    size = 1.5, 
    alpha = 0.3, 
    position = position_jitter(
      height = 0, 
      width = 0.04
      )
    ) +
  labs(
    title = name,                                   
    x = "Generic                                           Qualified", 
    # White space added to create illusion of two Format labels 
    y = y_title
  )  +
  annotate( # location of labels can be standardised
    geom = "text", 
    x = 0.5, 
    y = (lim1 - 1.55*((lim2-lim1)/30)), 
    size = 3, 
    label = "Conflict"
  ) +
  annotate(
    geom = "text", 
    x = 0.5, 
    y = (lim1 - 2.25*((lim2-lim1)/30)), 
    size = 3, label = "Format"
  ) +
  coord_cartesian( # Override clipping
    ylim=c(lim1, lim2),
    clip="off"
  ) +

  theme_minimal() +
  theme(
    plot.title = element_text(size = 16, face = "bold", hjust = 0.5),
    axis.text.y = element_text(angle = 90, hjust=0.5),
    panel.grid.minor = element_blank(),
    panel.background = element_rect(fill = NA),
    panel.grid.major.x = element_blank(),
    panel.grid.major.y = element_line(
      linewidth = 0.3, 
      color="gray"
    ),
    panel.spacing = unit(0,'lines'),
    panel.border = element_rect(
      fill = NA, 
      colour = "black", 
      linewidth = 0.5,
    ),
    legend.position = "none",
    strip.background = element_blank(),
    strip.placement = "outside"
  ) +
  scale_x_discrete(labels = c("Conf.", "Non-Conf.", "Conf.", "Non-Conf.")) +
  scale_y_continuous(breaks = seq(lim1, lim2, by = break_size),
                     minor_breaks = seq(lim1, lim2, by = (1/no.minor.breaks)),
                     expand = expansion(mult = c(0,0),
                                          add = c(
                                            (lim2-lim1)/30, 
                                            (lim2-lim1)/30
                                          ))) + # standardises expansion
  scale_fill_manual(values = c(
    "slategray2",
    "lightpink1"
    )
  )
}

The group helped me a lot with this so all credit goes to them. breaks got renamed to break_size. There are a few new parameters

no.minor.breaks - number of minor breaksa violin_width - each plot had a different violin width so we gotta eyeball for each one

It turns out that lim1 and lim2 were needed but we can actually just use those everywhere. Also Anderson found this expand and expansion() thing for scale_y_continuous. This is essentially because he wanted a standardised distance between ymin and ymax from the borders.

plot_advancement <- create_plot_t3(
  data = exp1_edit, 
  measurement = exp1_edit$advancement, 
  ci_values = advancement_ci_tidyverse, 
  name = "Advancement",
  y_title = "Perceived Scientific Advancement",
  lim1 = -1,
  lim2 = 1,
  break_size = 1,
  no.minor.breaks = 5,
  violin_width = 0.5
  )

plot(plot_advancement)

The ticks aren’t right. I looked back and its because we have element_blank on panel.grid.minor. So we should make it aanother parameter to pass in. My group members wanted an if else statement in the function and we’ll just call TRUE or FALSE for a minor grid or not, but I’m lazy so I’ll just have it as a parameter :D.

create_plot_t4 <- function(data, measurement, ci_values, name, y_title, lim1, lim2, break_size, no.minor.breaks, violin_width, minor_grid_yesno) {
  ggplot(data, mapping = aes(x = number, y = measurement, fill = conflict)) +
  geom_violin(
    width = violin_width, # All the aesthetics are matched by eye to the original
    linewidth = 0.9
  ) +
  geom_boxplot(
    ymax = ci_values$conf.high,
    upper = ci_values$conf.high,
    middle = ci_values$estimate,
    lower = ci_values$conf.low,
    ymin = ci_values$conf.low,
    coef = 0,
    outliers = FALSE,
    alpha = 0.7,
    width = 0.5,
    linewidth = 1.1,
    fill = "white"
  ) +
    
  geom_jitter(
    stroke = 0,
    size = 1.5, 
    alpha = 0.3, 
    position = position_jitter(
      height = 0, 
      width = 0.04
      )
    ) +
  labs(
    title = name,                                   
    x = "Generic                                           Qualified", 
    # White space added to create illusion of two Format labels 
    y = y_title
  )  +
  annotate( # location of labels can be standardised
    geom = "text", 
    x = 0.5, 
    y = (lim1 - 1.55*((lim2-lim1)/30)), 
    size = 3, 
    label = "Conflict"
  ) +
  annotate(
    geom = "text", 
    x = 0.5, 
    y = (lim1 - 2.25*((lim2-lim1)/30)), 
    size = 3, label = "Format"
  ) +
  coord_cartesian( # Override clipping
    ylim=c(lim1, lim2),
    clip="off"
  ) +

  theme_minimal() +
  theme(
    plot.title = element_text(size = 16, face = "bold", hjust = 0.5),
    axis.text.y = element_text(angle = 90, hjust=0.5),
    panel.grid.minor = minor_grid_yesno,
    panel.background = element_rect(fill = NA),
    panel.grid.major.x = element_blank(),
    panel.grid.major.y = element_line(
      linewidth = 0.3, 
      color="gray"
    ),
    panel.spacing = unit(0,'lines'),
    panel.border = element_rect(
      fill = NA, 
      colour = "black", 
      linewidth = 0.5,
    ),
    legend.position = "none",
    strip.background = element_blank(),
    strip.placement = "outside"
  ) +
  scale_x_discrete(labels = c("Conf.", "Non-Conf.", "Conf.", "Non-Conf.")) +
  scale_y_continuous(breaks = seq(lim1, lim2, by = break_size),
                     minor_breaks = seq(lim1, lim2, by = (1/no.minor.breaks)),
                     expand = expansion(mult = c(0,0),
                                          add = c(
                                            (lim2-lim1)/30, 
                                            (lim2-lim1)/30
                                          ))) + # standardises expansion
  scale_fill_manual(values = c(
    "slategray2",
    "lightpink1"
    )
  )
}
plot_advancement <- create_plot_t4(
  data = exp1_edit, 
  measurement = exp1_edit$advancement, 
  ci_values = advancement_ci_tidyverse, 
  name = "Advancement",
  y_title = "Perceived Scientific Advancement",
  lim1 = -1,
  lim2 = 1,
  break_size = 1,
  no.minor.breaks = 5,
  violin_width = 0.5,
  minor_grid_yesno = element_line(size = 1)
  )

plot(plot_advancement)

and voila there we go.

At this point Anderson actually found a way to create a boxplot without manually finding CI values and calling it. Using stat_summary function. This allows us to call the dataframe into it using “fun.data”, so we don’t need to manually do it ourselves. We call “mean_cl_normal” which is part of ggplot and it’ll display confidence intervals. Boxplot got changed to crossbar because its the same as boxplot without the whiskers. Both this and manual CI do the same thing but this is cleaner and so finding the CIs manually turned out to be unnecessary. This also means the ci_values parameter is unnecessary.

create_plot_t5 <- function(data, measurement, name, y_title, lim1, lim2, break_size, no.minor.breaks, violin_width, minor_grid_yesno) {
  ggplot(data, mapping = aes(x = number, y = measurement, fill = conflict)) +
  geom_violin(
    width = violin_width, # All the aesthetics are matched by eye to the original
    linewidth = 0.9
  ) +
    stat_summary( 
      fun.data = "mean_cl_normal",  
      geom = "crossbar", 
      fill = "white",    
      alpha = .7,
      width = 0.5,
      linewidth = 1.1
    ) +
  geom_jitter(
    stroke = 0,
    size = 1.5, 
    alpha = 0.3, 
    position = position_jitter(
      height = 0, 
      width = 0.04
      )
    ) +
  labs(
    title = name,                                   
    x = "Generic                                           Qualified", 
    # White space added to create illusion of two Format labels 
    y = y_title
  )  +
  annotate( # location of labels can be standardised
    geom = "text", 
    x = 0.5, 
    y = (lim1 - 1.55*((lim2-lim1)/30)), 
    size = 3, 
    label = "Conflict"
  ) +
  annotate(
    geom = "text", 
    x = 0.5, 
    y = (lim1 - 2.25*((lim2-lim1)/30)), 
    size = 3, label = "Format"
  ) +
  coord_cartesian( # Override clipping
    ylim=c(lim1, lim2),
    clip="off"
  ) +

  theme_minimal() +
  theme(
    plot.title = element_text(size = 16, face = "bold", hjust = 0.5),
    axis.text.y = element_text(angle = 90, hjust=0.5),
    panel.grid.minor = minor_grid_yesno,
    panel.background = element_rect(fill = NA),
    panel.grid.major.x = element_blank(),
    panel.grid.major.y = element_line(
      linewidth = 0.3, 
      color="gray"
    ),
    panel.spacing = unit(0,'lines'),
    panel.border = element_rect(
      fill = NA, 
      colour = "black", 
      linewidth = 0.5,
    ),
    legend.position = "none",
    ) +
  scale_x_discrete(labels = c("Conf.", "Non-Conf.", "Conf.", "Non-Conf.")) +
  scale_y_continuous(breaks = seq(lim1, lim2, by = break_size),
                     minor_breaks = seq(lim1, lim2, by = (1/no.minor.breaks)),
                     expand = expansion(mult = c(0,0),
                                          add = c(
                                            (lim2-lim1)/30, 
                                            (lim2-lim1)/30
                                          ))) + # standardises expansion
  scale_fill_manual(values = c(
    "slategray2",
    "lightpink1"
    )
  )
}

plot_contradiction <- create_plot_t5(
  data = exp1_edit, 
  measurement = exp1_edit$sum_contradiction, 
  name = "Contradiction",
  y_title = "Perceived Contradiction",
  lim1 = 0,
  lim2 = 30,
  break_size = 5,
  no.minor.breaks = 0,
  violin_width = 0.4,
  minor_grid_yesno = element_blank()
  )

plot_advancement <- create_plot_t5(
  data = exp1_edit, 
  measurement = exp1_edit$advancement, 
  name = "Advancement",
  y_title = "Perceived Scientific Advancement",
  lim1 = -1,
  lim2 = 1,
  break_size = 1,
  no.minor.breaks = 5,
  violin_width = 0.5,
  minor_grid_yesno = element_line(size = 1)
  )


plot(plot_contradiction)

plot(plot_advancement)

Now we can work on the confusion plot

Create confusion plot

plot_confusion <- create_plot_t5(
  data = exp1_edit, 
  measurement = exp1_edit$confusion, 
  name = "Confusion",
  y_title = "Perceived Confusion",
  lim1 = 1,
  lim2 = 5,
  break_size = 1,
  no.minor.breaks = 2,
  violin_width = 1.1,
  minor_grid_yesno = element_line(linewidth = 0.3)
  )

plot(plot_confusion)
## Warning: `position_dodge()` requires non-overlapping x intervals.

I’m getting this warning. non-overlapping x-interval sounds like its because my widths might be touching? Lets make it a bit thinner.

plot_confusion <- create_plot_t5(
  data = exp1_edit, 
  measurement = exp1_edit$confusion, 
  name = "Confusion",
  y_title = "Perceived Confusion",
  lim1 = 1,
  lim2 = 5,
  break_size = 1,
  no.minor.breaks = 2,
  violin_width = 1,
  minor_grid_yesno = element_line(size = 1)
  )

plot(plot_confusion)

Yup all goods.

Combine the three plots together to create Figure 1

Now we just need to combine the three plots together. This can be done with the grid.arrange function from the gridExtra package.

figure_1 <- grid.arrange(plot_contradiction, plot_advancement, plot_confusion, ncol = 2, nrow = 2)

png(filename="figure_1_t1.png", width=793, height=1121)
plot(figure_1) # Not the final plot, resulting png saved has no issues
dev.off()
## png 
##   2

While it looks bad from the output, what we really need to see is how it got saved in our png and if that matters. The group said this is how its expected to be.

The figure itself looks fine, but for some reason isn’t all white. I looked online and they said try adding “bg =”white”” so I’ll try that.

figure_1 <- grid.arrange(plot_contradiction, plot_advancement, plot_confusion, ncol = 2, nrow = 2)

png(filename="figure_1_t2.png", width=793, height=1121, bg = "white")
plot(figure_1) # Not the final plot, resulting png saved has no issues
dev.off()
## png 
##   2

Nope it didn’t do anything. I looked at if it was just me and it was, and so looking through the other’s code it was because of my theme_minimal. So I just need create_plot_t6 now and also use that for the plots.

create_plot_t6 <- function(data, measurement, name, y_title, lim1, lim2, break_size, no.minor.breaks, violin_width, minor_grid_yesno) {
  ggplot(data, mapping = aes(x = number, y = measurement, fill = conflict)) +
  geom_violin(
    width = violin_width, # All the aesthetics are matched by eye to the original
    linewidth = 0.9
  ) +
    stat_summary( 
      fun.data = "mean_cl_normal",  
      geom = "crossbar", 
      fill = "white",    
      alpha = .7,
      width = 0.5,
      linewidth = 1.1
    ) +
  geom_jitter(
    stroke = 0,
    size = 1.5, 
    alpha = 0.3, 
    position = position_jitter(
      height = 0, 
      width = 0.04
      )
    ) +
  labs(
    title = name,                                   
    x = "Generic                                           Qualified", 
    # White space added to create illusion of two Format labels 
    y = y_title
  )  +
  annotate( # location of labels can be standardised
    geom = "text", 
    x = 0.5, 
    y = (lim1 - 1.55*((lim2-lim1)/30)), 
    size = 3, 
    label = "Conflict"
  ) +
  annotate(
    geom = "text", 
    x = 0.5, 
    y = (lim1 - 2.25*((lim2-lim1)/30)), 
    size = 3, label = "Format"
  ) +
  coord_cartesian( # Override clipping
    ylim=c(lim1, lim2),
    clip="off"
  ) +
  theme(
    plot.title = element_text(size = 16, face = "bold", hjust = 0.5),
    axis.text.y = element_text(angle = 90, hjust=0.5),
    panel.grid.minor = minor_grid_yesno,
    panel.background = element_rect(fill = NA),
    panel.grid.major.x = element_blank(),
    panel.grid.major.y = element_line(
      linewidth = 0.3, 
      color="gray"
    ),
    panel.spacing = unit(0,'lines'),
    panel.border = element_rect(
      fill = NA, 
      colour = "black", 
      linewidth = 0.5,
    ),
    legend.position = "none",
    ) +
  scale_x_discrete(labels = c("Conf.", "Non-Conf.", "Conf.", "Non-Conf.")) +
  scale_y_continuous(breaks = seq(lim1, lim2, by = break_size),
                     minor_breaks = seq(lim1, lim2, by = (1/no.minor.breaks)),
                     expand = expansion(mult = c(0,0),
                                          add = c(
                                            (lim2-lim1)/30, 
                                            (lim2-lim1)/30
                                          ))) + # standardises expansion
  scale_fill_manual(values = c(
    "slategray2",
    "lightpink1"
    )
  ) 
}

plot_contradiction <- create_plot_t6(
  data = exp1_edit, 
  measurement = exp1_edit$sum_contradiction, 
  name = "Contradiction",
  y_title = "Perceived Contradiction",
  lim1 = 0,
  lim2 = 30,
  break_size = 5,
  no.minor.breaks = 0,
  violin_width = 0.4,
  minor_grid_yesno = element_blank()
  )

plot_advancement <- create_plot_t6(
  data = exp1_edit, 
  measurement = exp1_edit$advancement, 
  name = "Advancement",
  y_title = "Perceived Scientific Advancement",
  lim1 = -1,
  lim2 = 1,
  break_size = 1,
  no.minor.breaks = 5,
  violin_width = 0.5,
  minor_grid_yesno = element_line(
      linewidth = 0.3,
      color = "gray"
    )
  )

plot_confusion <- create_plot_t6(
  data = exp1_edit, 
  measurement = exp1_edit$confusion, 
  name = "Confusion",
  y_title = "Perceived Confusion",
  lim1 = 1,
  lim2 = 5,
  break_size = 1,
  no.minor.breaks = 2,
  violin_width = 1,
  minor_grid_yesno = element_line(
      linewidth = 0.3,
      color = "gray"
    )
)

plot(plot_contradiction)

plot(plot_advancement)

plot(plot_confusion)

I couldn’t see the minor grid without changing the colour, must’ve been because of theme_minimal. Also I realised that size isn’t a necessary parameter and honestly neither is linewidth, but we just had a standardised linewidth value anyways.

figure_1 <- grid.arrange(plot_contradiction, plot_advancement, plot_confusion, ncol = 2, nrow = 2)

png(filename="figure_1_t3.png", width=793, height=1121, bg = "white")
plot(figure_1) # Not the final plot, resulting png saved has no issues
dev.off()
## png 
##   2

Great the plots are all good. But the bottom right is still not white. The group found the rectGrob and the gpar function from the grid package, which basically allows us to draw rectangles. gpar lets us change the colour and rectGrob just lets us draw that rectangle.

whitegrob <- grid::rectGrob(gp = grid::gpar(
  fill= "white",
  col = "white"
  )
)

figure_1 <- grid.arrange(plot_contradiction, plot_advancement, plot_confusion, whitegrob, ncol = 2, nrow = 2)

png(filename="figure_1_t4.png", width=793, height=1121, bg = "white")
plot(figure_1) # Not the final plot, resulting png saved has no issues
dev.off()
## png 
##   2

And there we go. We made a really good reproduction of the Experimenter’s plot. This took 1.3k lines, imagine how bad it would’ve been without functions haha.

Reproducing Figure 2

Figure 2 shouldn’t be as bad as Figure 1, it should just be a “n” for y-axis, and grouped by the group number, with advancement as x-axis changing the labels.

plot(ggplot(data = exp1_edit, mapping = aes(x = advancement, fill = number)) +
  geom_histogram() +
  labs(
    x = "Advancement",
    y = "Number of participants",
    fill = "Condition"
  )
)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Oh dear maybe its harder than I thought. I looked up online and found that to make it side by side you just need to add a position = “dodge”. I also found that using geom_bar instead will give much thicker bars.

plot(ggplot(data = exp1_edit, mapping = aes(x = advancement, fill = number)) +
  geom_bar(position = "dodge") +
  labs(
    x = "Advancement",
    y = "Number of participants",
    fill = "Condition"
  )
)

For colours, I learnt about “scale_fill_grey” and I can just put the labels inside of it for the condition, and for x-axis I just put it in a scale_x_discrete

plot(ggplot(exp1_edit, mapping = aes(x = advancement, 
                            fill = number))+
  geom_bar(position = "dodge") +
  labs(
    x = "Advancement",
    y = "Number of participants",
    fill = "Condition"
  ) +
  scale_x_discrete(labels = c("Less","Same","More")) +
  scale_fill_grey(name = "Condition", labels = c("Conflicting/Generic", "Conflicting/Qualified", "Non-conflicting/Generic", "Non-conflicting/Qualified")) #label legend
)

Oh this doesn’t work. We fiddled around a bit as a group and thought that its because of how our x-variable is coded. We looked online and it said its best to have the x-variable as a factor if we want to show groups.

plot(ggplot(exp1_edit, mapping = aes(x = factor(advancement), 
                            fill = number))+
  geom_bar(position = "dodge") +
  labs(
    x = "Advancement",
    y = "Number of participants",
    fill = "Condition"
  ) +
  scale_x_discrete(labels = c("Less","Same","More")) +
  scale_fill_grey(name = "Condition", labels = c("Conflicting/Generic", "Conflicting/Qualified", "Non-conflicting/Generic", "Non-conflicting/Qualified")) #label legend
)

Now we just need to figure out how to reorder this. Siena found a way by creating a new dataframe and using the “fct_relevgel” function to reorder, but I didn’t like this way and felt it should be easier. Mahika discovered that instead of using fill = number, it should be an interaction between format and conflict

plot(ggplot(exp1_edit, mapping = aes(x = factor(advancement), 
                            fill = interaction(format, conflict)))+
  geom_bar(position = "dodge") +
  labs(
    x = "Advancement",
    y = "Number of participants",
    fill = "Condition"
  ) +
  scale_x_discrete(labels = c("Less","Same","More")) +
  scale_fill_grey(name = "Condition", labels = c("Conflicting/Generic", "Conflicting/Qualified", "Non-conflicting/Generic", "Non-conflicting/Qualified")) #label legend
)

It might have to do with how the data is ordered. With fill = number, it did it from a descending order, but I guess with interaction it does conflicting onto generic and qualified, THEN non-conflicting onto generic and qualified. Which works perfectly.

I’m very satisfied with how our group came together. As I am writing this I realise I haven’t mentioned Sally’s name. Sally helped a lot when it came to understanding the demographics and descriptives, and overall helping us understand the article and what we need to present.

Experiment 2 is the same process as Experiment 1. Since we learnt and discovered everything here it should be smooth sailing.

Experiment 2

Read the file

Reminder to use read_survey!

exp2_raw <- read_survey("Study 7 data.csv") %>%
  clean_names()
## 
## ── Column specification ────────────────────────────────────────────────────────
## cols(
##   .default = col_double(),
##   StartDate = col_character(),
##   EndDate = col_character(),
##   IPAddress = col_character(),
##   RecordedDate = col_character(),
##   ResponseId = col_character(),
##   RecipientLastName = col_character(),
##   RecipientFirstName = col_character(),
##   RecipientEmail = col_character(),
##   ExternalReference = col_character(),
##   LocationLatitude = col_character(),
##   LocationLongitude = col_character(),
##   DistributionChannel = col_character(),
##   UserLanguage = col_character(),
##   PID = col_logical(),
##   Memory_task = col_character(),
##   Memory_task_DO = col_character(),
##   Prolific_PID = col_character(),
##   FL_12_DO = col_character()
## )
## ℹ Use `spec()` for the full column specifications.
exp2_raw <- as.data.frame(exp2_raw)
glimpse(exp2_raw)
## Rows: 412
## Columns: 360
## $ start_date             <chr> "26/05/2020 03:42", "26/05/2020 03:42", "26/05/…
## $ end_date               <chr> "26/05/2020 03:49", "26/05/2020 03:50", "26/05/…
## $ status                 <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ ip_address             <chr> "*******", "*******", "*******", "*******", "**…
## $ progress               <dbl> 100, 100, 100, 100, 100, 100, 100, 100, 100, 10…
## $ duration_in_seconds    <dbl> 430, 454, 513, 486, 745, 584, 476, 674, 445, 62…
## $ finished               <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ recorded_date          <chr> "26/05/2020 03:49", "26/05/2020 03:50", "26/05/…
## $ response_id            <chr> "R_27PvUSJkMRSnaYV", "R_UMbVoivDgojyRwZ", "R_3q…
## $ recipient_last_name    <chr> "*******", "*******", "*******", "*******", "**…
## $ recipient_first_name   <chr> "*******", "*******", "*******", "*******", "**…
## $ recipient_email        <chr> "*******", "*******", "*******", "*******", "**…
## $ external_reference     <chr> "*******", "*******", "*******", "*******", "**…
## $ location_latitude      <chr> "*******", "*******", "*******", "*******", "**…
## $ location_longitude     <chr> "*******", "*******", "*******", "*******", "**…
## $ distribution_channel   <chr> "anonymous", "anonymous", "anonymous", "anonymo…
## $ user_language          <chr> "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN",…
## $ consent                <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ pid                    <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ gender                 <dbl> 2, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,…
## $ age                    <dbl> 51, 19, 31, 32, 49, 20, 20, 29, 29, 18, 31, 21,…
## $ timer_first_click_22   <dbl> NA, NA, NA, 0.000, 0.000, NA, NA, NA, NA, 0.000…
## $ timer_last_click_23    <dbl> NA, NA, NA, 0.000, 0.000, NA, NA, NA, NA, 0.000…
## $ timer_page_submit_24   <dbl> NA, NA, NA, 13.230, 13.640, NA, NA, NA, NA, 15.…
## $ timer_click_count_25   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 2, NA,…
## $ timer_first_click_26   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_27    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_28   <dbl> NA, NA, NA, 11.649, 12.682, NA, NA, NA, NA, 16.…
## $ timer_click_count_29   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_30   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_31    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_32   <dbl> NA, NA, NA, 11.523, 12.526, NA, NA, NA, NA, 12.…
## $ timer_click_count_33   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_34   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_35    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_36   <dbl> NA, NA, NA, 11.332, 13.044, NA, NA, NA, NA, 14.…
## $ timer_click_count_37   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_38   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_39    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_40   <dbl> NA, NA, NA, 13.253, 13.452, NA, NA, NA, NA, 18.…
## $ timer_click_count_41   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_42   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_43    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_44   <dbl> NA, NA, NA, 11.099, 12.685, NA, NA, NA, NA, 19.…
## $ timer_click_count_45   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_46   <dbl> NA, NA, NA, 11.027, 0.000, NA, NA, NA, NA, 0.00…
## $ timer_last_click_47    <dbl> NA, NA, NA, 11.027, 0.000, NA, NA, NA, NA, 0.00…
## $ timer_page_submit_48   <dbl> NA, NA, NA, 12.576, 13.824, NA, NA, NA, NA, 14.…
## $ timer_click_count_49   <dbl> NA, NA, NA, 1, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_50   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_51    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_52   <dbl> NA, NA, NA, 12.091, 16.628, NA, NA, NA, NA, 14.…
## $ timer_click_count_53   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_54   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_55    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_56   <dbl> NA, NA, NA, 11.696, 13.837, NA, NA, NA, NA, 17.…
## $ timer_click_count_57   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_58   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_59    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_60   <dbl> NA, NA, NA, 11.681, 15.244, NA, NA, NA, NA, 15.…
## $ timer_click_count_61   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_62   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_63    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_64   <dbl> NA, NA, NA, 11.320, 14.157, NA, NA, NA, NA, 13.…
## $ timer_click_count_65   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_66   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_67    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_68   <dbl> NA, NA, NA, 11.016, 15.068, NA, NA, NA, NA, 14.…
## $ timer_click_count_69   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_70   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_71    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_72   <dbl> NA, NA, NA, 11.638, 13.581, NA, NA, NA, NA, 14.…
## $ timer_click_count_73   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_74   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_75    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_76   <dbl> NA, NA, NA, 11.904, 18.457, NA, NA, NA, NA, 22.…
## $ timer_click_count_77   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_78   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_79    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_80   <dbl> NA, NA, NA, 10.922, 16.012, NA, NA, NA, NA, 13.…
## $ timer_click_count_81   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_82   <dbl> NA, NA, NA, 0.000, 0.000, NA, NA, NA, NA, 0.000…
## $ timer_last_click_83    <dbl> NA, NA, NA, 0.000, 0.000, NA, NA, NA, NA, 0.000…
## $ timer_page_submit_84   <dbl> NA, NA, NA, 11.503, 13.732, NA, NA, NA, NA, 13.…
## $ timer_click_count_85   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 1, NA,…
## $ timer_first_click_86   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_87    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_88   <dbl> NA, NA, NA, 11.508, 15.667, NA, NA, NA, NA, 14.…
## $ timer_click_count_89   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_90   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_91    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_92   <dbl> NA, NA, NA, 11.740, 13.295, NA, NA, NA, NA, 13.…
## $ timer_click_count_93   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_94   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_last_click_95    <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_page_submit_96   <dbl> NA, NA, NA, 11.042, 15.062, NA, NA, NA, NA, 11.…
## $ timer_click_count_97   <dbl> NA, NA, NA, 0, 0, NA, NA, NA, NA, 0, NA, 0, NA,…
## $ timer_first_click_98   <dbl> NA, NA, NA, NA, NA, 2.033, NA, 7.726, 0.000, NA…
## $ timer_last_click_99    <dbl> NA, NA, NA, NA, NA, 2.033, NA, 9.927, 0.000, NA…
## $ timer_page_submit_100  <dbl> NA, NA, NA, NA, NA, 12.022, NA, 12.191, 12.866,…
## $ timer_click_count_101  <dbl> NA, NA, NA, NA, NA, 1, NA, 3, 0, NA, 3, NA, 0, …
## $ timer_first_click_102  <dbl> NA, NA, NA, NA, NA, 3.867, NA, 0.000, 0.000, NA…
## $ timer_last_click_103   <dbl> NA, NA, NA, NA, NA, 4.271, NA, 0.000, 0.000, NA…
## $ timer_page_submit_104  <dbl> NA, NA, NA, NA, NA, 12.009, NA, 18.048, 11.882,…
## $ timer_click_count_105  <dbl> NA, NA, NA, NA, NA, 2, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_106  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_107   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_108  <dbl> NA, NA, NA, NA, NA, 10.747, NA, 11.176, 11.179,…
## $ timer_click_count_109  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_110  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_111   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_112  <dbl> NA, NA, NA, NA, NA, 10.804, NA, 26.199, 10.850,…
## $ timer_click_count_113  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_114  <dbl> NA, NA, NA, NA, NA, 10.627, NA, 0.000, 0.000, N…
## $ timer_last_click_115   <dbl> NA, NA, NA, NA, NA, 10.627, NA, 0.000, 0.000, N…
## $ timer_page_submit_116  <dbl> NA, NA, NA, NA, NA, 11.277, NA, 23.519, 11.274,…
## $ timer_click_count_117  <dbl> NA, NA, NA, NA, NA, 1, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_118  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_119   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_120  <dbl> NA, NA, NA, NA, NA, 10.866, NA, 29.301, 10.858,…
## $ timer_click_count_121  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_122  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_123   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_124  <dbl> NA, NA, NA, NA, NA, 10.689, NA, 16.823, 10.992,…
## $ timer_click_count_125  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_126  <dbl> NA, NA, NA, NA, NA, 10.967, NA, 0.000, 0.000, N…
## $ timer_last_click_127   <dbl> NA, NA, NA, NA, NA, 10.967, NA, 0.000, 0.000, N…
## $ timer_page_submit_128  <dbl> NA, NA, NA, NA, NA, 11.977, NA, 11.782, 10.862,…
## $ timer_click_count_129  <dbl> NA, NA, NA, NA, NA, 1, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_130  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_131   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_132  <dbl> NA, NA, NA, NA, NA, 10.798, NA, 18.858, 11.166,…
## $ timer_click_count_133  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_134  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_135   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_136  <dbl> NA, NA, NA, NA, NA, 10.854, NA, 29.689, 10.976,…
## $ timer_click_count_137  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_138  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_139   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_140  <dbl> NA, NA, NA, NA, NA, 11.342, NA, 18.249, 10.858,…
## $ timer_click_count_141  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_142  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_143   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_144  <dbl> NA, NA, NA, NA, NA, 10.663, NA, 16.384, 10.834,…
## $ timer_click_count_145  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_146  <dbl> NA, NA, NA, NA, NA, 0.000, NA, 0.000, 0.000, NA…
## $ timer_last_click_147   <dbl> NA, NA, NA, NA, NA, 0.000, NA, 0.000, 0.000, NA…
## $ timer_page_submit_148  <dbl> NA, NA, NA, NA, NA, 10.845, NA, 28.754, 10.985,…
## $ timer_click_count_149  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 1, …
## $ timer_first_click_150  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_151   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_152  <dbl> NA, NA, NA, NA, NA, 10.823, NA, 12.297, 10.954,…
## $ timer_click_count_153  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_154  <dbl> NA, NA, NA, NA, NA, 11.005, NA, 0.000, 0.000, N…
## $ timer_last_click_155   <dbl> NA, NA, NA, NA, NA, 11.005, NA, 0.000, 0.000, N…
## $ timer_page_submit_156  <dbl> NA, NA, NA, NA, NA, 12.483, NA, 11.066, 11.061,…
## $ timer_click_count_157  <dbl> NA, NA, NA, NA, NA, 1, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_158  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_159   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_160  <dbl> NA, NA, NA, NA, NA, 11.806, NA, 17.771, 10.798,…
## $ timer_click_count_161  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_162  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_163   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_164  <dbl> NA, NA, NA, NA, NA, 11.163, NA, 27.071, 11.877,…
## $ timer_click_count_165  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_166  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_167   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_168  <dbl> NA, NA, NA, NA, NA, 10.881, NA, 18.258, 10.777,…
## $ timer_click_count_169  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_170  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_last_click_171   <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_page_submit_172  <dbl> NA, NA, NA, NA, NA, 10.825, NA, 16.405, 11.159,…
## $ timer_click_count_173  <dbl> NA, NA, NA, NA, NA, 0, NA, 0, 0, NA, 0, NA, 0, …
## $ timer_first_click_174  <dbl> 13.410, 10.114, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_last_click_175   <dbl> 13.410, 10.114, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_page_submit_176  <dbl> 15.182, 11.082, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_177  <dbl> 1, 1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_178  <dbl> 6.650, 0.478, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_179   <dbl> 7.176, 9.998, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_180  <dbl> 11.444, 10.663, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_181  <dbl> 2, 2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_182  <dbl> 0.000, 7.798, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_183   <dbl> 0.000, 10.222, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ timer_page_submit_184  <dbl> 11.283, 10.886, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_185  <dbl> 0, 3, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_186  <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_187   <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_188  <dbl> 13.719, 11.630, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_189  <dbl> 0, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_190  <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_191   <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_192  <dbl> 10.793, 13.510, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_193  <dbl> 0, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_194  <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_195   <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_196  <dbl> 13.301, 11.503, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_197  <dbl> 0, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_198  <dbl> 11.193, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ timer_last_click_199   <dbl> 11.193, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ timer_page_submit_200  <dbl> 11.908, 13.859, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_201  <dbl> 1, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_202  <dbl> 0.000, 9.714, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_203   <dbl> 0.000, 10.724, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ timer_page_submit_204  <dbl> 11.537, 12.715, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_205  <dbl> 0, 2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_206  <dbl> 0.000, 9.720, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_207   <dbl> 0.00, 9.72, NA, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_page_submit_208  <dbl> 12.032, 10.583, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_209  <dbl> 0, 1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_210  <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_211   <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_212  <dbl> 12.455, 12.411, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_213  <dbl> 0, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_214  <dbl> 0.000, 7.560, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_215   <dbl> 0.000, 7.560, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_216  <dbl> 12.247, 10.775, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_217  <dbl> 0, 1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_218  <dbl> 0.000, 8.120, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_219   <dbl> 0.000, 8.120, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_220  <dbl> 14.245, 11.131, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_221  <dbl> 0, 1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_222  <dbl> 0.000, 8.998, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_223   <dbl> 0.000, 10.831, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ timer_page_submit_224  <dbl> 11.101, 11.207, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_225  <dbl> 0, 2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_226  <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_227   <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_228  <dbl> 11.930, 13.710, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_229  <dbl> 0, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_230  <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_231   <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_232  <dbl> 13.154, 10.908, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_233  <dbl> 0, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_234  <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_235   <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_236  <dbl> 11.368, 10.740, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_237  <dbl> 0, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_238  <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_239   <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_240  <dbl> 12.493, 12.568, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_241  <dbl> 0, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_242  <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_243   <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_244  <dbl> 11.167, 15.436, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_245  <dbl> 0, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_246  <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_last_click_247   <dbl> 0.000, 0.000, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_248  <dbl> 11.293, 11.845, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ timer_click_count_249  <dbl> 0, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ timer_first_click_250  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_last_click_251   <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_252  <dbl> NA, NA, 12.018, NA, NA, NA, 21.627, NA, NA, NA,…
## $ timer_click_count_253  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_254  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_last_click_255   <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_256  <dbl> NA, NA, 12.928, NA, NA, NA, 13.205, NA, NA, NA,…
## $ timer_click_count_257  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_258  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_last_click_259   <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_260  <dbl> NA, NA, 12.162, NA, NA, NA, 11.413, NA, NA, NA,…
## $ timer_click_count_261  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_262  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_last_click_263   <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_264  <dbl> NA, NA, 11.365, NA, NA, NA, 11.492, NA, NA, NA,…
## $ timer_click_count_265  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_266  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_last_click_267   <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_268  <dbl> NA, NA, 11.168, NA, NA, NA, 11.940, NA, NA, NA,…
## $ timer_click_count_269  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_270  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_last_click_271   <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_272  <dbl> NA, NA, 11.426, NA, NA, NA, 11.148, NA, NA, NA,…
## $ timer_click_count_273  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_274  <dbl> NA, NA, 0.000, NA, NA, NA, 6.919, NA, NA, NA, N…
## $ timer_last_click_275   <dbl> NA, NA, 0.000, NA, NA, NA, 6.919, NA, NA, NA, N…
## $ timer_page_submit_276  <dbl> NA, NA, 11.618, NA, NA, NA, 11.384, NA, NA, NA,…
## $ timer_click_count_277  <dbl> NA, NA, 0, NA, NA, NA, 1, NA, NA, NA, NA, NA, N…
## $ timer_first_click_278  <dbl> NA, NA, 0.000, NA, NA, NA, 12.599, NA, NA, NA, …
## $ timer_last_click_279   <dbl> NA, NA, 0.000, NA, NA, NA, 12.599, NA, NA, NA, …
## $ timer_page_submit_280  <dbl> NA, NA, 10.974, NA, NA, NA, 13.120, NA, NA, NA,…
## $ timer_click_count_281  <dbl> NA, NA, 0, NA, NA, NA, 1, NA, NA, NA, NA, NA, N…
## $ timer_first_click_282  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_last_click_283   <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_284  <dbl> NA, NA, 11.251, NA, NA, NA, 10.666, NA, NA, NA,…
## $ timer_click_count_285  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_286  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_last_click_287   <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_288  <dbl> NA, NA, 11.300, NA, NA, NA, 10.892, NA, NA, NA,…
## $ timer_click_count_289  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_290  <dbl> NA, NA, 0.000, NA, NA, NA, 0.000, NA, NA, NA, N…
## $ timer_last_click_291   <dbl> NA, NA, 0.000, NA, NA, NA, 0.000, NA, NA, NA, N…
## $ timer_page_submit_292  <dbl> NA, NA, 10.965, NA, NA, NA, 10.789, NA, NA, NA,…
## $ timer_click_count_293  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_294  <dbl> NA, NA, 0.000, NA, NA, NA, 11.242, NA, NA, NA, …
## $ timer_last_click_295   <dbl> NA, NA, 0.000, NA, NA, NA, 11.242, NA, NA, NA, …
## $ timer_page_submit_296  <dbl> NA, NA, 11.230, NA, NA, NA, 11.655, NA, NA, NA,…
## $ timer_click_count_297  <dbl> NA, NA, 0, NA, NA, NA, 1, NA, NA, NA, NA, NA, N…
## $ timer_first_click_298  <dbl> NA, NA, 0.000, NA, NA, NA, 10.561, NA, NA, NA, …
## $ timer_last_click_299   <dbl> NA, NA, 0.000, NA, NA, NA, 10.561, NA, NA, NA, …
## $ timer_page_submit_300  <dbl> NA, NA, 11.196, NA, NA, NA, 10.871, NA, NA, NA,…
## $ timer_click_count_301  <dbl> NA, NA, 0, NA, NA, NA, 1, NA, NA, NA, NA, NA, N…
## $ timer_first_click_302  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_last_click_303   <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_304  <dbl> NA, NA, 11.568, NA, NA, NA, 10.676, NA, NA, NA,…
## $ timer_click_count_305  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_306  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_last_click_307   <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_308  <dbl> NA, NA, 12.078, NA, NA, NA, 12.614, NA, NA, NA,…
## $ timer_click_count_309  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_310  <dbl> NA, NA, 0.000, NA, NA, NA, 0.000, NA, NA, NA, N…
## $ timer_last_click_311   <dbl> NA, NA, 0.000, NA, NA, NA, 0.000, NA, NA, NA, N…
## $ timer_page_submit_312  <dbl> NA, NA, 11.239, NA, NA, NA, 10.827, NA, NA, NA,…
## $ timer_click_count_313  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_314  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_last_click_315   <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_316  <dbl> NA, NA, 11.030, NA, NA, NA, 10.762, NA, NA, NA,…
## $ timer_click_count_317  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_318  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_last_click_319   <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_page_submit_320  <dbl> NA, NA, 12.819, NA, NA, NA, 11.180, NA, NA, NA,…
## $ timer_click_count_321  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ timer_first_click_322  <dbl> NA, NA, 0.000, NA, NA, NA, 0.000, NA, NA, NA, N…
## $ timer_last_click_323   <dbl> NA, NA, 0.000, NA, NA, NA, 0.000, NA, NA, NA, N…
## $ timer_page_submit_324  <dbl> NA, NA, 11.347, NA, NA, NA, 10.886, NA, NA, NA,…
## $ timer_click_count_325  <dbl> NA, NA, 0, NA, NA, NA, 0, NA, NA, NA, NA, NA, N…
## $ nc_1                   <dbl> 2, 2, 2, 5, 4, 4, 4, 1, 4, 4, 3, 4, 4, 2, 4, 1,…
## $ nc_2                   <dbl> 2, 2, 1, 4, 4, 4, 4, 1, 4, 4, 3, 4, 3, 2, 4, 1,…
## $ nc_3                   <dbl> 2, 2, 1, 3, 4, 3, 2, 4, 2, 2, 3, 2, 2, 1, 2, 1,…
## $ nc_4                   <dbl> 2, 4, 2, 4, 4, 4, 5, 1, 4, 4, 3, 3, 2, 4, 4, 3,…
## $ nc_5                   <dbl> 2, 3, 2, 2, 4, 2, 4, 4, 2, 2, 3, 3, 3, 4, 4, 3,…
## $ nc_6                   <dbl> 1, 3, 2, 2, 4, 2, 2, 4, 2, 2, 3, 2, 2, 2, 4, 2,…
## $ nbs_1                  <dbl> 2, 5, 1, 4, 4, 4, 5, 3, 4, 5, 4, 4, 3, 3, 3, 3,…
## $ nbs_2                  <dbl> 2, 3, 2, 4, 2, 4, 4, 4, 2, 2, 4, 2, 2, 2, 2, 1,…
## $ nbs_3                  <dbl> 2, 2, 2, 4, 2, 5, 4, 4, 2, 2, 3, 4, 1, 1, 3, 1,…
## $ nbs_4                  <dbl> 1, 2, 2, 3, 2, 1, 1, 2, 2, 1, 3, 2, 2, 2, 2, 1,…
## $ nbs_5                  <dbl> 1, 2, 2, 3, 2, 1, 2, 2, 2, 2, 3, 3, 3, 2, 2, 1,…
## $ nbs_6                  <dbl> 1, 4, 2, 4, 2, 2, 5, 2, 4, 4, 3, 4, 2, 2, 4, 3,…
## $ mistrust_expertise_1   <dbl> 2, 2, 1, 3, 2, 2, 3, 1, 3, 2, 3, 3, 3, 1, 3, 2,…
## $ mistrust_expertise_2   <dbl> 2, 1, 1, 2, 1, 1, 2, 1, 3, 3, 3, 3, 1, 1, 3, 1,…
## $ mistrust_expertise_3   <dbl> 2, 2, 5, 3, 2, 1, 4, 2, 2, 2, 3, 2, 2, 2, 2, 1,…
## $ gss                    <dbl> 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2,…
## $ certainty_sci_know_1   <dbl> 4, 5, 5, 3, 4, 4, 5, 2, 4, 5, 3, 4, 1, 5, 5, 4,…
## $ certainty_sci_know_2   <dbl> 2, 3, 4, 2, 2, 3, 5, 1, 4, 2, 3, 2, 5, 4, 5, 3,…
## $ certainty_sci_know_3   <dbl> 4, 5, 5, 4, 5, 5, 5, 5, 3, 4, 3, 4, 5, 5, 5, 5,…
## $ certainty_sci_know_4   <dbl> 4, 5, 3, 3, 2, 3, 5, 4, 4, 2, 3, 4, 2, 2, 5, 4,…
## $ certainty_sci_know_5   <dbl> 4, 5, 5, 5, 5, 4, 5, 3, 4, 4, 3, 4, 3, 4, 5, 5,…
## $ certainty_sci_know_6   <dbl> 4, 5, 5, 5, 4, 4, 4, 5, 3, 2, 3, 4, 5, 5, 5, 5,…
## $ development_sci_know_1 <dbl> 4, 5, 5, 5, 4, 5, 5, 5, 4, 5, 3, 4, 5, 5, 5, 5,…
## $ development_sci_know_2 <dbl> 4, 4, 5, 4, 5, 5, 5, 5, 4, 5, 3, 4, 4, 5, 5, 5,…
## $ development_sci_know_3 <dbl> 4, 5, 5, 4, 4, 5, 4, 5, 5, 5, 2, 4, 5, 5, 5, 5,…
## $ development_sci_know_4 <dbl> 4, 4, 5, 4, 5, 5, 5, 5, 5, 5, 2, 4, 5, 5, 5, 5,…
## $ development_sci_know_5 <dbl> 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 2, 4, 5, 5, 5, 5,…
## $ development_sci_know_6 <dbl> 5, 4, 5, 4, 4, 5, 4, 5, 4, 4, 3, 2, 3, 5, 5, 5,…
## $ memory_task            <chr> "1", "1", "1", "1", "1", "1", "1", "1", "1", "1…
## $ memory_task_do         <chr> "0|1|0|1|1|0|0|1|1|0|0|1|0|1", "0|0|1|1|1|0|1|1…
## $ serious_check          <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ sc0                    <dbl> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 7, 7, 7, 7, 7,…
## $ prolific_pid           <chr> "truncated5ecad11f815a", "truncated5e6da5dfe02f…
## $ random_id              <dbl> 8661, 8637, 1981, 1161, 9486, 5462, 2429, 1894,…
## $ fl_12_do               <chr> "Block_3_Qualified_Conflict", "Block_3_Qualifie…

Cleaning the data

Same process just need to change which variables we’re selecting since its different.

exp2_edit <- exp2_raw  %>%
  filter(consent == 1) %>%
  filter(finished == 1) %>%
  filter(serious_check == 1) %>%
  rename(recall_score = sc0) %>% 
  filter(recall_score >= 4) %>%
  distinct(prolific_pid, .keep_all = TRUE) %>%             #Removes duplicated data
  select(finished, 
         gender, 
         age, 
         nc_1:development_sci_know_6,
         serious_check,
         recall_score,
         prolific_pid,
         fl_12_do)

glimpse(exp2_edit)
## Rows: 400
## Columns: 35
## $ finished               <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ gender                 <dbl> 2, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,…
## $ age                    <dbl> 51, 19, 31, 32, 49, 20, 20, 29, 29, 18, 31, 21,…
## $ nc_1                   <dbl> 2, 2, 2, 5, 4, 4, 4, 1, 4, 4, 3, 4, 4, 2, 4, 1,…
## $ nc_2                   <dbl> 2, 2, 1, 4, 4, 4, 4, 1, 4, 4, 3, 4, 3, 2, 4, 1,…
## $ nc_3                   <dbl> 2, 2, 1, 3, 4, 3, 2, 4, 2, 2, 3, 2, 2, 1, 2, 1,…
## $ nc_4                   <dbl> 2, 4, 2, 4, 4, 4, 5, 1, 4, 4, 3, 3, 2, 4, 4, 3,…
## $ nc_5                   <dbl> 2, 3, 2, 2, 4, 2, 4, 4, 2, 2, 3, 3, 3, 4, 4, 3,…
## $ nc_6                   <dbl> 1, 3, 2, 2, 4, 2, 2, 4, 2, 2, 3, 2, 2, 2, 4, 2,…
## $ nbs_1                  <dbl> 2, 5, 1, 4, 4, 4, 5, 3, 4, 5, 4, 4, 3, 3, 3, 3,…
## $ nbs_2                  <dbl> 2, 3, 2, 4, 2, 4, 4, 4, 2, 2, 4, 2, 2, 2, 2, 1,…
## $ nbs_3                  <dbl> 2, 2, 2, 4, 2, 5, 4, 4, 2, 2, 3, 4, 1, 1, 3, 1,…
## $ nbs_4                  <dbl> 1, 2, 2, 3, 2, 1, 1, 2, 2, 1, 3, 2, 2, 2, 2, 1,…
## $ nbs_5                  <dbl> 1, 2, 2, 3, 2, 1, 2, 2, 2, 2, 3, 3, 3, 2, 2, 1,…
## $ nbs_6                  <dbl> 1, 4, 2, 4, 2, 2, 5, 2, 4, 4, 3, 4, 2, 2, 4, 3,…
## $ mistrust_expertise_1   <dbl> 2, 2, 1, 3, 2, 2, 3, 1, 3, 2, 3, 3, 3, 1, 3, 2,…
## $ mistrust_expertise_2   <dbl> 2, 1, 1, 2, 1, 1, 2, 1, 3, 3, 3, 3, 1, 1, 3, 1,…
## $ mistrust_expertise_3   <dbl> 2, 2, 5, 3, 2, 1, 4, 2, 2, 2, 3, 2, 2, 2, 2, 1,…
## $ gss                    <dbl> 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2,…
## $ certainty_sci_know_1   <dbl> 4, 5, 5, 3, 4, 4, 5, 2, 4, 5, 3, 4, 1, 5, 5, 4,…
## $ certainty_sci_know_2   <dbl> 2, 3, 4, 2, 2, 3, 5, 1, 4, 2, 3, 2, 5, 4, 5, 3,…
## $ certainty_sci_know_3   <dbl> 4, 5, 5, 4, 5, 5, 5, 5, 3, 4, 3, 4, 5, 5, 5, 5,…
## $ certainty_sci_know_4   <dbl> 4, 5, 3, 3, 2, 3, 5, 4, 4, 2, 3, 4, 2, 2, 5, 4,…
## $ certainty_sci_know_5   <dbl> 4, 5, 5, 5, 5, 4, 5, 3, 4, 4, 3, 4, 3, 4, 5, 5,…
## $ certainty_sci_know_6   <dbl> 4, 5, 5, 5, 4, 4, 4, 5, 3, 2, 3, 4, 5, 5, 5, 5,…
## $ development_sci_know_1 <dbl> 4, 5, 5, 5, 4, 5, 5, 5, 4, 5, 3, 4, 5, 5, 5, 5,…
## $ development_sci_know_2 <dbl> 4, 4, 5, 4, 5, 5, 5, 5, 4, 5, 3, 4, 4, 5, 5, 5,…
## $ development_sci_know_3 <dbl> 4, 5, 5, 4, 4, 5, 4, 5, 5, 5, 2, 4, 5, 5, 5, 5,…
## $ development_sci_know_4 <dbl> 4, 4, 5, 4, 5, 5, 5, 5, 5, 5, 2, 4, 5, 5, 5, 5,…
## $ development_sci_know_5 <dbl> 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 2, 4, 5, 5, 5, 5,…
## $ development_sci_know_6 <dbl> 5, 4, 5, 4, 4, 5, 4, 5, 4, 4, 3, 2, 3, 5, 5, 5,…
## $ serious_check          <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ recall_score           <dbl> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 7, 7, 7, 7, 7,…
## $ prolific_pid           <chr> "truncated5ecad11f815a", "truncated5e6da5dfe02f…
## $ fl_12_do               <chr> "Block_3_Qualified_Conflict", "Block_3_Qualifie…

Unlike experiment 1 that needed the sum of contradictions, this experiment needs the means except for gss. Shouldn’t be hard. I’ll also separate fl_12_do here.

exp2_edit <- exp2_edit %>%
  mutate(mean_confusion = rowSums(across(starts_with("nc")))/6) %>%
  mutate(mean_backlash = rowSums(across(starts_with("nbs")))/6) %>%
  mutate(mean_mistrust_expertise = rowSums(across(starts_with("mistrust_expertise")))/3) %>%
  mutate(mean_certainty = rowSums(across(starts_with("certainty_sci_know")))/6) %>%
  mutate(mean_development = rowSums(across(starts_with("development_sci_know")))/6) %>%
  select(-starts_with("nc"),
         -starts_with("nbs"),
         -starts_with("mistrust_expertise"),
         -starts_with("certainty_sci_know"),
         -starts_with("development_sci_know"))
#Reordering the columns

exp2_edit <- exp2_edit %>%
 select(prolific_pid, finished, serious_check, recall_score,
        gender, age,
        gss, mean_confusion:mean_development,
        fl_12_do)

exp2_edit <- separate(data = exp2_edit, col = fl_12_do, into = c('block', 'number', 'format', 'conflict'), sep = '_')

exp2_edit <- exp2_edit %>%
  select(-starts_with("block"))
glimpse(exp2_edit)
## Rows: 400
## Columns: 15
## $ prolific_pid            <chr> "truncated5ecad11f815a", "truncated5e6da5dfe02…
## $ finished                <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
## $ serious_check           <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
## $ recall_score            <dbl> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 7, 7, 7, 7, 7…
## $ gender                  <dbl> 2, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1…
## $ age                     <dbl> 51, 19, 31, 32, 49, 20, 20, 29, 29, 18, 31, 21…
## $ gss                     <dbl> 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2…
## $ mean_confusion          <dbl> 1.833333, 2.666667, 1.666667, 3.333333, 4.0000…
## $ mean_backlash           <dbl> 1.500000, 3.000000, 1.833333, 3.666667, 2.3333…
## $ mean_mistrust_expertise <dbl> 2.000000, 1.666667, 2.333333, 2.666667, 1.6666…
## $ mean_certainty          <dbl> 3.666667, 4.666667, 4.500000, 3.666667, 3.6666…
## $ mean_development        <dbl> 4.333333, 4.500000, 5.000000, 4.166667, 4.5000…
## $ number                  <chr> "3", "3", "4", "1", "1", "2", "4", "2", "2", "…
## $ format                  <chr> "Qualified", "Qualified", "Qualified", "Generi…
## $ conflict                <chr> "Conflict", "Conflict", "Consistent", "Conflic…

Demographics

There’s no descriptives from the article so its just demographics.

The demographics the experimenters discussed are: sample size (by gender, and total): Total = 400, Male = 150, Female = 248, Other = 2 age (min, max, mean, standard deviation): Min = 18, Max = 73, Mean = 33.5, SD = 12

Same process as Experiment 1

This chunk is just for sample size

#Change gender value to male, female and other for clarity
exp2_edit <- exp2_edit %>%
  mutate(gender = case_when(
      gender == "1" ~ "Male",
      gender  == "2" ~ "Female",
      gender == "3" ~ "Other"))

#Calculate total sample size
exp2_edit %>% 
  count()
##     n
## 1 400
#Calculate sample size of gender
exp2_edit %>% 
  group_by(gender) %>% 
  count()
## # A tibble: 3 × 2
## # Groups:   gender [3]
##   gender     n
##   <chr>  <int>
## 1 Female   248
## 2 Male     150
## 3 Other      2

This chunk is for age

exp2_edit %>% 
  summarise(min_age = min(age), 
            max_age = max(age), 
            mean_age = round(mean(age), 1),
            sd_age = round(sd(age), 0)
  )
##   min_age max_age mean_age sd_age
## 1      18      73     33.5     12

Everything looks good!

Reproducing Figure 3

Same process as Figure 1 for Experiment 1, except we don’t have to go through the entire journey now.

Create the figure

I’m just going to do it all at once in this chunk code.

plot_nutri_confusion <- create_plot_t6(
  data = exp2_edit,
  measurement = exp2_edit$mean_confusion,
  name = "Nutritional Confusion",
  y_title = "Nutritional Confusion",
  lim1 = 1,
  lim2 = 5,
  break_size = 1,
  no.minor.breaks = 2,
  violin_width = 1,
  minor_grid_yesno = element_line(
      linewidth = 0.3,
      color = "gray"
    )
  )

plot_nutri_backlash <- create_plot_t6(
  data = exp2_edit,
  measurement = exp2_edit$mean_backlash,
  name = "Nutritional Backlash",
  y_title = "Nutritional Backlash",
  lim1 = 1,
  lim2 = 5,
  break_size = 1,
  no.minor.breaks = 2,
  violin_width = 1,
  minor_grid_yesno = element_line(
      linewidth = 0.3,
      color = "gray"
    )
  )

plot_mistrust_exp <- create_plot_t6(
  data = exp2_edit,
  measurement = exp2_edit$mean_mistrust_expertise,
  name = "Mistrust of Expertise",
  y_title = "Mistrust of expertise",
  lim1 = 1,
  lim2 = 5,
  break_size = 1,
  no.minor.breaks = 2,
  violin_width = 1,
  minor_grid_yesno = element_line(
      linewidth = 0.3,
      color = "gray"
    )
  )


plot_confidence <- create_plot_t6(
  data = exp2_edit,
  measurement = exp2_edit$gss,
  name = "Confidence in Scientific Community",
  y_title = "Confidence in Scientific Community",
  lim1 = 1,
  lim2 = 3,
  break_size = 1,
  no.minor.breaks = 5,
  violin_width = 1,
  minor_grid_yesno = element_line(
      linewidth = 0.3,
      color = "gray"
    )
  )

plot_certainty <- create_plot_t6(
  data = exp2_edit,
  measurement = exp2_edit$mean_certainty,
  name = "Certainty of Knowledge",
  y_title = "Certainty of Knowledge",
  lim1 = 1,
  lim2 = 5,
  break_size = 1,
  no.minor.breaks = 2,
  violin_width = 1,
  minor_grid_yesno = element_line(
      linewidth = 0.3,
      color = "gray"
    )
  )
plot_development <- create_plot_t6(
  data = exp2_edit,
  measurement = exp2_edit$mean_development,
  name = "Development of Knowledge",
  y_title = "Development of Knowledge",
  lim1 = 1,
  lim2 = 5,
  break_size = 1,
  no.minor.breaks = 2,
  violin_width = 1,
  minor_grid_yesno = element_line(
      linewidth = 0.3,
      color = "gray"
    )
  )

plot(plot_nutri_confusion)

plot(plot_nutri_backlash)

plot(plot_mistrust_exp)

plot(plot_confidence)

plot(plot_certainty)

plot(plot_development)

Looks good. Onto combining and png’ing it.

Combine plots together

Same as experiment 1 but since we have an even number of plots we shouldn’t need whitegrob.

figure_3 <- grid.arrange(plot_nutri_confusion, plot_nutri_backlash, plot_mistrust_exp, plot_confidence, plot_certainty, plot_development, ncol = 2, nrow = 3)

png(filename="figure_3_t1.png", width=793, height=1121, bg = "white")
plot(figure_3) # Not the final plot, resulting png saved has no issues
dev.off()
## png 
##   2

Yup. Everything looks good! Great work from the entire group.

2. Recommendations

The goal of this section is to give imaginary feedback to the authors of the paper you have tried to reproduce. Describe and explain three things that the researchers could have done to improve the reproducibility of their work. What do you recommend the researchers do to learn about these open science practices?

Honestly I don’t really have that many complaints about their rmd/script.

  1. Explain pirate plot

I really wish they explained how this worked. While it looks like customisation is poor compared to ggplot, it just looked so simple. Even if experiment 2 figure reproduction was only 150 lines, they did it in like 30 lines that’s actually magical. To us it might seem there’s value in having this precise control over plotting, but maybe in a realistic scenario as long as it follows APA guidelines it doesn’t matter. However, I still don’t have any idea what a lot of these parameters are supposed to mean, and they don’t explain anything for it.

  1. Variable naming

One small thing that they did for the most part but failed is that some variable names and metadata just weren’t helpful. The biggest examples are gss and sc0. gss ended up meaning “Confidence in the Scientific Community” and sc0 meant “recall score”, but this is things that we had to find it ourselves and should’ve been labelled. There was also the fl_do, which I’m just going to assume is a Qualtrics default, but I’m not sure if the metadata is something they can adjust for. Regardless, these are things that should be talked about in their script regardless.

  1. Consistency in commenting alongside explaining what things do.

This might be beyond what should be expected, but as a beginner I’d prefer if the Experimenter’s would do a better job explaining the coding part. Yes I could look up these functions myself but when the aim is to have perfect reproducibility I think they should help explain beyond just what they’re going to do. I didn’t have any idea what the “$” meant (that might be a me problem though), but they just go “Find mean” or “Find ANOVA” and don’t tell us how the function and its parameters work. At the beginning they actually did a good job explaining on getting the file and cleaning the data. They clearly explained why they did some things like read_survey made it a tibble and they needed a dataframe. They also explained their exclusion criteria in the R-script. However, beyond that when they started using external packages they just gave a heading and said “using x package” as if I’m supposed to know. To give them credit sometimes they linked documentation on how they did things but nevertheless I feel this is something that should also be explained in the context of their code.

3. Reflections

What a journey you have been on! Now that you have finished your verification project, write a short response to each of the following prompts

  1. When I first heard that the internship involved learning how to code in R I felt honestly not that scared about it. I wasn’t really excited, and I heard daunting things about R, but I felt that I’ll be fine as long as I put my work into it and understand it. I’ve had prior experience in coding so being annoyed about an error and googling how to fix it so I’m used to all the annoyances. My brother and my friend actually have experience in R, not that I was going to ask them to do everything for me (maybe only if I’m stuck and online can’t help) and this moreso made me feel like “oh I’m doing big brain stuff now” so that scared me a bit.

  2. Now that I have been learning R for 10 weeks, I feel completely fine about R. While just simply wanting to learn R for the sake of understanding new things might be a bit tough (I’m sure there’s textbooks) for what we did in the past 10 weeks R was pretty comfortable to me. The official R documentation for functions were so useful and of course all the community knowledge from sites like stack overflow. When I learnt coding before this term AI wasn’t a thing so I didn’t use AI in this assignment either. I really don’t think this was that bad, although I didn’t need any inferential calculations so that may be why.

  3. The hardest thing I have encountered about learning R this term was definitely making the aesthetics correct. It might have seemed hard during the journey but looking back it really didn’t look hard. Maybe it was only stressful because we REALLY wanted it to be exactly the same. If we just allowed ourselves to be a lot more lenient this would’ve been so much easier.

  4. I am most proud of myself for just communicating with my group a lot and all of us just talking about our progress. Communication was tough sometimes, but it was honestly just really fun and we worked really well together to create this reproduction. Funnily enough, I had another presentation in another course this term and there was like no communication whatsoever people just wanted to split the work and we present our own stuff. I did try but responses were always slow and it just ended up like that. Just experiencing the difference in real-time was kind of interesting to me about how much more enjoyable working as a group is.

  5. The next thing I want to learn how to do in R is definitely inferential statistics that I learnt in Research Methods 3. I already know that we can just use t.test but I feel like there’s just more that we can do but I probably also don’t know enough to level up in R as well. They also used this “psych” package and that sounds useful for my future endeavours. Honestly I still think using SPSS/jamovi is just so much simpler and easier so this course hasn’t fully yet convinced me, but I’m aware of R’s potential. I think I just need to be better at statistics enough to see the limitations of SPSS/Jamovi, and actually be shown why R is the best for me to be convinced.