Power analysis for multilevel model with two fixed and two random (crossed) effects: how to define sample size with simr package I want to define the sample size for a repeated measurement experiment. Every subject will indicate her/his behavior on a 1-7 scale for several stimuli (=behavior). I expect that personality and importance (their interaction) predicts this behavior. Both predictors will be measured on a 1-7 scale. I assume that there will be two random effects (see model below).
model <- lmer(behavior ~ personality * importance + (1 | subject) + 
           (1 | context), data = XXX_long)

I have no pilot data. And I failed to define the sample size by running a simulation with simr package. Can anyone help me?
 A: There are a lot of factors to this model. Is there no other research on which you can base a possibile magnitude of effect? (pilot data are needed when that's not the case). If this is for a grant, you can reframe the experimental design as being a "feasibility study" which is a useful way to fund small pilot studies with the opportunity to expand into bigger grants.
You will rarely find turnkey products that can inspect power of multilevel models. I have used simulation every single time. Unfortunately, it is quite costly (computational time) at the expense of being easy to do. Many people just "slice" the sample size to account for correlation and look at the operating characteristics of tests for independent data. See the discussion here;
Simulating correlated data is easy, but the large number of moving parts along with the computational intensity of fitting a mixed model make it infeasible to do in most cases unless you can specify: 
* the number of individuals, contexts, and replications in each case
* the magnitude of personality, importance, and their interaction
* the extent of residual error
* the distributions of all fixed and random effects, the likelihood of missingness / attrition.
* the desired power / minimum detectable effect / target sample size recruitment.
The number of possible replications if two or more of those are open ended amounts to days of simulations.
