Repeated Measures ANOVA help


I am new to RStudio and programming as a whole. I am trying to run a repeated measures ANOVA although I am having difficulty getting the code right. I have run two way ANOVAs in the past using the car package --- should I use a different package to run the repeated measures or is the car package still good for what I am trying to do.

This is my two way ANOVA thats Ive done in the past using the car package, how does the code for the repeated measures vary from this?

D_D.modDay2 <- lm(Day 2~PCB Treatment*Sex, data = D_D_Sacc_Bottle_Data_stats_in)
Anova(D_D.modDay2, type = 3)

My variables are Sex*PCB (between subjects) and then 2 levels for my within subjects (0.25% conc and 0.75% conc)

Any help would be appreciated thank you!!

Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers.

It can be very hard to reverse engineer a coding problem.

I can only offer one observation and one suggestion:

  1. Day [blank] 2 and PCF [blank] Treatment
lm(Day 2 ~ PCP Treatment*, data = ...)

will fail because of syntax.

  1. It's good practice to use descriptive object names, but they also should be as short as possible to make them so. Fewer typos.

Try a reprex?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.