0

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!

Nad Pat
  • 3,129
  • 3
  • 10
  • 20
  • 1
    It would be helpful if you could provide a sample data using `dput(x)` refer https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Nad Pat Mar 26 '22 at 16:59
  • 2
    If your data needs to be protected, make a simulated sample. This sample should represent the all the data fields and their data types. – Kat Mar 26 '22 at 17:00

0 Answers0