harvtest           package:lmtest           R Documentation(latin1)

_H_a_r_v_e_y-_C_o_l_l_i_e_r _T_e_s_t

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

     Harvey-Collier test for linearity.

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

     harvtest(formula, order.by = NULL, data = list())

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

 formula: a symbolic description for the model to be tested (or a
          fitted '"lm"' object).

order.by: Either a vector 'z' or a formula with a single explanatory
          variable like '~ z'. The observations in the model are
          ordered by the size of 'z'. If set to 'NULL' (the default)
          the observations are assumed to be ordered (e.g., a time
          series).

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

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

     The Harvey-Collier test performs a t-test (with 'parameter'
     degrees of freedom) on the recursive residuals. If the true
     relationship is not linear but convex or concave the mean of the
     recursive residuals should differ from 0 significantly.

     Examples can not only be found on this page, but also on the help
     pages of the data sets 'bondyield', 'currencysubstitution',
     'growthofmoney', 'moneydemand', 'unemployment', 'wages'.

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

     A list with class '"htest"' containing the following components: 

statistic: the value of the test statistic.

 p.value: the p-value of the test.

parameter: degrees of freedom.

  method: a character string indicating what type of test was
          performed.

data.name: a character string giving the name(s) of the data.

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

     A. Harvey & P. Collier (1977), Testing for Functional
     Misspecification in Regression Analysis. _Journal of Econometrics_
     *6*, 103-119

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

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

     'lm'

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

     # generate a regressor and dependent variable
     x <- 1:50
     y1 <- 1 + x + rnorm(50)
     y2 <- y1 + 0.3*x^2

     ## perform Harvey-Collier test
     harv <- harvtest(y1 ~ x)
     harv
     ## calculate critical value vor 0.05 level
     qt(0.95, harv$parameter)
     harvtest(y2 ~ x)

