diff --git a/examples/mcmc_regression_example.f90 b/examples/mcmc_regression_example.f90 index dfab106..98b98f0 100644 --- a/examples/mcmc_regression_example.f90 +++ b/examples/mcmc_regression_example.f90 @@ -58,22 +58,23 @@ program example ! Define an initial covariance matrix for the proposal sigma = 0.0d0 - sigma(1,1) = 1.0d-8 - sigma(2,2) = 1.0d-8 - sigma(3,3) = 1.0d-8 - sigma(4,4) = 1.0d-8 + sigma(1,1) = 1.0d-3 + sigma(2,2) = 1.0d-3 + sigma(3,3) = 1.0d-3 + sigma(4,4) = 1.0d-3 ! Define an initial guess - xi = [1.0d0, 0.5d0, -1.0d-1, 1.0d0] + ! xi = [1.0d0, 0.5d0, -1.0d-1, 1.0d0] + xi = 0.0d0 ! Initialize the proposal distribution object as well call solver%initialize_proposal(xi, sigma) ! Compute the fit - call solver%sample(xi, niter = 100000) + call solver%sample(xi, niter = 250000) ! Get the chain - disregard the initial portion of the chain for burn-in - chain = solver%get_chain(bin = 0.9d0) + chain = solver%get_chain(bin = 0.0d0) ! Extract the model - use the mean values mdl = [ & diff --git a/src/fstats_mcmc_fitting.f90 b/src/fstats_mcmc_fitting.f90 index 5ccb5d1..729a012 100644 --- a/src/fstats_mcmc_fitting.f90 +++ b/src/fstats_mcmc_fitting.f90 @@ -296,7 +296,8 @@ subroutine mr_on_success(this, iter, alpha, xc, xp, err) resid = this%m_f0 - this%y ! Update the variance - this%m_modelVariance = variance(resid) + ! this%m_modelVariance = variance(resid) + this%m_modelVariance = 1.0d-4 end subroutine ! ------------------------------------------------------------------------------