naginterfaces.library.correg.coeffs_zero_miss_case¶
- naginterfaces.library.correg.coeffs_zero_miss_case(x, miss, xmiss)[source]¶
coeffs_zero_miss_case
computes means and standard deviations of variables, sums of squares and cross-products about zero, and correlation-like coefficients for a set of data omitting completely any cases with a missing observation for any variable.For full information please refer to the NAG Library document for g02be
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/g02/g02bef.html
- Parameters
- xfloat, array-like, shape
must be set to , the value of the th observation on the th variable, for , for .
- missint, array-like, shape
must be set equal to if a missing value, , is to be specified for the th variable in the array , or set equal to otherwise. Values of must be given for all variables in the array .
- xmissfloat, array-like, shape
must be set to the missing value, , to be associated with the th variable in the array , for those variables for which missing values are specified by means of the array (see Accuracy).
- Returns
- xbarfloat, ndarray, shape
The mean value, , of the th variable, for .
- stdfloat, ndarray, shape
The standard deviation, , of the th variable, for .
- sspzfloat, ndarray, shape
is the cross-product about zero, , for , for .
- rzfloat, ndarray, shape
is the correlation-like coefficient, , between the th and th variables, for , for .
- ncasesint
The number of cases actually used in the calculations (when cases involving missing values have been eliminated).
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
After observations with missing values were omitted, no cases remained.
- (errno )
After observations with missing values were omitted, only one case remained.
- Notes
No equivalent traditional C interface for this routine exists in the NAG Library.
The input data consists of observations for each of variables, given as an array
where is the th observation on the th variable. In addition, each of the variables may optionally have associated with it a value which is to be considered as representing a missing observation for that variable; the missing value for the th variable is denoted by . Missing values need not be specified for all variables.
Let if observation contains a missing value for any of those variables for which missing values have been declared, i.e., if for any for which an has been assigned (see also Accuracy); and otherwise, for .
The quantities calculated are:
Means:
Standard deviations:
Sums of squares and cross-products about zero:
Correlation-like coefficients:
If or is zero, is set to zero.