Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Pooled errror term for RM factor for posthoc tests

Hi!

I was hoping someone could help me with a small issue...

In short - I have a RM ANOVA with three levels (remember, control, forgot). The significant main effect is followed with posthoc tests.

In JASP, I can chose whether I want to pool the error term for the RM factors (when running the posthoc tests). In r, however, it is pooled automatically.... Is there any way to prevent r from doing this?....

Im adding my few lines of code below. I hope someone can help me with this! :)


# Creates contrasts for condition

 contrast_list_forCondition <- list(c_remcon = c(-1, 0, 1), c_remfor = c(0, -1, 1), c_confor = c(-1, 1, 0))

# anova + posthoc tests

 res.aov_memory        <- aov(memoryperc ~ (Motivation) + Error(pp/(Motivation)), data = data_memory_resh)

 leastsquare_2         = lsmeans(res.aov_memory, "Motivation")

 res.contrasts_memory  = summary(contrast(leastsquare_2, contrast_list_forCondition, adjust = "bonf"))


Thank you!

Nathalie

Comments

  • Hi Nathalie,

    I moved your question to the JASP section of the forum. Maybe @EJ, can help you.

    Eduard

    Buy Me A Coffee

  • Thanks. I'll ask our ANOVA expert.

    E.J.

  • Hi Nathalie,


    That's how the emmeans works: it operates based on the model you specify. In the ANOVA model, there is the assumption of equal variances, so that influences how emmeans handles the pairwise comparisons. We offer a workaround, where (for balanced designs only) in the RM ANOVA you can choose to use the non-pooled error term for RM factors. This basically comes down to running a series of paired samples t-tests.

    I am currently trying to have the anova be able to specify different types of models (i.e., gls), so that we can offer this possibility while still using the lovely emmeans package.

    see for instance https://stats.stackexchange.com/questions/369532/interpreting-the-standard-error-from-emmeans-r


    Cheers,

    Johnny

Sign In or Register to comment.