Skip to content

Commit

Permalink
fix stan model
Browse files Browse the repository at this point in the history
  • Loading branch information
OriolAbril committed Dec 14, 2023
1 parent 22c0dcb commit e15e79f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arviz/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,18 +432,18 @@ def pystan_noncentered_schools(data, draws, chains):
schools_code = """
data {
int<lower=0> J;
real y[J];
real<lower=0> sigma[J];
array[J] real y;
array[J] real<lower=0> sigma;
}
parameters {
real mu;
real<lower=0> tau;
real eta[J];
array[J] real eta;
}
transformed parameters {
real theta[J];
array[J] real theta;
for (j in 1:J)
theta[j] = mu + tau * eta[j];
}
Expand All @@ -456,8 +456,8 @@ def pystan_noncentered_schools(data, draws, chains):
}
generated quantities {
vector[J] log_lik;
vector[J] y_hat;
array[J] real log_lik;
array[J] real y_hat;
for (j in 1:J) {
log_lik[j] = normal_lpdf(y[j] | theta[j], sigma[j]);
y_hat[j] = normal_rng(theta[j], sigma[j]);
Expand Down

0 comments on commit e15e79f

Please sign in to comment.