Currently we are applying a penalty on log_fdev to ensure they sum to zero. An alternative to this might be to define the rec_devs using a K-simplex transformation. A K-simplex is defined as a vector of values that sum to 1. For a full description of simplex math see the STAN user manual (http://mc-stan.org/documentation/).
I've not used this approach before outside of STAN but reckon it could be a good way to go for rec_devs.
Currently we are applying a penalty on log_fdev to ensure they sum to zero. An alternative to this might be to define the rec_devs using a K-simplex transformation. A K-simplex is defined as a vector of values that sum to 1. For a full description of simplex math see the STAN user manual (http://mc-stan.org/documentation/).
I've not used this approach before outside of STAN but reckon it could be a good way to go for rec_devs.