dependent variable: 'direction' has three levels: morning, noon, night. There is no reference level for 'direction' > table(indvar_FODs_new$direction) morning noon night 1683 1432 206 fixed factor/independent variable: 'Cond' has four levels: Ay, Bi, Ci, Di. There is no reference level for 'Cond' > table(indvar_FODs$Cond) Ay Bi Ci Di 880 880 880 880 random factor: 'colours' has two levels: blue and pink. > table(indvar_FODs_new$colours) blue pink 2720 800 I am using Rstudio. I want to statistically test if 'Cond' and 'colours', and the interaction effect between 'Cond' and 'colours' can affect the 'direction' value frequencies. Which statistical test and code would be ideal to conduct this analysis?
My_Data <- read.csv('~/Desktop/My_Data.csv') head(My_Data) ## Coding for a Mixed ANOVA ## Set up the model My_Data$direction <- relevel(My_Data$direction, ref = "morning") My_Data$Cond <- relevel(My_Data$Cond, ref = "Ay") My_Data$colours <- relevel(My_Data$colours, ref = "blue") My_Data.lm <- lm(direction ~ Cond * colours, data = My_Data) ## Model fit anova(My_Data.lm)