I'm a bit desperate, as my exam is tomorrow. Say I have the data for an ANOVA with 2 independent factors. According to my teacher, I would write the linear model on RStudio as:
lm(score ~ 1+ A + B + A:B, data=mydata1, contrasts=list(A=contr.sum, B=contr.sum))
I've faced an exercise in which he says, essencially, would this model be correct for a 2 way ANOVA?
lm(score ~ A + B + A:B, data=mydata1, contrasts=list(A=contr.sum, B=contr.sum))
I'm not sure what difference the "+1" makes on the LM, I assumed it changed the y for x=0, but I'm really not sure. Would it be appropriate to use?
Could anyone help me? Sorry if terms are wrong, my first language isn't english.