Set the statistical method.
Changes the method used to evaluate the fit statistic, that is the numerical measure that determines how closely the model represents the data.
stat (str or sherpa.stats.Stat instance) – When a string, the name of the statistic (case is not important): see
list_stats()for supported values. Otherwise an instance of the statistic to use.
sherpa.utils.err.ArgumentErr – If the
statargument is not recognized.
Calculate the statistic value for a dataset.
Return the current statistic method.
List the supported fit statistics.
Create a user-defined statistic.
The available statistics include:
A maximum likelihood function .
Chi-squared statistic using the supplied error values.
Chi-squared with constant variance computed from the counts data.
Chi-squared with data variance. If the data has 0 counts then the error for that bin is 0.
Chi-squared with gehrels method . This is the default method.
Chi-squared with model amplitude variance.
Chi-squared with data variance to match XSPEC. Errors from zero-count channels (source or background) are ignored if the other channel (background or source) contains counts, or replaced by a minimum value (when both source or background are empty). It should not be used when a model is fit to the background rather than the background is subtracted from the data.
A maximum likelihood function (the XSPEC implementation of the Cash function) . This does not include support for including the background.
A maximum likelihood function which includes the background data as part of the fit (i.e. for when it is not being explicitly modelled) (the XSPEC implementation of the Cash function) .
The least-squares statisic (the error is not used in this statistic).