MRESTRICT Instruction |
MRESTRICT( options ) restrictions Rmatrix rvector residuals
MRESTRICT is used to test or impose restrictions on regressions. It is very similar to RESTRICT, except that you enter the restrictions using matrices rather than supplementary cards. This is often much more convenient, especially when there are many restrictions or when each restriction involves many coefficients. The matrix instructions EWISE and FMATRIX frequently prove useful in constructing the required matrices.
Wizard
You can use the Statistics—Regression Tests Wizard to perform restriction tests.
Parameters
restrictions |
number of restrictions |
Rmatrix |
RECTANGULAR matrix with restrictions coded in rows. This must be dimensioned restrictions x number of coefficients. |
rvector |
VECTOR with values for linear combinations. This must have dimension equal to restrictions. It defaults to a vector of zeros. |
residuals |
series for residuals from the restricted regression residuals (if you do CREATE or REPLACE) residuals. Note that the standard %RESIDS series is set to the residuals as well, so you will rarely need this. |
Options
See RESTRICT Options
Variables Defined
%CDSTAT |
the computed test statistic. (REAL) |
%SIGNIF |
the marginal significance level (REAL) |
%NDFTEST |
(numerator) degrees of freedom for the test (INTEGER) |
%BETA |
VECTOR of coefficients (if CREATE or REPLACE option) |
%RESIDS |
SERIES of residuals (if CREATE or REPLACE option) |
Description
Represent the linear restrictions as \({\bf{R}}\beta = {\bf{r}}\) where \({\bf{R}}\) is a Q × K matrix and \({\bf{r}}\) a Q-vector, with Q as the number of restrictions and K the number of coefficients. You input \({\bf{R}}\) and \({\bf{r}}\) using the Rmatrix and rvec parameter fields.
Example
This does a polynomial distributed lag using MRESTRICT. The restriction is that the 4th difference of the distributed lag coefficients is zero. It estimates the unconstrained distributed lag, then applies the 21 restrictions. The 1 and 2 on FMATRIX keep CONSTANT (regressor 1) out of the restriction by starting the difference operator at the 1,2 element of R.
linreg longrate 1951:1 2006:4
# constant shortrate{0 to 24}
declare rect r(21,26)
fmatrix(diffs=4) r 1 2
mrestrict(create) 21 r
Copyright © 2025 Thomas A. Doan