Skip to main content

Come analyze HEASARC, IRSA, and MAST data in the cloud! The Fornax Initiative is now welcoming all interested beta users.

Xspec Home Page

Common pitfalls

  • Forgetting bayes on. Setting prior expressions with bayes <par> <type> declares them, but the samplers do not consult them until inference is switched on.

  • Improper priors with nested sampling. A flat prior on a parameter that ranges over many decades produces a prior with effectively no normalization. nest run will refuse to start; the fix is to set jeffreys on the parameter and push the hard lower limit above zero with newpar.

  • Stale fit covariance. For MH the proposal covariance is taken from the current fit. If the fit converged to a basin far from the posterior mode of interest — for example because of “temporarily frozen due to zero norm” parameters — the proposal will reject almost everything. Refit, or supply a diagonal proposal with proposal gaussian deltas.

  • Running HMC without warm-up. The step size and mass matrix must adapt before the production samples are taken; running with hmc warmup $\ll 200$ on a non-trivial model guarantees divergences. The default of $1000$ warm-up iterations is sensible for most problems.

  • Comparing chains of unequal length. Rubin–Gelman assumes the chains being compared have run for the same number of iterations. Pad the shorter chain or discard the excess from the longer one before invoking the statistic.

  • Reporting frequentist confidence intervals from Bayesian samples. Posterior credible intervals are not frequentist confidence intervals, and they should not be reported as such. Be explicit in the text about which kind of interval is quoted.