-
Notifications
You must be signed in to change notification settings - Fork 282
Description
Current lines 103-104 of run.meta.analysis.R:
prior_variances[names(trait_average), ] <- 0.001 * trait_average ^ 2
prior_variances["seedling_mortality", 1] <- 1
@infotroph in a comment on #3278:
Would it be possible to add a few comments here explaining (1) where the constants 0.001 and 1 come from, and (2) why seedling mortality gets special handling and whether that's a hack or a principled design choice?
On scrolling down further I see this is pre-existing code moved up from run.meta.analysis.pft, so maybe these explanations are lost to time...
Yeah, this is pre-existing code. The oldest git blame gets me is here:
...but I'm almost certain this logic predates that, which looks more like refactoring than development.
The more correct thing to do here is probably (1) remove the
seedling_mortalityhard-coded value altogether and replace it with a global default prior of some kind in the database; (2) pass the0.001as an (optional) argument called something likedefault_prior_variance_fractionwith 0.001 as the default value.