petest                package:lmtest                R Documentation

_P_E _T_e_s_t _f_o_r _L_i_n_e_a_r _v_s. _L_o_g-_L_i_n_e_a_r _S_p_e_c_i_f_i_c_a_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

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'.

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

     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.

_R_e_f_e_r_e_n_c_e_s:

     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.

_S_e_e _A_l_s_o:

     'jtest', 'coxtest', 'encomptest'

_E_x_a_m_p_l_e_s:

     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)
     }

