debruine/lmem_sim

Data Generating Code in Extended Binomial Vignette?

Closed this issue · 1 comments

awhug commented

Hi Lisa!

Fantastic manuscript and really useful resource. Just a quick question - I could be entirely wrong here, but is there an error in the extended binomial simulation vignette?

# add together fixed and random effects for each effect
B_0 = beta_0 + S_0 + I_0,
B_e = beta_c + S_e + I_e,
B_c = beta_e + S_c,
B_ec = beta_ec + S_ec,

I would have assumed that B_e = beta_e + S_e + I_e, and B_c = beta_c + S_c. But perhaps there's some simple algebraic reason (relating to the interaction?) that this simulation code works?

Good catch, thanks!!