Analysis of covariance (ANCOVA)


I want to run ANCOVAs for my data. I want to look at how peptide levels are differing between groups (I have three different groups) while adjusting for ethnicity.

This is the function I am using (What is the difference pf using the * or the + sign?):

ancova.mod1 <- lm(peptide ~ group + ethnicity, data = ancova.df)

The summary provides the Adjusted R square and p_trends, but I also want the estimated marginal means for each group, is there a way to extract this information?

+ is an additive feature in the model fit and * is multiplicative, which captures the interaction of two variables.

See the FAQ: How to do a minimal reproducible example reprex for beginners. It will be easier to show marginal effects that way.