MixedLMResults.wald_test()

statsmodels.regression.mixed_linear_model.MixedLMResults.wald_test

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

Compute a Wald-test for a joint linear hypothesis.

Parameters:

r_matrix : array-like, str, or tuple

  • 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_p : array-like, optional

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

scale : float, optional

Default is 1.0 for no scaling.

invcov : array-like, optional

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

use_f : bool

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.

Returns:

res : ContrastResults instance

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

See also

statsmodels.stats.contrast.ContrastResults, f_test, t_test, patsy.DesignInfo.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.

doc_statsmodels
2017-01-18 16:12:17
Comments
Leave a Comment

Please login to continue.