Module functions to determine confidence intervals, and retrieve the parameter bounds.
Array_Type get_unc()
Array_Type get_proj()
Array_Type get_cov()
Error Return Value: NULL
These functions retrieve information from the most recent run of the
UNCERTAINTY or
run_unc,
PROJECTION or
run_proj, and
COVARIANCE or
run_cov
parameter estimation methods, respectively.
Each function returns an array of structures. The length of the
array is determined by the number of thawed parameters examined in
the most recent run of the parameter estimation method. Each structure
has five fields:
- name: the name of the parameter;
- val: its best-fit value;
- vlo: the lower bound for its confidence interval;
- vhi: the upper bound for its confidence interval;
- sigma: the value of the sigma parameter used to calculate vlo and vhi.
Fit a dataset; run covariance and retrieve the results:
sherpa> DATA example.pha
sherpa> SUBTRACT
sherpa> PARAMPROMPT OFF
sherpa> SOURCE = POW[p]
sherpa> FIT
...
sherpa> COVARIANCE
Computed for covariance.sigma = 1
--------------------------------------------------------
Parameter Name Best-Fit Lower Bound Upper Bound
--------------------------------------------------------
p.gamma 1.79469 -0.0811155 +0.0811155
p.ampl 0.000191983 -1.11109e-05 +1.11109e-05
sherpa> cov = get_cov
sherpa> print(length(cov))
2
sherpa> print(cov[0])
name = p.gamma
val = 1.79469
vlo = 1.71358
vhi = 1.87581
sigma = 1
Repeat the last example, but retrieve the uncertainty for one parameter:
sherpa> UNCERTAINTY p.ampl
Computed for uncertainty.sigma = 1
--------------------------------------------------------
Parameter Name Best-Fit Lower Bound Upper Bound
--------------------------------------------------------
p.ampl 0.000191983 -9.38415e-06 +9.4647e-06
sherpa> unc = get_unc()
sherpa> print(unc[0])
name = p.ampl
val = 0.000191983
vlo = 0.000182599
vhi = 0.000201448
sigma = 1
The structures returned by these functions contain an additional field, sigma, which is described above.
- sherpa
-
berrors,
bsyserrors,
compute_errors,
compute_statistic,
covariance,
errors,
ftest,
get_paramest,
get_paramestint,
get_paramestreg,
goodness,
interval-projection,
interval-uncertainty,
list_paramest,
mlr,
projection,
region-projection,
region-uncertainty,
restore_paramest,
run_paramest,
run_paramestint,
run_paramestlim,
run_paramestreg,
set_errors,
set_syserrors,
staterrors,
syserrors,
uncertainty
|