I want to test two fixed factors while considering assessors (third factor) as random effect, and I'm not sure how to write correctly the R script. What about interactions between assessor and fixed factors?
There are several ways to do this. If you'd like a classical approach, use the lme4 package and the function lmer(). Your call will look something like:
lmer(dv ~ ff1*ff2 + (1+ff1+ff2|rf), data = yourdataframe)
If you'd like a Bayesian approach, use the BayesFactor package and the function generalTestBF(). Your call will look something like this:
(in the above, ff1 and ff2 are your fixed factors, rf is your random factor, and dv is your dependent variable). The difference between the two is that lmer gives you a traditional "per factor/interaction" analysis (testing significance of individual effects) and BayesFactor does model comparison, allowing you to select the best combination of the factors (including ones that have null effects, something a classical approach cannot do).
Without R code to load your data, I can't really tell you more. If you attach your data and an R script, and describe your desired analysis, then I can help you more.
I'm attaching you a txt file with my dataset. You'll find factor 1 and 2 which are fixed, and the random factor. Letters from "a" to "q" are the dependent variables to test. This is the result of a wine sensory test. Factors 1 and 2 are two treatments applied to the grapes and the random factor is for the judges (the persons tasting the wine and giving a score for each variable, i.e. color intensity, bitterness, etc.).
I have no experience with Bayes factor analysis. Usually, I'd have considered the judges as replicate in a sensory session and testing just the two fixed factors, but since I read the paper "Næs T., and Ø. Langsrud. 1998. Fixed or random assessors in sensory profiling? Food Quality and Preference, Vol.9, N.3, 145-152." , I'm curious to know the very difference between the approaches and what results I can observe.
When I was learning mixed effects modelling "Zuur, Alain, et al. Mixed effects models and extensions in ecology with R. Springer, 2009" was my best friend. Concise, friendly and full of examples