I ran a mixed anova which showed that both main effect of condition and type of headline are significant.
The interaction for condition and type of headline is also significant.
I would like to conduct post hoc analysis for type of headline which is a within-subjects factor that only has two levels: real and fake.
#load data
data <- read.csv("file name")
# Convert factors to factor type
data_long$PARTICIPANT <- factor(data_long$PARTICIPANT)
data_long$CONDITION <- factor(data_long$CONDITION)
data_long$HEADLINE_TYPE <- factor(data_long$HEADLINE_TYPE)
# Conduct the mixed ANOVA
anova_results <- aov(RESPONSE ~ CONDITION * HEADLINE_TYPE +
Error(PARTICIPANT/HEADLINE_TYPE), data = data_long)
# Summary of the results
summary(anova_results)
# Post hoc test for CONDITION (between-subjects factor) using Tukey's HSD
tukey_condition <- TukeyHSD(aov(RESPONSE ~ CONDITION, data = data_long))
print(tukey_condition)
That is the code I used to conduct the mixed anova and the follow-up analysis. However, I only managed to conduct the follow-up analysis for the between-subjects factor which is the condition.
Would anyone be able to help with a follow-up analysis of a within-subjects factor with 2 levels?
Laughingcows is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.