cdfFnc

Purpose

Computes the cumulative distribution function of the noncentral F distribution.

Format

p = cdfFnc(x, df_n, df_d, nonc)
Parameters:
  • x (NxK matrix) – Values at which to evaluate the cdf of the noncentral F distribution. \(x > 0\).
  • df_n (LxM matrix) – ExE conformable with x. Degrees of freedom of numerator, \(df_n > 0\).
  • df_d (PxQ matrix) – ExE conformable with x and df_n. Degrees of freedom of denominator, \(df_d > 0\).
  • nonc (RxS matrix) – ExE conformable with x. The noncentrality parameter. This is the square root of the noncentrality parameter that sometimes goes under the symbol \(\lambda\). \(nonc > 0\).
Returns:

p (max(N,L,P,R) by max(K,M,Q,S) matrix) – Each element in p is the noncentral F distribution cdf value evaluated at the corresponding element in x.

Examples

/*
** Computing the parameters
*/
// Number of observations
n_obs = 100;

// Number of variables
n_vars = 5;

// Degrees of freedom
df_n = n_vars;
df_d = n_obs - n_vars - 1;

// Value to calculate p_value at
f_stat = 2.4;

// Non-centrality parameter
nonc = 2;

// Call cdfFnc
p = cdfFnc(f_stat, df_n, df_d, nonc);
print p;

will return:

0.7468

Remarks

For invalid inputs, cdfFnc() will return a scalar error code which, when its value is assessed by function scalerr(), corresponds to the invalid input. If the first input is out of range, scalerr() will return a 1; if the second is out of range, scalerr() will return a 2; etc.

See also

cdfTnc(), cdfChinc()