Hi There,

I am trying to get effective parameters for loo estimation, but encountered the following error:

log_lik_SHA <- extract_log_lik(fit_SHA, merge_chains = FALSE)

r_eff <- relative_eff(exp(log_lik_SHA))

Error in n_eff_vec/S : non-numeric argument to binary operator

I am using R version 3.6.3 (2020-02-29), loo version 2.2.0, on ubuntu system. The following is the stan code for a simple model.

Any suggestions on how to fix the above error? I used standard stan() to fit the model and trying to extract the log likelihood to feed to the loo package. I run the example â€śWell water in Bangladeshâ€ť on my system with no issues.

Thanks!

ytyimin

```
data {
int<lower=1> n; // number of observations
vector[n] y; // observations
real<lower=0> mu0;
real<lower=0> sigma02;
real<lower=0> alpha;
real<lower=0> beta;
}
parameters {
real mu; // mean
real<lower=0> sigma2; // variance
}
model {
target += inv_gamma_lpdf(sigma2 | alpha, beta);
target += normal_lpdf(mu | mu0, sqrt(sigma02));
target += normal_lpdf(y | mu, sqrt(sigma2));
}
generated quantities {
vector[n] log_lik;
for (i in 1:n) {
log_lik[i] = normal_lpdf(y[i] | mu, sqrt(sigma2));
}
}
```