FriedmanTest Constructor

Definition

Namespace: Numerics.NET.Statistics.Tests
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.7.0

Overload List

FriedmanTest(Matrix<Double>) Constructs a new FriedmanTest for the specified matrix of repeated-measures data.
FriedmanTest(Vector<Double>[]) Constructs a new FriedmanTest for the specified treatment vectors.
FriedmanTest(Vector<Double>, ICategoricalVector, ICategoricalVector) Constructs a new FriedmanTest for long-form repeated-measures data.

FriedmanTest(Matrix<Double>)

Constructs a new FriedmanTest for the specified matrix of repeated-measures data.
C#
public FriedmanTest(
	Matrix<double> data
)

Parameters

data  Matrix<Double>
A matrix whose rows correspond to matched blocks or subjects and whose columns correspond to treatments or conditions.

Remarks

Rows are interpreted as blocks, and columns are interpreted as treatments.

The matrix must contain at least two rows and at least three columns.

Exceptions

ArgumentNullExceptiondata is null.
ArgumentException

data has fewer than two rows.

-or-

data has fewer than three columns.

FriedmanTest(Vector<Double>[])

Constructs a new FriedmanTest for the specified treatment vectors.
C#
public FriedmanTest(
	params Vector<double>[] treatments
)

Parameters

treatments  Vector<Double>[]
A sequence of vectors containing the treatment values. Each vector represents one treatment, and corresponding indexes across vectors represent the same block or subject.

Remarks

The Friedman test requires at least three treatment vectors.

All treatment vectors must be non-null, have equal length, and contain at least two blocks.

Exceptions

ArgumentNullException

treatments is null.

-or-

One of the treatment vectors is null.

ArgumentException

Fewer than three treatments were supplied.

-or-

Fewer than two blocks were supplied.

DimensionMismatchExceptionThe treatment vectors do not all have the same length.

FriedmanTest(Vector<Double>, ICategoricalVector, ICategoricalVector)

Constructs a new FriedmanTest for long-form repeated-measures data.
C#
public FriedmanTest(
	Vector<double> values,
	ICategoricalVector treatments,
	ICategoricalVector blocks
)

Parameters

values  Vector<Double>
A vector containing the observed values.
treatments  ICategoricalVector
A categorical vector that identifies the treatment or condition for each value.
blocks  ICategoricalVector
A categorical vector that identifies the matched block or subject for each value.

Remarks

The three inputs must have equal length.

This overload requires a complete balanced design with exactly one observation for every treatment/block cell.

Exceptions

ArgumentNullException

values is null.

-or-

treatments is null.

-or-

blocks is null.

DimensionMismatchException

The inputs do not all have the same length.

ArgumentException

Fewer than three treatments were supplied.

-or-

Fewer than two blocks were supplied.

InvalidOperationException

The long-form data contains missing treatment or block levels.

-or-

The long-form data contains duplicate treatment/block cells.

-or-

The long-form data is missing one or more treatment/block cells.

See Also