sherpa> UNCERTAINTY [<dataset range> | ALLSETS] [ <arg_1> , ... ]
where <dataset range> = #, or more generally #:#,#:#,..., such that #
specifies a dataset number, and #:# represents an inclusive range of
datasets; one may specify multiple inclusive ranges by separating them
with commas. The default is to estimate limits using data from all
appropriate datasets.
The command-line arguments <arg_n> may be:
UNCERTAINTY Command Arguments
<sherpa_modelname>.{<paramname> | <#>} |
A specified model component parameter (e.g., GAUSS.pos). |
<modelname>.{<paramname> | <#>} |
A specified model component parameter (e.g., g.pos). |
The user may configure UNCERTAINTY via
the Sherpa state object structure unc.
The current values of the fields of this structure may be
displayed using the command print(sherpa.unc),
or using the more verbose Sherpa/S-Lang module
function list_unc().
The structure fields are:
unc Structure Fields
sigma |
Specifies the number of sigma
(i.e., the change in statistic).
|
eps |
The tolerance for sigma, influencing the numerical
accuracy of the errorbars. (Decreasing eps increases
errorbar accuracy.)
|
remin |
If in the course of computing the interval, a statistic value is
found that is less than the previous best-fit by more than
remin, a new fit will be started; after minimization,
UNCERTAINTY will run to completion.
|
Field values may be set using directly, e.g.,
sherpa> sherpa.unc.sigma = 2.6
NOTE: strict checking of value inputs is not done,
i.e., the user can errantly change arrays to scalars,
etc. To restore the default settings of the structure
at any time, use the Sherpa/S-Lang module function
restore_unc().
Confidence interval bounds are determined for each parameter in turn.
A given parameter's value is varied while the values of all the other
nominally thawed parameters are held fixed to their best-fit values.
This is a simplistic method of estimating confidence interval bounds
that gives truly accurate results only in special cases, as explained
below.
Because UNCERTAINTY estimates confidence
intervals for each parameter independently, the relationship between
UNCERTAINTY.sigma and the change in statistic value delta_S can be particularly simple:
sigma = the square root of delta_S for statistics sampled
from the chi-square distribution and for
the Cash statistic, and is approximately equal to
the square root of (2 * delta_S)
for fits based on the general log-likelihood (log(L)).
Confidence Intervals for the uncertainty command
68.3% | 1.0 | 1.00 | 0.50 |
90.0% | 1.6 | 2.71 | 1.36 |
95.5% | 2.0 | 4.00 | 2.00 |
99.0% | 2.6 | 6.63 | 3.32 |
99.7% | 3.0 | 9.00 | 4.50 |
An estimated confidence interval is accurate if and only if:
-
no correlations exist between the varied parameter and any of the
other nominally thawed parameters,
-
the chi-square or log(L) surface in parameter space is
approximately shaped like a multi-dimensional paraboloid, and
-
the best-fit point is sufficiently far from parameter space boundaries.
One may determine if these conditions hold, for example, by plotting
the fit statistic as a function of each parameter's values (the curve
should approximate a parabola) and by examining contour plots of the
fit statistics made by varying the values of two parameters at a time
(the contours should be elliptical, with principal axes aligned along
the parameter axes, and parameter space boundaries should be no closer
than approximately 3-sigma
from the best-fit point).
If the second and third conditions hold, but the first does not, then
the confidence intervals may be determined by using either COVARIANCE and PROJECTION.
If none of the conditions hold, then the output from
UNCERTAINTY
is meaningless except that it would give an idea of the scale of the
confidence intervals. To accurately determine the confidence
intervals, one would have to reparameterize the model, or use Monte
Carlo simulations or Bayesian methods.