Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: November 2016

URL: http://cxc.harvard.edu/sherpa/ahelp/set_stat.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.9 Sherpa v1

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"), and there is a help file for each statistical method, e.g. ("ahelp chi2constvar").

Statistics built into Sherpa

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).
cash Cash - A maximum likelihood function
cstat CStat - A maximum likelihood function (XSPEC implementation of Cash); the background must be fitted
wstat WStat - A maximum likelihood function (XSPEC implementation of Cash) with support for subtracting the background

The load_user_stat command can be used to create new statistics that can be selected by set_stat.

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, wstat
utilities
set_analysis, set_default_id
visualization
image_setregion

Last modified: November 2016
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.