PartialCovariances Constructor (Int32, Double, Int32) |
Creates a PartialCovariances object from a covariance or correleation matrix
with a mix of dependent and independent variables.
Namespace: Imsl.StatAssembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax public PartialCovariances(
int[] xIndices,
double[,] sigma,
int df
)
Public Sub New (
xIndices As Integer(),
sigma As Double(,),
df As Integer
)
public:
PartialCovariances(
array<int>^ xIndices,
array<double,2>^ sigma,
int df
)
new :
xIndices : int[] *
sigma : float[,] *
df : int -> PartialCovariances
Parameters
- xIndices
- Type: SystemInt32
is an array containing values indicating the status of
the variable.
If the i-th entry is 0 then the i-th column of the matrix contains a dependent variable.
If the i-th entry is positive then the i-th column of the matrix contains an independent variable.
If the i-th entry is negative then the i-th column of the matrix is not used in the analysis.
- sigma
- Type: SystemDouble
is a correlation or covariance matrix.
The number of rows and columns in sigma must equal the length
of the array xIndices.
The matrix must always be symmetric, positive semidefinite.
- df
- Type: SystemInt32
is an int indicating the number of degrees of freedom
associated with the input matrix. If the number of degrees of freedom in
the matrix varies from element to element, then a conservative choice
for df is the minimum degrees of freedom for all elements in the matrix.
The value of df must be at least one.
Exceptions Exception | Condition |
---|
InvalidMatrixException |
is thrown if a computed correlation is greater than one for some pair of variables.
|
InvalidPartialCorrelationException |
is thrown if a computed partial correlation is greater than one for some pair of variables.
The input matrix to the constructor was not positive semidefinite.
|
See Also