pitakakariki / simr

Power Analysis of Generalised Linear Mixed Models by Simulation
70 stars 20 forks source link

error message #97

Open lcampb23 opened 6 years ago

lcampb23 commented 6 years ago

I am learning how to use simr. Here is my model:

hlmmodel <- lmer(pself ~ sideal.grandc + (1+sideal.grandc|cid), data=hlmdf, REML = TRUE)

This works and gives same value as model above for the fixed effect: doTest(hlmmodel, fixed("sideal.grandc", "z"))

My powerSim line: powerSim(hlmmodel, test=fixed("sideal.grandc", "z"), nsim=50)

100% of simulations had the following error message: "non-conformable array"

Any suggestions?

I am new to simr so apologize in advance if this is a simple/silly question.

lcampb23 commented 6 years ago

Out of 1444 data points there were 21 na's. I imputed missing values and tried again with the model, and this time it worked. So, the problem seems to be with some of the arrays were not of equal length. Thank you for your time.

pitakakariki commented 6 years ago

Thanks, I'll keep this in mind for the next release.