Hi,

I'm trying to figure out how to convert, in the basic_estimators bernoulli 
example, theta (and the gradient) in the bernoulli_samples.csv and 
bernoulli_diagnostics.csv files  as produced by:

run(`./bernoulli sample random seed=1 data file=bernoulli.data.R output 
file=bernoulli_samples.csv diagnostic_file=bernoulli_diagnostics.csv`).

Thanks a lot,
Rob J. Goedman
[email protected]

Warmup took (0.011) seconds, 0.011 seconds total
Sampling took (0.034) seconds, 0.034 seconds total

                Mean     MCSE   StdDev    5%   50%   95%  N_Eff  N_Eff/s    
R_hat
lp__            -8.8  3.5e-02  7.4e-01   -10  -8.5  -8.3    441    13124  
1.0e+00
accept_stat__   0.90  4.7e-03  1.5e-01  0.58  0.96   1.0   1000    29734  
1.0e+00
stepsize__       1.1  6.3e-15  4.4e-15   1.1   1.1   1.1   0.50       15  
1.0e+00
treedepth__      1.7  1.6e-02  4.7e-01   1.0   2.0   2.0    920    27347  
1.0e+00
n_leapfrog__     2.3  3.1e-02  9.5e-01   1.0   3.0   3.0    920    27347  
1.0e+00
n_divergent__   0.00  0.0e+00  0.0e+00  0.00  0.00  0.00   1000    29734      
nan
theta           0.50  6.6e-03  1.4e-01  0.26  0.51  0.72    440    13068  
1.0e+00

Samples were drawn using hmc with nuts.
For each parameter, N_Eff is a crude measure of effective sample size,
and R_hat is the potential scale reduction factor on split chains (at 
convergence, R_hat=1).

----------------------------------------------------------------------------------------

Inference for Stan model: bernoulli_model
1 chains: each with iter=(1000); warmup=(0); thin=(1); 1000 iterations saved.

Warmup took (0.011) seconds, 0.011 seconds total
Sampling took (0.034) seconds, 0.034 seconds total

                    Mean     MCSE   StdDev    5%       50%   95%  N_Eff  
N_Eff/s    R_hat
lp__            -8.8e+00  3.5e-02  7.4e-01   -10  -8.5e+00  -8.3    441    
13124  1.0e+00
accept_stat__    9.0e-01  4.7e-03  1.5e-01  0.58   9.6e-01   1.0   1000    
29734  1.0e+00
stepsize__       1.1e+00  6.3e-15  4.4e-15   1.1   1.1e+00   1.1   0.50       
15  1.0e+00
treedepth__      1.7e+00  1.6e-02  4.7e-01   1.0   2.0e+00   2.0    920    
27347  1.0e+00
n_leapfrog__     2.3e+00  3.1e-02  9.5e-01   1.0   3.0e+00   3.0    920    
27347  1.0e+00
n_divergent__    0.0e+00  0.0e+00  0.0e+00  0.00   0.0e+00  0.00   1000    
29734      nan
theta           -4.0e-03  2.9e-02  6.0e-01  -1.1   2.3e-02  0.96    441    
13127  1.0e+00
p_theta         -1.7e-02  5.0e-02  1.6e+00  -2.6  -8.4e-02   2.6   1000    
29734  1.0e+00
g_theta         -4.5e-04  7.9e-02  1.7e+00  -2.9   6.9e-02   2.7    440    
13068  1.0e+00

Samples were drawn using hmc with nuts.
For each parameter, N_Eff is a crude measure of effective sample size,
and R_hat is the potential scale reduction factor on split chains (at 
convergence, R_hat=1).



 method = optimize
   optimize

...


initial log joint probability = -8.16567
    Iter      log prob        ||dx||      ||grad||       alpha  # evals  Notes 
       5      -6.93147   2.54998e-05   2.50688e-12           1        8   
Optimization terminated normally: 
  Convergence detected: change in objective function was below tolerance
elapsed time: 0.003743127 seconds (2416 bytes allocated)

julia> log(0.5)
-0.6931471805599453

julia> 10*log(0.5)
-6.931471805599453

Reply via email to