R code for finding residuals in mixed anova?

87 views Asked by At

I am wondering how I can check the normality of residuals (I’m using R).

I have a between subject factor (experiment) and two within factors (day and treatment). What I am looking for is the difference of percentage between experiments. ID is the individuals tested for.

I used the rstatix package with the code but the code doesn’t include residual:

anova_test(data = data, dv = percent, wid = ID, between = experiment, within = c(day, treatment))

And this one from the afex package also gives the same results with no residuals:

aov_car(percent ~ experiment * day * treatment + Error(ID/(day * treatment)), data = data)

Any help with how to write a code in any package that would give me the residuals is greatly appreciated!

0

There are 0 answers