Skip to content

Instantly share code, notes, and snippets.

@JakeJing
Last active May 9, 2022 17:13
Show Gist options
  • Save JakeJing/f7b18a377a606bb8833ef768efb24af4 to your computer and use it in GitHub Desktop.
Save JakeJing/f7b18a377a606bb8833ef768efb24af4 to your computer and use it in GitHub Desktop.
data {
int N; // number of observations
array[N] corr_matrix[2] y; // A n-element arrary of observed correlation matrix [N, 2, 2]
}
parameters {
real<lower=0> eta;
}
model {
for (i in 1 : N) {
y[i, : , : ] ~ lkj_corr(eta); // y[i,] and y[i, ,] should also be fine
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment