About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2008

URL: http://cxc.harvard.edu/sherpa4.1/set_stat.sl.html
AHELP for Sherpa 4.1

set_stat

Context: sl.sherpa

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.

Last modified: December 2008



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