We have fitted a linear mixed model to the data of a split-plot design with 2 factors (between: condition.t
- 3 levels; within: SM.blockDiff
- 2 levels). As there were in total 6 measurements per person (person ID: VP
), we also wanted to include a time polynomial time factor (blockID.c
).
The model was fitted in R
using the mixed
method from the package afex
which is essentially a wrapper around lmerTest
/lmer
. This fit worked without problems or warnings.
model <- mixed(quest ~ factor(blockID.c) * condition.t * SM.blockDiff + (poly(blockID.c, 4)|VP), data=df)
We now wanted to perform a post-hoc power-analysis on the interaction term of condition.t * SM.blockDiff
using the powerSim
method from the package simr
.
This was done with the following call:
power <- powerSim(model$full_model, test = fcompare(~ condition.t+SM.blockDiff, "kr"), nsim=200)
During progression of the simulation multiple warnings about singular fits appeared and the print of this power calculation also lists that:
> power
Power for model comparison, (95% confidence interval):
54.50% (47.33, 61.54)
Test: Kenward-Roger (package pbkrtest)
Comparison to ~condition.t + SM.blockDiff + [re]
Based on 200 simulations, (165 warnings, 0 errors)
alpha = 0.05, nrow = 288
Time elapsed: 0 h 12 m 29 s
nb: result might be an observed power calculation
When calling the warnings from the result, these are full of messages like this:
> head(power$warnings)
stage index message
1 Testing 1 Model failed to converge with 1 negative eigenvalue: -1.9e-01
2 Testing 2 Model failed to converge with max|grad| = 0.00668068 (tol = 0.002, component 1)
3 Fitting 3 Model failed to converge with max|grad| = 0.0053056 (tol = 0.002, component 1)
4 Testing 3 Model failed to converge with 1 negative eigenvalue: -1.3e-01
5 Testing 4 Model failed to converge with 1 negative eigenvalue: -9.7e-04
6 Fitting 5 Model failed to converge with 1 negative eigenvalue: -4.9e-02
I know about "regular" singular fits in LMMs and how to interpret or avoid them, however I'm unsure what to make of them in this case.
Do I need to worry about them or can I just ignore them and trust the results? This official vignette also seems to have singular fits however does not mention them. Also the singular fits there don't seem to show up on the printed summary.