DanOvando / zissou

Repository for causal effect ot MLPA
0 stars 1 forks source link

STAN moonshot #28

Closed DanOvando closed 6 years ago

DanOvando commented 6 years ago

Give the top-to-bottom STAN model one last shot.

DanOvando commented 6 years ago

The broad issue: the "joint" model estimating all the abundances and passing that to the DiD would take a lifetime to converge, which seems odd since each individual species seems to converge in a reasonable amount of time. So, I would think that doing all of them would be more or less a sum of the individual times. The possibilities then: the data are so messy and your model so poorly specified that it just won't work or there's something about trying to do them together that throws a problem for STAN, e.g. it's trying to estimate a covariance matrix across a whole bunch of parameters a la VAST. So, you don't want to dedicate too much time to this, but let's give it more or less 1 day to see if you can make substantial progress. At the moment, two species takes about 6 minutes for just the delta-GLM part. If you can get that down substantially, you'll exert more energy.

DanOvando commented 6 years ago

Whoops, you were doing the clustering of the standard errors wrong. You were clustering each of the environmental betas by species, where instead you just need to say that each group of covariates comes from a central distribution. i.e. all the temperature terms come from a distribution ~N(0,sigma), all the intercepts ~N(0,sigma), etc, instead of clustering sigmas by species. You can do sigmas by species for homoskediasticity if you want, but that's another problem. But, the only need to go random effect on this is if you want to include the intercepts by species, otherwise you can just add them in as fixed effects