moneydemand          package:lmtest          R Documentation(latin1)

_M_o_n_e_y _D_e_m_a_n_d

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

     Money Demand Data.

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

     data(moneydemand)

_F_o_r_m_a_t:

     A multivariate yearly time series from 1879 to 1974 with variables

     _l_o_g_M logarithm of quantity of money,

     _l_o_g_Y_p logarithm of real permanent income,

     _R_s short term interest rate,

     _R_m rate of return on money,

     _R_l not documented in the sources,

     _l_o_g_S_p_p logarithm of an operational measure of the variability of
          the rate of price changes.

_S_o_u_r_c_e:

     The data was originally studied by Allen (1982), the data set is
     given in Krmer and Sonnberger (1986). Below we replicate a few
     examples  from the book. Some of these results differ more or less
     seriously and are sometimes parameterized differently.

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

     S.D. Allen (1982), Kleins's Price Variability Terms in the U.S.
     Demand for Money. _Journal of Money, Credit and Banking_ *14*,
     525-530

     W. Krmer & H. Sonnberger (1986), _The Linear Regression Model
     under Test_. Heidelberg: Physica

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

     data(moneydemand)
     moneydemand <- window(moneydemand, start=1880, end=1972)

     ## page 125, fit Allen OLS model (and Durbin-Watson test),
     ## last line in Table 6.1

     modelAllen <- logM ~ logYp + Rs + Rl + logSpp
     lm(modelAllen, data = moneydemand)
     dwtest(modelAllen, data = moneydemand)

     ## page 127, fit test statistics in Table 6.1 c)
     ################################################

     ## Breusch-Pagan
     bptest(modelAllen, studentize = FALSE, data = moneydemand)
     bptest(modelAllen, studentize = TRUE, data = moneydemand)

     ## RESET
     reset(modelAllen, data = moneydemand)
     reset(modelAllen, power = 2, type = "regressor", data = moneydemand)
     reset(modelAllen, type = "princomp", data = moneydemand)

     ## Harvey-Collier tests (up to sign of the test statistic)
     harvtest(modelAllen, order.by = ~logYp, data = moneydemand)
     harvtest(modelAllen, order.by = ~Rs, data = moneydemand)
     harvtest(modelAllen, order.by = ~Rl, data = moneydemand)
     harvtest(modelAllen, order.by = ~logSpp, data = moneydemand)

     ## Rainbow test
     raintest(modelAllen, order.by = "mahalanobis", data = moneydemand)

     if(require(strucchange, quietly = TRUE)) {
     ## Chow (1913)
     sctest(modelAllen, point=c(1913,1), data = moneydemand, type = "Chow") }

     if(require(strucchange, quietly = TRUE)) {
     ## Fluctuation
     sctest(modelAllen, type = "fluctuation", rescale = FALSE, data = moneydemand)}

