    Estimate parameter confidence intervals using the projection method.

projection(*args)
Alias: proj
id - int or str, optional
parameter - sherpa.models.parameter.Parameter, optional
model - sherpa.models.model.Model, optional

The `conf` function should be used instead of `proj` .

The `proj` command computes confidence interval bounds for the specified model parameters in the dataset. A given parameter's value is varied along a grid of values while the values of all the other thawed parameters are allowed to float to new best-fit values. The `get_proj` and `set_proj_opt`

commands can be used to configure the error analysis; an example being changing the 'sigma' field to 1.6 (i.e. 90%) from its default value of 1 . The output from the routine is displayed on screen, and the `get_proj_results` routine can be used to retrieve the results.

PARAMETERS

The parameters for this function are:

Parameter
Definition
id
The data set, or sets, that provides the data. If not given then all data sets with an associated model are used simultaneously.
parameter
The default is to calculate the confidence limits on all thawed parameters of the model, or models, for all the data sets. The evaluation can be restricted by listing the parameters to use. Note that each parameter should be given as a separate argument, rather than as a list. For example

proj(g1.ampl, g1.sigma) .
model
Select all the thawed parameters in the model.

Notes

The function does not follow the normal Python standards for parameter use, since it is designed for easy interactive use. When called with multiple ids or parameters values, the order is unimportant, since any argument that is not defined as a model parameter is assumed to be a data id.

The `proj` command is different to `covar` , in that all other thawed parameters are allowed to float to new best-fit values, instead of being fixed to the initial best-fit values. While

`proj` is more general (e.g. allowing the user to examine the parameter space away from the best-fit point), it is in the strictest sense no more accurate than `covar` for determining confidence intervals.

An estimated confidence interval is accurate if and only if:

the chi^2 or logL 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, and parameter space boundaries should be no closer than approximately 3 sigma from the best-fit point). The

`int_proj` and `reg_proj` commands may be used for this.

If either of the conditions given above does not hold, then the output from `proj` may be meaningless except to give an idea of the scale of the confidence intervals. To accurately determine the confidence intervals, one would have to reparameterize the model, use Monte Carlo simulations, or Bayesian methods.

As the calculation can be computer intensive, the default behavior is to use all available CPU cores to speed up the analysis. This can be changed be varying the numcores option - or setting parallel to False - either with

`set_proj_opt` or `get_proj` .

As `proj` estimates intervals for each parameter independently, the relationship between 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. The default setting is to calculate the one-sigma interval, which can be changed with the sigma option to `set_proj_opt` or `get_proj` .

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023