Module function to estimate errors for an array of data
Array_Type compute_errors(Array_Type)
Error Return Value: NULL
Argument:
(1) Array of values of type Float_Type or Double_Type
This function estimates the errors for each element of the input array
given Sherpa's current
STATISTIC setting.
(Note that these data need not have been input into Sherpa!)
Thus there is an
implicit assumption that the input array elements are counts. If the input
array elements are not counts, then one could, e.g.,
create a new S-Lang function to compute the errors properly.
This function is only
appropriate for use with data-based variances: chi gehrels,
chi dvar, and chi parent.
Note that currently, the input array cannot be of type
Integer_Type.
This will be fixed in a future version of the module. To check the
type of the array, use the S-Lang function _typeof:
sherpa> a = [5,3,9]
sherpa> _typeof(a)
Integer_Type
sherpa> compute_errors(a)
NULL
One can get around this error by explicitly typecasting the array:
sherpa> a = typecast(a,Double_Type)
sherpa> foo = compute_errors(a)
sherpa> print(foo)
3.39792
2.93649
4.1225
See the related function
compute_statistic.
- sherpa
-
berrors,
bsyserrors,
compute_statistic,
covariance,
errors,
ftest,
get_paramest,
get_paramestint,
get_paramestlim,
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
|