| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Econometrics Toolbox |
| Contents | Index |
| Learn more about Econometrics Toolbox |
[h,pValue,stat,cValue] = waldtest(r,R,EstCov)
[h,pValue,stat,cValue] = waldtest(r,R,EstCov,alpha)
[h,pValue,stat,cValue] = waldtest(r,R,EstCov) performs the Wald test at a default 5% significance level.
[h,pValue,stat,cValue] = waldtest(r,R,EstCov,alpha) performs the Wald test at significance level alpha.
The Wald test compares specifications of nested models by assessing the significance of restrictions to an extended model with unrestricted parameters. The test requires:
A restriction function on the parameters in the unrestricted model, evaluated at the unrestricted parameter estimates (r)
The Jacobian of the restriction function, evaluated at the unrestricted parameter estimates (R)
A covariance estimator for the unrestricted model parameters, evaluated at the unrestricted parameter estimates (EstCov)
The test statistic is:
stat = r'*inv(R*EstCov*R')*r.
When the test statistic exceeds a critical value in its asymptotic distribution, waldtest rejects the null, restricted model in favor of the alternative, unrestricted model. The asymptotic distribution is chi-square, with degree-of-freedom parameter equal to the number of restrictions. The nominal significance level of the test (alpha) determines the critical value.
| r | Restriction functions r(θ) specifying restrictions of the form r(θ) = 0 on parameters θ in the unrestricted models to be tested, evaluated at the unrestricted parameter estimates. The number of restrictions is the degree-of-freedom parameter for a test, and must be less than the number of parameters in the unrestricted model. To perform a single test with q restrictions, r must be either a q-vector or a singleton cell array containing a q-vector. To perform k > 1 tests, r must be a k-cell-vector with each cell containing a restriction vector for the corresponding test. If r is a row vector, output arguments are also row vectors. |
| R | Jacobians of the restriction functions, evaluated at the unrestricted parameter estimates. Restriction functions map p-dimensional parameter space to q-dimensional restriction space. To perform a single test, R must be either a q-by-p matrix or a singleton cell array containing a q-by-p matrix. To perform k > 1 tests, R must be a k-cell-vector with each cell containing a Jacobian matrix for the corresponding test. |
| EstCov | Covariance estimators for the unrestricted parameters in the models to be tested, evaluated at the unrestricted parameter estimates. If an unrestricted model has p parameters, its covariance matrix is p-by-p. To perform a single test, EstCov must be either a p-by-p matrix or a singleton cell array containing a p-by-p matrix. To perform k > 1 tests, EstCov must be a k-cell- vector with each cell containing a covariance matrix for the corresponding test. |
| alpha | Nominal significance levels for the tests. Elements of alpha must be greater than zero and less than one. If alpha is a scalar, it is expanded to a vector with length equal to the number of tests. If alpha is a vector, it must have length equal to the number of tests. The default value of alpha is 0.05. |
| h | Vector of Booleans, representing decisions for the tests. The length of h is the number of tests. A 1 indicates rejection of the null (restricted) model for the corresponding test. A 0 represents failure to reject the restricted model. |
| pValue | Vector of probability values of the test statistics. The length of pValue is the number of tests. |
| stat | Vector of test statistics. The length of stat is the number of tests. |
| cValue | Vector of critical values for the tests. The length of cValue is the number of tests. |
waldtest performs multiple, independent tests when inputs are cell- vectors. If the covariance estimator is the same for all tests but the restrictions vary, waldtest "tests down" against multiple restricted models. If the covariance estimator varies but the restrictions do not, waldtest "tests up" against multiple unrestricted models. Otherwise, waldtest compares model specifications pairwise.
Estimation function such as garchfit return unrestricted parameter and covariance estimates that can be used with waldtest to compare specifications models.
The significance level alpha of waldtest is nominal, in that it specifies a rejection probability in the asymptotic distribution. The actual rejection probability will generally be greater than the nominal significance, and the rejection error will generally be greater than for likelihood ratio or Lagrange multiplier tests.
Use waldtest when restricted parameter estimates are difficult to compute. By comparison, lmtest requires only restricted parameter estimates and lratiotest requires both unrestricted and restricted parameter estimates.
Use Wald tests depend on the algebraic form of the restrictions. For example, the restriction ab = 1 may be expressed as a – 1/b = 0, or b – 1/a = 0, or ab – 1 = 0. Each formulation leads to different statistics.
This example fits a Gamma distribution to simulated education and income data. The example is explained in more detail in . Load the data:
load Data_Income1 x = Dataset.EDU; y = Dataset.INC;
The unrestricted model has loglikelihood:
![]()
Here
![]()
The restricted model is ρ = 1. In other words, the restricted model has an exponential distribution.
The unrestricted maximum likelihood estimates of β and ρ, and the unrestricted maximum loglikelihood are:
ubeta = -4.7179 urho = 3.1507 uLL = -82.9160
The restriction function is r = ρ – 1 = 2.1507. The gradient is R = [0 1].
The Wald test requires an estimated covariance. This example uses the observed Hessians.
n = size(x,1);
UDPsi = psi(1,urho);
UH = [sum(urho./(ubeta+x).^2)-2*sum(y./(ubeta+x).^3),...
-sum(1./(ubeta+x)); -sum(1./(ubeta+x)),-n*UDPsi];
UEstCov2 = -inv(UH);Test the unrestricted model against the restricted model:
[Wh,Wp,Wstat] = waldtest(r,R,UEstCov2)
Wh =
1
Wp =
0.0068
Wstat =
7.3337Wh = 1 means waldtest rejects the restricted hypothesis.
[1] Davidson, R. and J. G. MacKinnon. Econometric Theory and Methods. Oxford, UK: Oxford University Press, 2004.
[2] Godfrey, L. G. Misspecification Tests in Econometrics. Cambridge, UK: Cambridge University Press, 1997.
[3] Greene, W. H. Econometric Analysis. 6th ed. Upper Saddle River, NJ: Pearson Prentice Hall, 2008.
[4] Hamilton, J. D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.
garchfit, lmtest, lratiotest, vgxvarx
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |