You are on page 1of 3

# THE PE TEST

Consider a linear and log-linear model. ssume for simplicity that there is only one right-
hand side variable. Additional right-hand side variables can be included in the usual way.

## The linear model is

Y = β 0 + β1 X + U .

## The log-linear model is

logY = γ 0 + γ 1 X + U .

Let ( βˆ0 , βˆ1 ) and (γˆ0 , γˆ1 ) denote the OLS estimates of ( β 0 , β1 ) and (γ 0 , γ 1 ) . Define predicted
values Yˆ = βˆ0 + βˆ1 X for the linear model and Lˆ = γˆ0 + γˆ1 X for the log-linear model. Define
residuals Û = Y = Yˆ for the linear model and Vˆ = log Y − L̂ for the log-linear model. Define the
ˆ
variables Z = Lˆ − log(Yˆ ) and W = Yˆ − e L .

To test the null hypothesis that the linear model is correct against the alternative that the
log-linear model is correct, use OLS to estimate δ 0 , δ1 , and α in the model

Û = δ 0 + δ1 X + α Z + ε1 .

Use a t-test to test the hypothesis that α = 0 . Reject the linear model if the t-test rejects this
hypothesis. Otherwise, do not reject the linear model.

To test the null hypothesis that the log-linear model is correct against the alternative that
the linear model is correct, use OLS to estimate δ 0 , δ1 , and α in the model

Vˆ = δ 0 + δ1 X + αW + ε 2 .

Use a t-test to test the hypothesis that α = 0 . Reject the log-linear model if the t-test rejects this
hypothesis. Otherwise, do not reject the log-linear model.

## * PE Test Using Baltimore housing data

. * Linear model
. regress pr sqft, robust

## Regression with robust standard errors Number of obs = 100

F( 1, 98) = 28.41
Prob > F = 0.0000
R-squared = 0.4412
Root MSE = 58.773

1
------------------------------------------------------------------------------
| Robust
pr | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+-----------------------------------------------------------------------
sqft | .0838602 .0157341 5.33 0.000 .0526364 .1150841
_cons | -20.03817 17.39425 -1.15 0.252 -54.5565 14.48016
--------------------------------------------------------------------------------------

## . * Obtain predictions and residuals

. predict phat
(option xb assumed; fitted values)

## . predict uhat, residual

. * Log-linear model
. regress lp sqft, robust

## Regression with robust standard errors Number of obs = 100

F( 1, 98) = 59.11
Prob > F = 0.0000
R-squared = 0.4718
Root MSE = .39026

------------------------------------------------------------------------------
| Robust
lp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+------------------------------------------------------------------------
sqft | .0005923 .000077 7.69 0.000 .0004394 .0007451
_cons | 3.569132 .0934382 38.20 0.000 3.383707 3.754557
---------------------------------------------------------------------------------------

## . * Obtain predictions and residuals

. predict lhat
(option xb assumed; fitted values)

## . * Define the variables Z and W

. gen z = lhat - log(phat)

## . * Do the PE regression for the linear null

. regress uhat sqft z, robust

## Regression with robust standard errors Number of obs = 100

F( 2, 97) = 14.76
Prob > F = 0.0000
R-squared = 0.0647
Root MSE = 57.131

2
------------------------------------------------------------------------------
| Robust
uhat | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+-----------------------------------------------------------------------
sqft | .0189792 .0191378 0.99 0.324 -.019004 .0569624
z | 92.53563 24.17651 3.83 0.000 44.55195 140.5193
_cons | -22.18754 21.34933 -1.04 0.301 -64.56005 20.18497
--------------------------------------------------------------------------------------

## . * Reject hypothesis that coefficient of z is zero

. * Do the PE regression for the log-linear null
. regress vhat sqft w, robust

## Regression with robust standard errors Number of obs = 100

F( 2, 97) = 0.77
Prob > F = 0.4679
R-squared = 0.0074
Root MSE = .39081

------------------------------------------------------------------------------
| Robust
vhat | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+-----------------------------------------------------------------------
sqft | .0000539 .0000807 0.67 0.506 -.0001062 .0002139
w | -.0028336 .0023562 -1.20 0.232 -.0075101 .0018428
_cons | -.0487094 .0985009 -0.49 0.622 -.2442065 .1467877
--------------------------------------------------------------------------------------

## . * Do not reject hypothesis that coefficient of w is zero.

. * The PE test rejects the linear model but not the log-linear model