Method

NumCosmoMathMSetCatalogcalc_ci_interp

Declaration [src]

NcmMatrix*
ncm_mset_catalog_calc_ci_interp (
  NcmMSetCatalog* mcat,
  NcmMSetFunc* func,
  NcmVector* x_v,
  GArray* p_val,
  guint nodes,
  NcmFitRunMsgs mtype
)

Description [src]

Calculates the mean and the confidence interval (CI) for the value of func for each p-value in p_val. It stores the results in a NcmMatrix, where the first element contains the mean and the following contain the lower and upper bounds for each p-value in p_val.

This function creates an approximation of the distribution for each value of the function func and calculates the quantile from this approximation.

The NcmMSetFunc func must be of dimension one.

Example:

If p_val contains two values ($1\sigma$) 0.6827 and ($\sigma$) 0.9545, the first element will contain the mean, the second and third, the lower and upper bounds, respectively. Then, the fourth and fifth elements the lower and upper bounds of $2\sigma$ CI.

Parameters

func

Type: NcmMSetFunc

A NcmMSetFunc of type n-n.

The data is owned by the caller of the method.
x_v

Type: NcmVector

NcmVector of arguments of func.

The data is owned by the caller of the method.
p_val

Type: An array of double

P-values for the confidence intervals.

The data is owned by the caller of the method.
nodes

Type: guint

Number of nodes in the distribution approximations.

mtype

Type: NcmFitRunMsgs

NcmFitRunMsgs log level.

Return value

Type: NcmMatrix

A NcmMatrix containing the mean and lower/upper bound of the confidence interval for func.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.