Johannes Buchner

Results 227 comments of Johannes Buchner

I believe the ideal solution would be if we were able to generate counts from the model, and then plot both predicted counts and observed counts on an area-corrected y-axis....

BXA does not have access to the counts information during the fit, the statistic is calculated by xspec.

If you have a idea or proof of concept how we could make a PPC-like plot work, it would be greatly appreciated. Reading the counts from the input file is...

Well, AIC is based on the maximum likelihood, and it is not Bayesian. I find it useful for empirical (ad-hoc) models, when model prior odds and parameter priors are difficult...

Lets refocus on the issue: how to fix visualisations for wstat/cstat. I don't know a way with wstat, because xspec does not have allow access to the estimated background count...

Can you check what Plot.addCommand('wdata foo') xspec.Plot('counts') writes to the file? Those columns are what is being plotted. (expecting 6 or 4 columns, depending on Plot.background). Is there a better...

Probably the code should be simplified (replacing the callback function with code duplication). Essentially what you need is: ``` for k, row in enumerate(analyser.posterior): analyser.set_parameters(values=row, transformations=analyser.transformations) # do something with...

Everything else in the code is just working around xspec weirdness

You can do posterior predictive checks. It is helpful to apply some binning in the prediction (not the fit), for clarity. Here is how to make such a plot: https://johannesbuchner.github.io/BXA/xspec-analysis.html#model-checking...

Another way to go about it is to look at some of the visualisations (e.g., Q-Q plot, posterior predictive check), and guess where the model could be improved, and fit...