SE column in print.stanfit with par =

55 views
Skip to first unread message

Larry Hunsicker

unread,
Jun 13, 2015, 6:17:06 PM6/13/15
to stan-...@googlegroups.com
Greetings again, list members.

Neophyte Hunsicker continues to try to understand STAN, and my questions now refer to the printout when i submit:

print(blocker_fit, "d", digits = 3), I get:

Inference for Stan model: blocker.
4 chains, each with iter=2000; warmup=1000; thin=1; 
post-warmup draws per chain=1000, total post-warmup draws=4000.

    mean se_mean    sd   2.5%    25%    50%    75%  97.5% n_eff  Rhat
d -0.257   0.002 0.061 -0.376 -0.296 -0.259 -0.217 -0.135   665 1.003

Samples were drawn using NUTS(diag_e) at Fri Jun 12 15:45:41 2015.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

Two questions:

I think that the mean and sd for the parameter "d" are what I need. "d" is a scalar, not a vector. What does the "se_mean" measure? Is this just a value that is routinely returned and is not meaningful for estimation of a scalar?

I do understand that n_eff is less than the 4000 draws because the draws aren't independent. How is this number estimated? Maybe you can just point me to where in Gelman et al, edition 3, that this is explained.

Many thanks in advance for your help.

Larry Hunsicker
 



Michael Betancourt

unread,
Jun 13, 2015, 6:54:36 PM6/13/15
to stan-...@googlegroups.com
>>
>> I think that the mean and sd for the parameter "d" are what I need. "d" is a scalar, not a vector. What does the "se_mean" measure? Is this just a value that is routinely returned and is not meaningful for estimation of a scalar?

“se_mean” refers to the Markov Chain Monte Carlo Standard Error, which quantifies
the error in the estimate of the mean assuming certain regularity conditions between
your posterior and the HMC sampler. Under those conditions it is given by

se_mean[f] = sqrt{ Var[f] / n_eff[f] }

In practice we estimate Var[f] using the MCMC samples.

>> I do understand that n_eff is less than the 4000 draws because the draws aren't independent. How is this number estimated? Maybe you can just point me to where in Gelman et al, edition 3, that this is explained.

See Section 54.4 in the Stan manual.

Larry Hunsicker

unread,
Jun 13, 2015, 8:40:34 PM6/13/15
to stan-...@googlegroups.com
>> “se_mean” refers to the Markov Chain Monte Carlo Standard Error, which quantifies
the error in the estimate of the mean

I think that I understand you.  sd refers to the uncertainty of d "in the real world" given the priors and the data.  se_mean refers to the uncertainty in the estimate of this mean due to the fact that the number is generated by a quasirandom process.  If I understand this correctly, then the important thing for interpretation is that the size of se_mean is small compared with the size of sd.  Is that correct?

I found the location in the STAN manual for computation of effective sample size.  I have to digest it more thoroughly, but as I suspected, the adjustment is related to t he autocorrolation of the successive samples.

Thanks for your help.


Andrew Gelman

unread,
Jun 13, 2015, 9:28:10 PM6/13/15
to stan-...@googlegroups.com
Yes.
--
You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages