gefp               package:strucchange               R Documentation

_G_e_n_e_r_a_l_i_z_e_d _E_m_p_i_r_i_c_a_l _M-_F_l_u_c_t_u_a_t_i_o_n _P_r_o_c_e_s_s_e_s

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

     Computes an empirical M-fluctuation process  from the scores of a
     fitted model.

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

     gefp(..., fit = glm, scores = estfun, vcov = NULL,
       decorrelate = TRUE, sandwich = TRUE, order.by = NULL,
       fitArgs = NULL, parm = NULL, data = list())

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

     ...: specification of some model which is passed together with
          'data' to the 'fit' function: 'fm <- fit(..., data = data)'

     fit: a model fitting function, typically 'lm', 'glm' or 'rlm'.

  scores: a function which extracts the scores or estimating function
          from the fitted object: 'scores(fm)'.

    vcov: a function to extract the covariance matrix for the
          coefficients of the fitted model: 'vcov(fm, order.by =
          order.by, data = data)'.

decorrelate: logical. Should the process be decorrelated?

sandwich: logical. Is the function 'vcov' the sandwich estimator or
          only the middle part?

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

 fitArgs: List of additional arguments which could be passed to the
          'fit' function. Usually, this is not needed and '...' will be
          sufficient to pass arguments to 'fit'.

    parm: integer or character specifying the component of the
          estimating functions which should be used (by default all
          components are used).

    data: an optional data frame containing the variables in the '...'
          specification and the 'order.by' model. By default the
          variables are taken from the environment which 'gefp' is
          called from.

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

     'gefp' returns a list of class '"gefp"' with components inlcuding 

 process: the fitted empirical fluctuation process of class '"zoo"',

    nreg: the number of regressors,

    nobs: the number of observations,

     fit: the fit function used,

  scores: the scores function used,

fitted.model: the fitted model.

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

     Zeileis A., Hornik K. (2003), Generalized M-Fluctuation Tests for
     Parameter Instability, Report 80, SFB "Adaptive Information
     Systems and Modelling in Economics and Management Science", Vienna
     University of Economics, <URL:
     http://www.wu-wien.ac.at/am/reports.htm#80>.

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

     'efp', 'efpFunctional'

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

     if("package:sandwich" %in% search() || require(sandwich)) {
       data(BostonHomicide)
       gcus <- gefp(homicides ~ 1, family = poisson, vcov = kernHAC,
                    data = BostonHomicide)
       plot(gcus, aggregate = FALSE)    
       gcus
       sctest(gcus)
     }

