RATS 11.1
RATS 11.1

Procedures /

REGRESET Procedure

Home Page

← Previous Next →

@REGRESET is a regression post-processor which performs Ramsey's RESET test. Use this after running a linear regression to test the functional form of that regression. This is described in Ramsey(1969) (original test) and Lee, White and Granger(1992) (test with principal components). This tests whether powers of the sample fitted values have explanatory power in the residuals (which might be due to neglected non-linearities in the functional form).

@REGRESET( options )       (no parameters)

Options

H=maximum power to include [2]

PC=number of principal components of powers 2,...,h to include [all]

 

[PRINT]/NOPRINT

TITLE=title for report ["RESET(h) Test"]

Variables Defined

%CDSTAT

LM test statistic (REAL)

%SIGNIF

significance of %CDSTAT as a chi-squared (REAL)

Example

This includes code for doing the RESET test "by hand" and (at the end) the same for doing RESET tests with 3rd and 4th powers. In practice, you would just do the LINREG followed by one or more @REGRESET instructions.

 

*

*  J. Wooldridge, Econometrics of Cross Section and Panel Data

*  Example 6.4

*

open data nls80.raw

data(format=free,org=columns) 1 935 wage hours iq kww educ exper tenure age $

  married black south urban sibs brthord meduc feduc lwage

*

set lwage = log(wage)

linreg lwage / resids

# constant exper tenure married south urban black educ

*

* RESET specification test.

* This shows the mechanics of doing the test. At the end of this, we'll

* show how to use a RATS procedure to do this more easily.

*

prj lwagehat

set y2 = lwagehat^2

set y3 = lwagehat^3

set y4 = lwagehat^4

*

* Regress the residuals on the original explanatory variables plus the

* powers of y hat. Use TRSQ as the test statistic. The numerical results

* differ slightly because the test statistic in the text is based upon a

* rounded R^2.

*

linreg resids

# constant exper tenure married south urban black educ y2 y3

cdf(title="RESET-3rd order") chisqr %trsq 2

linreg resids

# constant exper tenure married south urban black educ y2 y3 y4

cdf(title="RESET-4th order") chisqr %trsq 3

*

* The @RegRESET(h=power) procedure is applied immediately after the

* regression that you want to test.

*

linreg lwage

# constant exper tenure married south urban black educ

@RegRESET(h=3)

@RegRESET(h=4)

Sample Output

This is the output from the final @REGRESET in the example. With 4th power, the test has 3 degrees for freedom (for the 2nd, 3rd and 4th powers). It does both an F-test and an LM (chi-squared) test. The two should give very similar (though not identical) significance levels.


 

RESET(4) Test

Form     Statistic Sig Level

F(3,924) 0.6874113 0.5598327

LM(3)    2.0821372 0.5555350


 


Copyright © 2026 Thomas A. Doan