Mixed Effects Models 1

Author

Josef Fruehwald

Published

April 6, 2023

Setup

Library Loading

Data loading

um_dat <- read_tsv("https://bit.ly/3JdeSbx")
demog <- read_csv("https://bit.ly/3wOfcGx")

Preparing for modeling

um_dat |> 
  left_join(demog) |> 
  filter(word %in% c("UM", "UH")) |>
  mutate(
    # vowel duration
    vowel_dur= vowel_end - vowel_start,
    log_vowel_dur = log10(vowel_dur),
    # word
    word = fct_relevel(word, "UH"),
    # demographics
    gender = fct_relevel(gender, "f"),
    age_c = age - median(age, na.rm = T),
    age_z = age_c / 10
  ) |> 
  select(
    log_vowel_dur,
    word,
    gender,
    age_z,
    idstring,
    next_seg
  ) ->
  data_to_model

Modeling

Reuse

CC-BY-SA 4.0