ANOVA Within and Between Subject

Discuss statistics related things

by j3ypi » Sat May 06, 2017 9:59 am

I'm not quiet sure how to use the function for repeated measures anovas.

I have a 2x2 design with the version of the survey (1 or 2) and the ratio of solving an item before and after a certain explanation of the items depending on which version of the survey someone had.

Now I ran into some difficulties regarding between subject effects. I want to have "Version_Survey" as the between subject factor.

Code: Select all
    data = daten,
    rm = list(
            label = "Version_Survey",
            levels = c(1, 2))),
    rmCells = list(
            measure = "Literacy_pre",
            cell = 1),
            measure = "Literacy_post",
            cell = 2)),
    rmTerms = list(

Any idea of what I have to add for that? Maybe "bs" or "bsTerms" I thought but wasn't able implement it correctly.

Thanks in advance.
Posts: 8
Joined: Thu May 04, 2017 4:24 pm

by jonathon » Sat May 06, 2017 11:06 am

hi, the easiest way to get the right syntax is just to fire up jamovi and put it in syntax mode. then you can use the UI, and it will give you the right syntax.

but "bs" should be the correct argument to specify the between subjects factors.

if you're still stuck, feel free to post your data set here and we'll take a look.
User avatar
Posts: 1810
Joined: Fri Jan 27, 2017 10:04 am

by j3ypi » Sat May 06, 2017 11:48 am

I can't use the jamovi gui because of the error caused by the NAs. I'll look into it later or just wait for the new release with the fix.
Posts: 8
Joined: Thu May 04, 2017 4:24 pm

by Ravi » Sat May 06, 2017 12:13 pm

It would be something like this:

Code: Select all
rm <- list(
        levels=c("pre", "post")

rmCells <- list(

    data = daten,
    rm = rm,
    rmCells = rmCells,

This assumes that you have your data in wide format. In rm you define the name of your RM variable + the levels in that variable. With rmCells you link the columns in your data to the RM levels. Subsequently, you have to define you BS variable in bs. For now, you also have to define the terms, but in the future it will just assume that you want all the terms if you don't define these.

This is not the easiest syntax mostly because it assumes you have your data in wide format. In the future we want to support long format data which will make the syntax much easier.
User avatar
Posts: 169
Joined: Sat Jan 28, 2017 11:18 am

by j3ypi » Sat May 06, 2017 12:25 pm

Thanks a lot.

Even if it's not the easiest Syntax, it's still the best way to go in R. The lack of Within Subject ANOVAs in R is one of the few disadvantages compared to SPSS/SAS/Stata. In psychology you have to do them pretty often.

Keep up the good work!
Posts: 8
Joined: Thu May 04, 2017 4:24 pm

Return to Statistics