simr icon indicating copy to clipboard operation
simr copied to clipboard

glmmTMB support?

Open pitakakariki opened this issue 7 years ago • 9 comments

Tricky bits probably:

  • simulate with modified parameter values
  • use.u in simulate

pitakakariki avatar May 03 '17 02:05 pitakakariki

Hi, is there support for glmmTMB and powerSim() and powerCurve() at this point in time? Thanks!

RmeanyMAN avatar Nov 05 '18 11:11 RmeanyMAN

No support yet, but I've had another look and it might not be as hard as I thought. I'm unlikely to find the time for a while though.

pitakakariki avatar Nov 06 '18 21:11 pitakakariki

simulate.glmmTMB lives in methods.R.

object$obj$simulate(par = object$fit$parfull)$yobs

That goes back to TMB I think, but doSim should be able to pass modified parameters.

pitakakariki avatar Nov 06 '18 21:11 pitakakariki

Hi @pitakakariki - wondering if you'd had chance to look at including this yet, or if you know of another method for glmmTMB?

rosemckeon avatar Oct 14 '19 11:10 rosemckeon

Not much progress on this unfortunately. Simplest way to do it might be to tweak your glmmTMB model by hand (i.e. edit the values in x$fit$parfull) and write functions to pass to fit and test.

pitakakariki avatar Oct 20 '19 08:10 pitakakariki

ok, thanks @pitakakariki - maybe I'll take a peek at that.

rosemckeon avatar Oct 24 '19 10:10 rosemckeon

I'd be willing to help push this forward if you like. We really should add newparams and newdata to simulate.glmmTMB ...

bbolker avatar Apr 24 '24 20:04 bbolker

If newparams and newdata are added to simulate.glmmTMB that's most of the work done I reckon. That might finally encourage me to add the appropriate connectors at this end.

pitakakariki avatar Apr 25 '24 09:04 pitakakariki

Actually, these are there already! There are some outstanding issues (https://github.com/glmmTMB/glmmTMB/issues/953) but you could give it a spin and see how it goes ...

bbolker avatar Apr 26 '24 00:04 bbolker