HypothesisTests.McNemarTest Method

Definition

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

Overload List

McNemarTest(ICategoricalVector, ICategoricalVector, Boolean) Returns a McNemar test whether proportions are the same in two samples.
McNemarTest<T>(IList<T>, IList<T>, Boolean) Returns a McNemar test whether proportions are the same in two samples.

McNemarTest(ICategoricalVector, ICategoricalVector, Boolean)

Returns a McNemar test whether proportions are the same in two samples.
C#
public static McNemarTest McNemarTest(
	ICategoricalVector sample1,
	ICategoricalVector sample2,
	bool continuityCorrection = false
)

Parameters

sample1  ICategoricalVector
A categorical vector containing the first sample.
sample2  ICategoricalVector
A categorical vector containing the second sample.
continuityCorrection  Boolean  (Optional)
Specifies whether a continuity correction should be applied.

Return Value

McNemarTest
A McNemar test

Remarks

Both samples must be categorical variables with only two levels, and they must have the same length.

Exceptions

ArgumentNullException

sample1 is null.

-or-

sample2 is null.

ArgumentException

sample1 does not have exactly two levels.

-or-

sample2 does not have exactly two levels.

DimensionMismatchExceptionsample1 and sample2 do not have the same number of observations.

McNemarTest<T>(IList<T>, IList<T>, Boolean)

Returns a McNemar test whether proportions are the same in two samples.
C#
public static McNemarTest McNemarTest<T>(
	IList<T> sample1,
	IList<T> sample2,
	bool continuityCorrection = false
)

Parameters

sample1  IList<T>
A categorical vector containing the first sample.
sample2  IList<T>
A categorical vector containing the second sample.
continuityCorrection  Boolean  (Optional)
Specifies whether a continuity correction should be applied.

Type Parameters

T

Return Value

McNemarTest
A McNemar test

Remarks

Both samples must be categorical variables with only two levels, and they must have the same length.

Exceptions

ArgumentNullException

sample1 is null.

-or-

sample2 is null.

ArgumentException

sample1 does not have exactly two levels.

-or-

sample2 does not have exactly two levels.

DimensionMismatchExceptionsample1 and sample2 do not have the same number of observations.

See Also