statsmodels.discrete.count_model.ZeroInflatedNegativeBinomialResults.wald_test

ZeroInflatedNegativeBinomialResults.wald_test(r_matrix, cov_p=None, scale=1.0, invcov=None, use_f=None, df_constraints=None)

Compute a Wald-test for a joint linear hypothesis.

Parameters
r_matrix{array_like, str, tuple}

One of:

  • array : An r x k array where r is the number of restrictions to test and k is the number of regressors. It is assumed that the linear combination is equal to zero.

  • str : The full hypotheses to test can be given as a string. See the examples.

  • tuple : A tuple of arrays in the form (R, q), q can be either a scalar or a length p row vector.

cov_parray_like, optional

An alternative estimate for the parameter covariance matrix. If None is given, self.normalized_cov_params is used.

scalefloat, optional

Default is 1.0 for no scaling.

Deprecated since version 0.10.0.

invcovarray_like, optional

A q x q array to specify an inverse covariance matrix based on a restrictions matrix.

use_fbool

If True, then the F-distribution is used. If False, then the asymptotic distribution, chisquare is used. If use_f is None, then the F distribution is used if the model specifies that use_t is True. The test statistic is proportionally adjusted for the distribution by the number of constraints in the hypothesis.

df_constraintsint, optional

The number of constraints. If not provided the number of constraints is determined from r_matrix.

Returns
ContrastResults

The results for the test are attributes of this results instance.

See also

f_test

Perform an F tests on model parameters.

t_test

Perform a single hypothesis test.

statsmodels.stats.contrast.ContrastResults

Test results.

patsy.DesignInfo.linear_constraint

Specify a linear constraint.

Notes

The matrix r_matrix is assumed to be non-singular. More precisely,

r_matrix (pX pX.T) r_matrix.T

is assumed invertible. Here, pX is the generalized inverse of the design matrix of the model. There can be problems in non-OLS models where the rank of the covariance of the noise is not full.