encomptest              package:lmtest              R Documentation

_E_n_c_o_m_p_a_s_s_i_n_g _T_e_s_t _f_o_r _C_o_m_p_a_r_i_n_g _N_o_n-_N_e_s_t_e_d _M_o_d_e_l_s

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

     'encomptest' performs the encompassing test of Davidson &
     MacKinnon for comparing non-nested models.

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

      encomptest(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
          'encomptest' is called from.

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

     ...: further arguments passed to 'waldtest'.

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

     To compare two non-nested models, the encompassing test fits an
     encompassing model which contains all regressors from both models
     such that the two models are nested within the encompassing model.
     A Wald test for comparing each of the models with the encompassing
     model is carried out by 'waldtest'.

     For further details, see the references.

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

     An object of class '"anova"' which contains the residual degrees
     of freedom in the encompassing model, the difference in degrees of
     freedom, Wald statistic (either '"F"' or '"Chisq"') and
     corresponding p value.

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

     R. Davidson & J. MacKinnon (1993). _Estimation and Inference in
     Econometrics_. New York, Oxford University Press.

     W. H. Greene (1993), _Econometric Analysis_, 2nd ed. Macmillan
     Publishing Company, New York.

     W. H. Greene (2003). _Econometric Analysis_, 5th ed. New Jersey,
     Prentice Hall.

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

     'coxtest', 'jtest'

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

     ## Fit two competing, non-nested models for aggregate 
     ## consumption, as in Greene (1993), Examples 7.11 and 7.12

     ## load data and compute lags
     data(USDistLag)
     usdl <- na.contiguous(cbind(USDistLag, lag(USDistLag, k = -1)))
     colnames(usdl) <- c("con", "gnp", "con1", "gnp1")

     ## C(t) = a0 + a1*Y(t) + a2*C(t-1) + u
     fm1 <- lm(con ~ gnp + con1, data = usdl)

     ## C(t) = b0 + b1*Y(t) + b2*Y(t-1) + v
     fm2 <- lm(con ~ gnp + gnp1, data = usdl)

     ## Encompassing model
     fm3 <- lm(con ~ gnp + con1 + gnp1, data = usdl)

     ## Cox test in both directions:
     coxtest(fm1, fm2)

     ## ...and do the same for jtest() and encomptest().
     ## Notice that in this particular case they are coincident.
     jtest(fm1, fm2)
     encomptest(fm1, fm2)

     ## the encompassing test is essentially
     waldtest(fm1, fm3, fm2)

