pitakakariki / simr

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

best way to extend the number of data points? #177

Open dzpo opened 4 years ago

dzpo commented 4 years ago

I have some old experimental data which is very similar to the experiment I'm about to run myself. I am trying to use this old data to simulate power for my experiment. The problem is, they had 120 items in 4 conditions, whereas I have 100 items in 2 conditions, so even though I have fewer items, I do have more data points. I'm not sure how to best capture this in the simulation. I've tried simply extending along the items,but entering a higher number of items (to make up for the otherwise missing data points), but I'm not sure if this is right.

Just a side note in case this is relevant: the actual predictor variable (in both studies) is formed by crossing the experimental conditions with a certain behavioral response, and it's a factor with three levels.

pitakakariki commented 4 years ago

Probably best to make a new data frame with expand.grid and then use the makeLmer function from the "from scratch" vignette.