| AHELP for CIAO 4.4 Sherpa v2 | set_stat |
Context: statistics |
Synopsis
Set the statistical method
Syntax
set_stat( stat )
Description
The set_stat command sets the statistical method to be used in fitting.
- stat - the statistical method
Available statistics are returned by the list_stats command ("ahelp list_stats"). There is a help file for each statistical method, e.g. ("ahelp chi2constvar").
| Statistic | Description |
|---|---|
| leastsq | least-squares fitting (chi^2 without statistical errors) |
| chi2constvar | chi^2 with constant variance computed from the counts data |
| chi2modvar | chi^2 with model amplitude variance |
| chi2gehrels | chi^2 with gehrels method (default) |
| chi2datavar | chi^2 with data variance |
| chi2xspecvar | chi^2 with data variance (XSPEC-style, variance = 1.0 if data less than or equal to 0.0). |
| cstat | CStat - A maximum likelihood function (XSPEC implementation of Cash) |
| cash | Cash - A maximum likelihood function |
Example 1
sherpa> set_stat( "chi2modvar" )
Set the statistic to "chi2modvar", chi^2 with model amplitude variance.
Example 2
sherpa> set_stat( "cash" )
Set the statistic to "cash", a maximum likelihood function.
Bugs
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.
See Also
- confidence
- set_conf_opt, set_covar_opt, set_proj_opt
- data
- set_areascal, set_arf, set_backscal, set_bkg, set_coord, set_counts, set_data, set_exposure, set_grouping, set_quality, set_rmf, set_staterror, set_syserror
- filtering
- set_filter
- info
- list_stats
- methods
- set_iter_method, set_iter_method_opt, set_method, set_method_opt
- modeling
- get_par, set_bkg_model, set_full_model, set_par, set_pileup_model, set_source, set_xsabund, set_xscosmo, set_xsxsect, set_xsxset
- statistics
- cash, chi2constvar, chi2datavar, chi2gehrels, chi2modvar, chi2xspecvar, chisquare, cstat, get_prior, leastsq, list_priors, set_prior, set_sampler, set_sampler_opt
- utilities
- set_analysis, set_default_id
- visualization
- image_setregion

![[Sherpa Logo]](../imgs/sherpa_logo_navbar.gif)