LogisticRegressionModel.GetLikelihoodRatioTest Method

Definition

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

Overload List

GetLikelihoodRatioTest() Returns a test to verify the significance of the logistic model.
GetLikelihoodRatioTest(LogisticRegressionModel) Returns a test to verify the significance of the logistic model.

GetLikelihoodRatioTest

Returns a test to verify the significance of the logistic model.
C#
public SimpleHypothesisTest GetLikelihoodRatioTest()

Return Value

SimpleHypothesisTest
A SimpleHypothesisTest object.

Remarks

This method compares the computed logistical model against a model that contains only a constant. The ratio of the log-likelihoods of the two models follows a chi-square distribution with degrees of freedom equal to the number of additional parameters.

The model must have been computed using the Fit() method before this method is called.

For nominal logistic regression, this method compares the model against a model that contains only a constant for each level other than the reference level.

Exceptions

InvalidOperationException

The model has not been fitted.

GetLikelihoodRatioTest(LogisticRegressionModel)

Returns a test to verify the significance of the logistic model.
C#
public SimpleHypothesisTest GetLikelihoodRatioTest(
	LogisticRegressionModel nestedModel
)

Parameters

nestedModel  LogisticRegressionModel
A LogisticRegressionModel that is a reduced model of the current instance.

Return Value

SimpleHypothesisTest
A SimpleHypothesisTest object.

Remarks

This method compares the computed logistical model against a nested model. The ratio of the log-likelihoods of the two models follows a chi-square distribution with degrees of freedom equal to the number of additional parameters.

Both models must have been computed using the Fit() method before this method is called.

Exceptions

ArgumentNullException

nestedModel is null.

InvalidOperationException

Not all variables in nestedModel are present in the current model.

-or-

The model has not been fitted.

-or-

The nested model has not been computed.

See Also