N_eff greater than number of iterations?

rstan

#1

Regarding the number of effective samples. Some n_eff samples are greater than 1000,
however the number of iterations is 1000. It’s not only one parameter and
occurs more than one time.
I’m not allowed to include the model, but it’s sure not model dependent.

  • Ubuntu 16.04.4
  • RSTAN 2.18.2

lm_waic <- sampling(smod
, data = stan_dat
, iter=1000
, chains=1
, seed = 123456
, pars = c( “G_LS”, “G_Ntrain”, “BIP_icp”, “log_lik”)
, include = TRUE
, control = list(
adapt_delta = 0.95,
max_treedepth = 12
))

options(max.print=1000000, width = 999)
sink(paste0(dump_file_base, ".diagnosis"))
print(summary(lm_waic))
sink()
$summary
                          mean      se_mean           sd          2.5%           25%           50%           75%         97.5%      n_eff      Rhat
...                          
log_lik[118]     -2.401865e+00 5.714134e-03  0.200363618 -2.823894e+00 -2.512551e+00 -2.392239e+00 -2.269193e+00 -2.026275e+00 1229.52375 0.9997910

#2

Hi! It means that the draws that Stan is producing are better than independent draws for those parameters. Sounds like a joke, but apparently Stan is actually that awesome. :) Here is the lengthy forum thread that discussed this.