Open bwiernik opened 5 years ago
@pitakakariki Do you think this PR might be merged?
Hi @bwiernik, sorry for not responding earlier. I think from (quite fuzzy) memory when the pull request came in there were unrelated problems with the CI scripts not running. I meant to check back but it slipped my mind.
As you might notice from the large backlog of issues I can't really describe simr as being in "active development", but I am hoping a new role next year will give me a little more time. So I hope to get to your pull request at some point, but can't make any promises as to a timeframe.
I am a little worried that this small change might break a lot of things. That's on me of course - there really should be unit tests written to catch those problems. Using the object rather than the formula is the obvious choice, and I know I went with formula for a reason - and I'm a little worried that I can't quite remember what that was (which means I'm not sure what I'm worried might break). My best guess at the moment was that earlier versions of lme4 didn't allow me to change parameters if I used simulate.merMod
.
If control parameters are set in the
merMod
object (e.g., to disable checks when using workarounds to freely estimate residual variances across groups; cf. https://stats.stackexchange.com/questions/255546/test-homogeneity-in-lmer-models), usingformula(object)
loses these control parameters.It doesn't appear to be possible to pass a
control
argument tosimulate
. Usingobject
rather thanformula(object)
indoSim.merMod
yields the same results, while also preserving anycontrol
arguments set in the originalobject
model.