LikelihoodRatioTest

class sherpa.sim.simulate.LikelihoodRatioTest[source] [edit on github]

Bases: NoNewAttributesAfterInit

Likelihood Ratio Test.

The likelihood ratio [1], D, is defined as:

          (   likelihood for null model )
D = -2 ln -----------------------------------
          ( likelihood for alternative model)

  = -2 ln(likelihood for null model) +
     2 ln(likelihood for alternative model)

Since the Cash and C fit statistics are defined as -2 ln(likelihood), the equation reduces to:

D = statistic for null model -
    statistic for alternative model

Changed in version 4.17.0: The run method can now be called when using the WStat statistic.

References

Methods Summary

calculate(nullfit, altfit, proposal, ...[, rng])

run(fit, null_comp, alt_comp[, conv_mdl, ...])

Methods Documentation

static calculate(nullfit, altfit, proposal, null_vals, alt_vals, rng=None)[source] [edit on github]
static run(fit, null_comp, alt_comp, conv_mdl=None, stat=None, method=None, niter=500, numcores=None, rng=None)[source] [edit on github]