I ran an experiment with an eye tracker and my data frame has this look:
Condition DWellsAOI1 DwellsAOI2 TotalDwells Participant1 1 12 13 25 Participant2 2 100 11 111 Participant3 1 50 50 100
and so on.
DWellsAOI1 counts the number of dwells on AOI1. Each participant belongs to one condition only, and the duration of the experiment is not fixed, so different
I was trying to check if there is a significant difference among the between conditions in terms of
DwellsAOI1, and my first approach was to compute the percentages (
DwellsAOI1/TotalDwells) and run anova. However, data violates both the assumptions.
I searched on Google and I found that I can use a generalized linear model (GLM) with binomial family.
Currently I'm running it like this:
mod <- glm(cbind(DwellsAOI1,TotalDwells-DwellsAOI1) ~ Condition, data=df, family=binomial("logit")) summary(aov(mod))
Is it the correct way?