lmtest (version 0.9-37)

petest: PE Test for Linear vs. Log-Linear Specifications

Description

petest performs the MacKinnon-White-Davidson PE test for comparing linear vs. log-linear specifications in linear regressions.

Usage

petest(formula1, formula2, data = list(), vcov. = NULL, …)

Arguments

formula1

either a symbolic description for the first model to be tested, or a fitted object of class "lm".

formula2

either a symbolic description for the second model to be tested, or a fitted object of class "lm".

data

an optional data frame containing the variables in the model. By default the variables are taken from the environment which petest is called from.

vcov.

a function for estimating the covariance matrix of the regression coefficients, e.g., vcovHC.

further arguments passed to coeftest.

Value

An object of class "anova" which contains the coefficient estimate of the auxiliary variables in the augmented regression plus corresponding standard error, test statistic and p value.

Details

The PE test compares two non-nest models where one has a linear specification of type y ~ x1 + x2 and the other has a log-linear specification of type log(y) ~ z1 + z2. Typically, the regressors in the latter model are logs of the regressors in the former, i.e., z1 is log(x1) etc.

The idea of the PE test is the following: If the linear specification is correct then adding an auxiliary regressor with the difference of the log-fitted values from both models should be non-significant. Conversely, if the log-linear specification is correct then adding an auxiliary regressor with the difference of fitted values in levels should be non-significant. The PE test statistic is simply the marginal test of the auxiliary variable(s) in the augmented model(s). In petest this is performed by coeftest.

For further details, see the references.

References

W.H. Greene (2003). Econometric Analysis, 5th edition. Upper Saddle River, NJ: Prentice Hall.

J. MacKinnon, H. White, R. Davidson (1983). Tests for Model Specification in the Presence of Alternative Hypotheses: Some Further Results. Journal of Econometrics, 21, 53-70.

M. Verbeek (2004). A Guide to Modern Econometrics, 2nd ed. Chichester, UK: John Wiley.

See Also

jtest, coxtest, encomptest

Examples

Run this code
# NOT RUN {
if(require("AER")) {
## Verbeek (2004), Section 3
data("HousePrices", package = "AER")

### Verbeek (2004), Table 3.3
hp_lin <- lm(price ~ . , data = HousePrices)
summary(hp_lin)

### Verbeek (2004), Table 3.2
hp_log <- update(hp_lin, log(price) ~ . - lotsize + log(lotsize))
summary(hp_log)

## PE test
petest(hp_lin, hp_log)


## Greene (2003), Example 9.8
data("USMacroG", package = "AER")

## Greene (2003), Table 9.2
usm_lin <- lm(m1 ~ tbill + gdp, data = USMacroG)
usm_log <- lm(log(m1) ~ log(tbill) + log(gdp), data = USMacroG)
petest(usm_lin, usm_log)
## matches results from Greene's errata
}
# }

Run the code above in your browser using DataCamp Workspace