Error running jmv::anovaRM with a between-subj interaction
Posted: Sun Nov 13, 2022 8:00 pm
I am trying to run a three-way mixed-model ANOVA with one within-subject variable and two between-subjects variables. The analysis runs correctly in JAMOVI using ANOVA-->Repeated Measures ANOVA, but when I try the syntax in R, I get an error:
Error in if (term == "Residual") { : the condition has length > 1
The analysis runs without an error if I leave out the interaction term:
The code with the interaction ran correctly last year (I teach a graduate ANOVA class each fall, and I used the same demonstration last year).
I am using R version 4.2.2, R Studio version 2022.07.2 Build 576, and JAMOVI version 2.3.18.0. I did a fresh install of all three and the jmv package to confirm the error.
I've attached a copy of the dataset (from Lee, Ambler, & Sagarin, 2014, Archives of Sexual Behavior, Volume 43, pages 1115-1121). I loaded the dataset using:
Thank you for your help!
- Brad
Code: Select all
jmv::anovaRM(data = disgData,
rm = list(list(label="disgustType", levels=c("moral","sexual","pathogen"))),
rmCells = list(list(measure="moralDisgust",cell="moral"),
list(measure="sexualDisgust",cell="sexual"),
list(measure="pathogenDisgust",cell="pathogen")),
bs = vars(instructions, gender),
rmTerms = ~ disgustType,
bsTerms = ~ instructions + gender + instructions:gender)
The analysis runs without an error if I leave out the interaction term:
Code: Select all
jmv::anovaRM(data = disgData,
rm = list(list(label="disgustType", levels=c("moral","sexual","pathogen"))),
rmCells = list(list(measure="moralDisgust",cell="moral"),
list(measure="sexualDisgust",cell="sexual"),
list(measure="pathogenDisgust",cell="pathogen")),
bs = vars(instructions, gender),
rmTerms = ~ disgustType,
bsTerms = ~ instructions + gender)
I am using R version 4.2.2, R Studio version 2022.07.2 Build 576, and JAMOVI version 2.3.18.0. I did a fresh install of all three and the jmv package to confirm the error.
I've attached a copy of the dataset (from Lee, Ambler, & Sagarin, 2014, Archives of Sexual Behavior, Volume 43, pages 1115-1121). I loaded the dataset using:
Code: Select all
disgData <- read.csv("Disgust data.csv")
- Brad