Was wondering if someone here could possibly help me with some R code! I'm pretty new to it and am a bit lost.
I'm working on my Thesis and to prove a hypothesis through a two-way ANOVA with 2 yes/no fixed factors with subsamples. The factors, however, are not nested. Just the samples within each repetition.
The code I've been attempting to use is the following:
model1 <- aov(Value~A*B+Error(factor(N)), data = df).
model2 <- aov(Value~A*A+Error(factor(S)), data = df)
(A = 2; B = 2; N = 3; S = 6)
Is this correct? I'm not sure if I'm using the error structure correctly, and therefore I don't know if there will be a proper fitting.
Any help at all would be greatly appreciated!