General Linear Model with error

I want to run a Type III ANOVA with:

  • Main effects: Treatment, Strain, and Sex
  • 3-way interaction:Treatment: Strain: Sex
  • But without including the 2-way interactions.

This is the code i have tried or used

Fit the linear model

mDNA <- lm(DNA.damage ~ Treatment + Strain * Sex + Treatment:Strain:Sex, data = df5)

Get the ANOVA table

Anova(mDNA, type = "III")

this is the error I get.

Error in Anova_III_lm(mod, error, singular.ok = singular.ok, ...) :
there are aliased coefficients in the model

I hope to get a comment ASAP! Thanks, guys.

A quick internet search suggests:
The error message "there are aliased coefficients in the model" when using Anova_III_lm (or similar functions like Anova from the car package with type = "III") indicates the presence of perfect multicollinearity in your linear model.

What happens if you include the 2-way interactions.
What does a plot or a correlation matrix tell you

If I include the 2-way interaction, it works perfectly. Doesn't give me the error message.

It's been literally decades since I have looked at the math in an anova. So I am just guessing but it be be that you cannot do a three-way comparison without a two way and you are running into a multicollinearity or homoscedasticity problem but as I say, it's been many years since I even looked at a simple anova.

You might want to try doing this with a {car} dataset and see what happens.
Sorry to be of so little help.

Thank you
I thought the same as well