Open bronson-hui opened 4 days ago
Looks like you're passing the model summary to powerSim
rather than the model itself?
I am so embarrassed. OMG! But, it now gives me a different error
sim1 <- powerSim(mod,
nsim= 10,
test = simr::fixed('stim_version.e:group', 'z'),
progress = T)
same issue with all sims resulted in errors:
sim1
Power for predictor 'stim_version.e:group', (95% confidence interval):
0.00% ( 0.00, 30.85)
Test: z-test
Based on 10 simulations, (0 warnings, 10 errors)
alpha = 0.05, nrow = 320000
Time elapsed: 0 h 1 m 30 s
nb: result might be an observed power calculation
The error is different though:
> sim1$errors
stage index message
1 Testing 1 subscript out of bounds
Looks like your interaction term involves multiple fixed effects parameters - in which case a z-test won't work. Try 'lr'
for the test instead of 'z'
?
it works.. thanks for the support!
I am struggling to get the power analysis for an interaction term (categorical : categorical) to run. Here is the model summary:
Here is the code I use for 'powerSim'
The output is always 0% power with all simulations resulted in errors
The errors are as follow:
Any pointers are appreciated.