SCM

Forum: help

Monitor Forum | Start New Thread Start New Thread
Error - Nonfactors are specified as random [ Reply ]
By: Mary Diggs on 2015-04-19 23:08
[forum:42198]
Hello,

I'm new to R (and to Bayes factors), and am trying to calculate Bayes factors for a 2x2x3 ANOVA.

I have worked through the example for anovaBF in the user's manual, I get Bayes factor values that would lead to the same conclusion as those in the user's manual, but the second decimal place and the error values are not identical to those in the manual. I wonder if this has something to do with the settings in the version I'm using, but I don't know whether this is the case.

I tried doing the same thing with my data. To do this, I put them in a .csv file in a format as similar as possible to the sample file "puzzles" (I have fewer subjects, and more factors and levels).

If I enter:

bf = anovaBF(Mean ~ a*b*c + ID, data = mydata, whichRandom="ID")

This returns an error message:

"Error in createDataTypes(formula, whichRandom, data, analysis = "anova"):
Nonfactors are specified as random.

I can enter:

bf = anovaBF(Mean ~ a*b*c, data = mydata, whichRandom="ID")

which returns Bayes factor analysis values (which are presumably meaningless without the "+ ID").

I've tried modifying the .csv file that contains my data, so that there are just two factors with two levels (as in the sample data, puzzles). However, I can still only get R to compute some sort of Bayes factor by excluding the "+ ID".

I'm not sure exactly what I am doing wrong when I try to run the anovaBF with my data, but wonder whether someone is able to point me in the right direction.

I'm using R 3.2.0 and BayesFactor 0.9.11-1.

Many thanks in advance.

Thanks to:
Vienna University of Economics and Business Powered By FusionForge