ContingencyTable Constructor

Definition

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

ContingencyTable(Matrix<Double>) Constructs a new contingency table object from counts stored in a matrix.
ContingencyTable(ICategoricalVector, ICategoricalVector) Constructs a new contingency table for the specified variables.
ContingencyTable(ICategoricalVector, ICategoricalVector, Vector<Double>) Constructs a new contingency table for the specified variables.
ContingencyTable(Matrix<Double>, IIndex, IIndex) Constructs a new contingency table object from counts stored in a matrix.

ContingencyTable(Matrix<Double>)

Constructs a new contingency table object from counts stored in a matrix.
C#
public ContingencyTable(
	Matrix<double> counts
)

Parameters

counts  Matrix<Double>
A matrix that contains the cell counts.

Exceptions

ArgumentNullException

counts is null.

ArgumentException

One or more elements of counts is not a finite positive number.

ContingencyTable(ICategoricalVector, ICategoricalVector)

Constructs a new contingency table for the specified variables.
C#
public ContingencyTable(
	ICategoricalVector rowVariable,
	ICategoricalVector columnVariable
)

Parameters

rowVariable  ICategoricalVector
A ICategoricalVector that specifies the categories along the rows of the table.
columnVariable  ICategoricalVector
A ICategoricalVector that specifies the categories along the rows of the table.

Exceptions

ArgumentNullException

rowVariable is null.

-or-

columnVariable is null.

DimensionMismatchException

The length of rowVariable does not equal the length of columnVariable.

ContingencyTable(ICategoricalVector, ICategoricalVector, Vector<Double>)

Constructs a new contingency table for the specified variables.
C#
public ContingencyTable(
	ICategoricalVector rowVariable,
	ICategoricalVector columnVariable,
	Vector<double> countVariable
)

Parameters

rowVariable  ICategoricalVector
A ICategoricalVector that specifies the categories along the rows of the table.
columnVariable  ICategoricalVector
A ICategoricalVector that specifies the categories along the rows of the table.
countVariable  Vector<Double>
A numerical variable that contains the counts for the categories specified by rowVariable and columnVariable.

Exceptions

ArgumentNullException

rowVariable is null.

-or-

columnVariable is null.

DimensionMismatchException

The length of rowVariable does not equal the length of columnVariable.

ContingencyTable(Matrix<Double>, IIndex, IIndex)

Constructs a new contingency table object from counts stored in a matrix.
C#
public ContingencyTable(
	Matrix<double> counts,
	IIndex rowScale,
	IIndex columnScale
)

Parameters

counts  Matrix<Double>
A matrix that contains the cell counts.
rowScale  IIndex
The categorical scale that contains the categories corresponding to the rows in the contingency table.
columnScale  IIndex
The categorical scale that contains the categories corresponding to the rows in the contingency table.

Exceptions

ArgumentNullException

counts is null.

ArgumentException

One or more elements of counts is not a finite positive number.

See Also