] = cov;
  Sigma[2, 1] = cov;      Sigma[2, 2] = var2;
}
model {
  y ~ multi_normal(mu, Sigma);
}</code></pre>
<p>The variances are defined as data in variables <code>var1</code> and
<code>var2</code>, whereas the covariance is defined as a parameter in
variable <code>cov</code>. The <span class="math inline">\(2 \times 2\)</span> covariance matrix <code>Sigma</code>
is defined as a transformed parameter, with the variances assigned to
the two diagonal elements and the covariance to the two off-diagonal
ele