Genentech / jmpost

https://genentech.github.io/jmpost/
17 stars 4 forks source link

Set lower value to 0 #393

Closed gowerc closed 1 month ago

gowerc commented 2 months ago

Currently the lower limit for strictly positive Stan variables is set to sqrt(.Machine$double.eps).

Originally this was introduced as it helped reduce some of the warning messages as the sampler got too close to 0 however in hindsight I don't think this plays well with how Stan handles transformations and is resulting in more warning messages than it saves:

Chain 2 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: Chain 2 Exception: model_16febab5f833713ba62ed9b8d43f43d0_model_namespace::log_prob: lm_gsf_psi_phi[128] is 1.26452e-16, but must be greater than or equal to 0.000000 (in '/var/folders/hs/gyg0q5g94pz917klnkg7tnt80000gq/T/RtmpTopDEf/model-cd6672e0665e.stan', line 494, column 0 to line 497, column 67)

As such I think we should undo this change and set the lower limits back to 0