LME_tutorial

LME tutorial 1

Linear model comes in

# pitch predicted by sex
pitch ~ sex
pitch ~ sex + ε

Start in R

setwd("E:/R/lme_learning")

library(lme4)
library(ggplot2)
library(dplyr)

pitch = c(233, 204, 242, 130, 112, 142)
sex = c(rep("female", 3), rep("male", 3))

my.df = data.frame(sex, pitch)
xmdl <- lm(pitch ~ sex, my.df)
summary(xmdl)

Pasted image 20241104125118.png