pitakakariki / simr

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

powercurve doesn't match simulations #195

Open dzpo opened 3 years ago

dzpo commented 3 years ago

I have some data collected from 24 participants, which I extended for 30, then 50. For 24 my power is consistently around 66%, then 70% for 30, and 93% for 50.

I plotted the powercurve using the extended 50 participant model, and it returned a curve that doesn't match the numbers above. It shows that with 20 subjects I should expect 80% power, 90% at 25, etc.

When I generate a power curve from the original dataset it seems to show true values.

Why would this be the case?

pitakakariki commented 3 years ago

Could be something to do with extend getting confused by unbalanced data.

How many rows in your orignal and extended datasets, and how many is powerCurve reporting?