Error with jmv::ANOVA vs Jamovi for two way ANOVA

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
iainjgallagher
Posts: 15
Joined: Sun Sep 24, 2017 10:51 am

Error with jmv::ANOVA vs Jamovi for two way ANOVA

Post by iainjgallagher »

Hi

Using Jamovi I can carry out a two-way ANOVA (Ratio as dep var; Optim & Sex as indep vars) on the following small dataset:

dput(swimming)
structure(list(Optim = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("Optimists",
"Pessimists"), class = "factor"), Sex = structure(c(2L, 2L, 2L,
2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L), .Label = c("Female",
"Male"), class = "factor"), Event = structure(c(1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = "Free", class = "factor"),
Ratio = c(0.986, 1.108, 0.952, 0.998, 1.108, 0.985, 1.001,
0.924, 0.968, 0.983, 0.947, 0.932, 1.078, 0.997, 0.983, 1.105,
1.116)), class = "data.frame", row.names = c(NA, -17L))

When I try to carry out the same analysis using jmv::ANOVA in R:

Code: Select all

swimming <- read.table('data/swimming_data2.csv', sep = ',', header=TRUE)
ANOVA(Ratio ~ Optim * Sex, data = swimming)


I get the following error:

Code: Select all

Error in .subset2(x, i, exact = exact) : invalid subscript type 'list'
Can you help with this?

Best,

i
User avatar
jonathon
Posts: 2620
Joined: Fri Jan 27, 2017 10:04 am

Re: Error with jmv::ANOVA vs Jamovi for two way ANOVA

Post by jonathon »

i think you need to name the formula argument. try this:

ANOVA(formula = Ratio ~ Optim * Sex, data = swimming)

jonathon
iainjgallagher
Posts: 15
Joined: Sun Sep 24, 2017 10:51 am

Re: Error with jmv::ANOVA vs Jamovi for two way ANOVA

Post by iainjgallagher »

ah, thanks... don't do stats tired!
Post Reply