Generation

generate functionTue, 18 Apr 2023

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 data is categorical data Test if 'Cond' and 'colours', and the interaction effect between 'Cond' and 'colours' has an effect on the 'direction'.

aov.m <- aov(direction ~ Cond + colours + Cond:colours + Error(colours), data=indvar_FODs_new) summary(aov.m)

Questions about programming?Chat with your personal AI assistant