pitakakariki / simr

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

Object not found in PowerCurve when NA's present #117

Open mdwhitby opened 6 years ago

mdwhitby commented 6 years ago

The update to 1.0.4 seems to have 'broken' some of my code.

I run simr in parallel, with a model built for each species. My model is SPP~y+(1|g)+(1|obs)+offset(logL).

I then extend along y and run powercurve() along y.

When I use version 1.0.3 everything works fine. However, with 1.0.4 I all the simulations produce an error object SPP cannot be found. This error appears to happen only if there are NA's in the response (However, GLMER runs fine, independently fitting the model with na.omit)

Any suggestions on what changed between 1.0.3 and 1.0.4, or how to deal with the problem?

Thank you (Great package by the way)

pitakakariki commented 6 years ago

Ah, this might be tricky to track down. It looks like your models are build programmatically?

Easiest way to debug this is if I have a copy of your code. Would you mind sending a copy to simr.peter@gmail.com?