Stan. Using target += syntax
The syntax target += u; adds u to the target log density. The target density is the density from which the sampler samples and it needs to be equal to the joint density of all the parameters given the data up to a constant (which is usually achieved via Bayes’s rule by coding as the … Read more