Closed psyargh closed 2 years ago
You have three independent random intercepts in your formula, so V2
should be a list of three random effect variances. e.g.:
V2 <- list(0.12, 0.12, 0.12)
Thanks! However, once I do that, I get the following error:
Error in chol.default(V, pivot = TRUE) : 'a' must be a square matrix
What does your V2
look like now?
Apologies-- I had retained the matrix command, but I replaced it with "list" and now it works. Thanks!
However, when I do powerSim, it gives me the power of 0% no matter was I specify as my parameters. Here's how it looks:
fixef(model1) ["(x1+x2)*x3*x4"] <- 0.05
powerSim(model1, fixed("(x1+x2)*x3*x4"), nsim=10)
You need to specify effect names like this:
fixef(model1) ["x1"] <- ...
fixef(model1) ["x3:x4"] <- ...
And the same applies to fixed
. Did you not get an error from your fixef<-
call?
Thanks! I did get an error from the fixef <-
call.
Do I need to specify effect names for all main effects and 2-way interactions separately, even though I only want my power analysis to be based on the potential to capture the effect of the 3-way interaction?
You should be okay just specifying the effect sizes you're interested in. Note that you have two 3-way interactions though, "x1:x3:x4"
and "x2:x3:x4"
.
Hello,
I've had problems building my power simulation from scratch.
This is my model:
These are the parameters I estimated:
This is the error message I received:
Could you please help me identify and solve the problem?
Thank you!