frites.stats.confidence_interval#
- frites.stats.confidence_interval(data, axis=0, cis=95, n_boots=200, random_state=None, fcn=None, skipna=True, verbose=None)[source]#
Compute the confidence interval of repeated measurements.
- Parameters:
- datanumpy:array_like
Numpy array (or xarray.DataArray) of data
- axis
python:int| 0 Axis along which to compute the confidence interval
- cis
python:int,python:list| 95 Integer or list of confidence levels to extract. This input also supports computing standard deviation (‘sd’) and / or standard error on the mean (‘sem’)
- n_boots
python:int| 200 Number of bootstraps to perform
- random_state
python:int|python:None Fix the random state of the machine (use it for reproducibility). If None, a random state is randomly assigned.
- fcn
function|python:None Summary statistics function. By default, the mean is used.
- skipnabool |
python:True Skip NaN when computing CI. By default NaN are skipped.
- Returns:
- cinumpy:array_like
Array of confidence intervals of shape (n_ci, 2, …) where n_ci refers to the number of desired confidence intervals (see input cis) and 2 refers to the lower and upper bounds.