diff --git a/data/fernald_marchman_2012/ReadME.md b/data/fernald_marchman_2012/ReadME.md index ff5da82..90c657a 100644 --- a/data/fernald_marchman_2012/ReadME.md +++ b/data/fernald_marchman_2012/ReadME.md @@ -27,10 +27,15 @@ Note: for images, some images were shown in slightly different versions or mirro For the manju and tempo trials, some were exposure where the object was on a background and some were tests where they were not on the background. -5. Importing ambiguity +Some images were mirrored depending on left/right positioning - image labels L and R are from the participants' perspective. +IMPORTANT: for related/unrelated prime noun/verb trials, the trials are represented in the raw data TWICE - once centered on the onset of the verb and once centered on the onset of the noun. We only keep the trial representation centered on the onset of the noun. +5. Importing ambiguity -ToDos: -* check with Martin and/or Virginia about whether slightly different images (mirroring) matter +Point of disambiguation is tricky for verb and adjective trials - should this be the first informative moment (e.g. when an informative verb was mentioned) or at the onset of the noun? +In the raw data, point of disambiguation: +- exposure novel trials: F0 is the onset of the verb +- 24mos: adjective: word onset is the adjective +- 30mos: hard adjective trials: onset of the color/ size \ No newline at end of file diff --git a/data/fernald_marchman_2012/import.R b/data/fernald_marchman_2012/import.R index 772b3e0..50ae8a8 100644 --- a/data/fernald_marchman_2012/import.R +++ b/data/fernald_marchman_2012/import.R @@ -45,6 +45,12 @@ d_processed_24 <- d_raw_24 %>% d_raw_30 <- read_delim(fs::path(read_path, "TL230ABoriginalichartsn1-121toMF.txt"), delim = "\t" ) +# remove duplicated trials (recentered on verb instead of noun) +d_raw_30 <- d_raw_30 |> + filter( + !(OriginalCondition %in% c("R-primeVerb","UR-primeVerb")) + ) + # d_raw_30 has two slightly different types of rows mixed together d_processed_30_part_1 <- d_raw_30 |> filter(is.na(Shifts)) |> @@ -60,15 +66,17 @@ d_processed_30_part_1 <- d_raw_30 |> d_processed_30_part_2 <- d_raw_30 |> filter(!is.na(Shifts)) |> - # these *do* have looking data in non-looking cols - rename( - f01 = `Frames - word starts at frame 45 `, - f02 = `First Shift Gap`, - f03 = `RT`, - f04 = `CritOnSet`, - f05 = `CritOffSet` - ) |> + # # these *do* have looking data in non-looking cols + # rename( + # f01 = `Frames - word starts at frame 45 `, + # f02 = `First Shift Gap`, + # f03 = `RT`, + # f04 = `CritOnSet`, + # f05 = `CritOffSet` + # ) |> preprocess_raw_data() %>% + #drop final x column + select(-x270) %>% relabel_time_cols( metadata_names = extract_col_types(.)[["metadata_names"]], pre_dis_names = extract_col_types(.)[["pre_dis_names"]], @@ -143,9 +151,6 @@ d_tidy <- d_tidy %>% TRUE ~ right_image )) - -## TODO See Readme for some questions about stimulus table - # create stimulus table stimulus_table_link <- d_tidy %>% distinct(target_image, target_label) |> @@ -230,7 +235,7 @@ d_tidy <- d_tidy %>% ) # create zero-indexed ids for trial_types -d_trial_type_ids <- d_tidy %>% +d_trial_type_ids <- d_tidy %>% distinct( target_id, distractor_id, target_side, condition @@ -252,7 +257,7 @@ d_tidy_semifinal <- d_tidy %>% left_join(d_administration_ids) %>% left_join(d_trial_type_ids) |> select(-condition2, -original_condition, -cond_orig) - + # get zero-indexed trial ids for the trials table d_trial_ids <- d_tidy_semifinal %>% @@ -262,13 +267,13 @@ d_trial_ids <- d_tidy_semifinal %>% ) %>% # the prescreen notes are not attached to all rows of a trial (sub_num x session x months x trial_type_id), so we fix this group_by(sub_num, session, months, trial_type_id) %>% - summarize(prescreen_notes = first(na.omit(prescreen_notes)), .groups = 'drop') %>% + summarize(prescreen_notes = first(na.omit(prescreen_notes)), .groups = 'drop') %>% mutate(excluded = !is.na(prescreen_notes)) |> rename(exclusion_reason = prescreen_notes) |> group_by(sub_num, session, months) %>% mutate(trial_order = cumsum(trial_type_id != lag(trial_type_id, default = first(trial_type_id)))) %>% - ungroup() %>% - mutate(trial_id = 0:(n()-1)) %>% + ungroup() %>% + mutate(trial_id = 0:(n()-1)) %>% distinct() # join @@ -464,5 +469,5 @@ write_and_validate( aoi_region_sets = NA, xy_timepoints = NA, aoi_timepoints, - upload = TRUE + upload = FALSE ) diff --git a/data/fernald_marchman_2012/notes b/data/fernald_marchman_2012/notes deleted file mode 100644 index c4cc450..0000000 --- a/data/fernald_marchman_2012/notes +++ /dev/null @@ -1,6 +0,0 @@ -PO - 2800 ms -sound on: carrier -F0 target noun onset -exposure novel trials: F0 is the onset of the verb -30mos: hard adjective trials: onset of the color/ size -24mos: adjective: word onset is the adjective