Skip to content

Commit

Permalink
Merge branch 'feature/3299-chainset' of https://github.com/stan-dev/stan
Browse files Browse the repository at this point in the history
 into feature/3299-chainset
  • Loading branch information
mitzimorris committed Oct 15, 2024
2 parents 4b4b8b0 + 345fcea commit 427cf70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stan/mcmc/chainset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ class chainset {
*/
double mcse_mean(const int index) const {
if (num_samples() < 4
|| !stan::analyze::is_finite_and_varies(samples(index)))
|| !stan::analyze::is_finite_and_varies(samples(index)))
return std::numeric_limits<double>::quiet_NaN();
double ess = analyze::ess(samples(index));
return sd(index) / std::sqrt(ess);
Expand Down Expand Up @@ -449,7 +449,7 @@ class chainset {
*/
double mcse_sd(const int index) const {
if (num_samples() < 4
|| !stan::analyze::is_finite_and_varies(samples(index)))
|| !stan::analyze::is_finite_and_varies(samples(index)))
return std::numeric_limits<double>::quiet_NaN();
Eigen::MatrixXd s = samples(index);
Eigen::MatrixXd s2 = s.array().square();
Expand Down

0 comments on commit 427cf70

Please sign in to comment.