This puzzle comes in three parts. There are some hints at the end. Part I: Constrained Parameter Definition Define a Stan program with a transformed matrix parameter d that is constrained to be a K by K distance matrix. Recall that a distance matrix must satisfy the definition of a metric for all i, j: […] The post Stan Puzzle 2: Distance Matrix Parameters appeared first on Statistical Modeling, Causal…