COUNTREG Procedure

TEST Statement

<label:>

  • TEST <'string'> equation1 <, equation2…> / test-options ;

The TEST statement performs Wald, Lagrange multiplier, and likelihood ratio tests of linear hypotheses about the regression parameters that are specified in the preceding MODEL statement.

Each test is written either as a single linear equation or as a comma-separated list of two or more linear equations. A test equation specifies a linear hypothesis to be tested and consists of an expression, followed by the equality operator (=), followed by a second expression:

expression = expression

The rules governing valid test expressions are the same as those for restriction expressions. For more information see the section RESTRICT Statement Expressions.

Each equation specifies a linear hypothesis to be tested and consists of regression parameter names and relational operators. The regression parameter names are as shown in the Parameter column of the "Parameter Estimates" table. For more information about how parameters are named in the TEST statement, see the section Parameter Naming Conventions for the RESTRICT, TEST, BOUNDS, and INIT Statements. Only linear equality restrictions and tests are permitted in PROC COUNTREG. Test equations can consist only of algebraic operations that involve the addition symbol (+), subtraction symbol (-), and multiplication symbol (*).

All hypotheses in one TEST statement are tested jointly.

You can specify the following test-options after a slash (/):

ALL

requests Wald, Lagrange multiplier, and likelihood ratio tests.

LM

requests the Lagrange multiplier test.

LR

requests the likelihood ratio test.

WALD

requests the Wald test.

By default, the Wald test is performed.

You can add a label (which is printed in the output) to a TEST statement in two ways: add an unquoted label followed by a colon before the TEST keyword, or add a quoted string after the TEST keyword. The unquoted label cannot contain any spaces. If you include both an unquoted label and a quoted string, PROC COUNTREG uses the unquoted label. If you specify neither an unquoted label nor a quoted string, PROC COUNTREG automatically labels the tests.

The following statements illustrate the use of the TEST statement:

proc countreg;
   model y = x1 x2 x3;
   test x1 = 0, 1.5 * x2 + 2 * x3 = 0;
   test_int: test intercept = 0, x3 = 0.75;
run;

In the example, two separate tests are performed. The first test investigates the joint hypothesis that

beta 1 equals 0

and

1.5 beta 2 plus 2 beta 3 equals 0

The second test is labeled "test_int" and investigates the joint hypothesis that

beta Subscript upper I n t e r c e p t Baseline equals 0

and

beta 3 equals 0.75

You cannot specify both the TEST statement and the BAYES statement.

Last updated: June 19, 2025