naginterfaces.library.correg.coeffs_zero_subset¶
- naginterfaces.library.correg.coeffs_zero_subset(x, kvar)[source]¶
coeffs_zero_subset
computes means and standard deviations, sums of squares and cross-products about zero, and correlation-like coefficients for selected variables.For full information please refer to the NAG Library document for g02bk
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/g02/g02bkf.html
- Parameters
- xfloat, array-like, shape
must be set to , the value of the th observation on the th variable, for , for .
- kvarint, array-like, shape
must be set to the column number in of the th variable for which information is required, for .
- Returns
- xbarfloat, ndarray, shape
The mean value, , of the variable specified in , for .
- stdfloat, ndarray, shape
The standard deviation, , of the variable specified in , for .
- sspzfloat, ndarray, shape
is the cross-product about zero, , for the variables specified in and , for , for .
- rzfloat, ndarray, shape
is the correlation-like coefficient, , between the variables specified in and , for , for .
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, and .
Constraint: and .
- (errno )
On entry, , and .
Constraint: .
- 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, together with the subset of these variables, , for which information is required.
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.