Fstats              package:strucchange              R Documentation

_F _S_t_a_t_i_s_t_i_c_s

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

     Computes a series of F statistics for a specified data window.

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

     Fstats(formula, from = 0.15, to = NULL, data)

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

 formula: a symbolic description for the model to be tested

from, to: numeric. If `from' is smaller than 1 they are interpreted as
          percentages of data and by default `to' is taken to be 1 -
          `from'. F statistics will be calculated for the observations
          `(n*from):(n*to)', when `n' is the number of observations in
          the model. If `from' is greater than 1 it is interpreted to
          be the index and `to' defaults to `n - from'. If `from' is a
          vector with two elements, then `from' and {to

     are interpreted as time specifications like in `ts', see also the
     examples.

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

     For every potential change point in `from:to' a F statistic (Chow
     test statistic) is computed. For this an OLS model is fitted for
     the observations before and after the potential change point, i.e.
     `2k' parameters have to be estimated, and the error sum of squares
     is computed (ESS). Another OLS model for all obervations with a
     restricted sum of squares (RSS) is computed, hence `k' parameters
     have to be estimated here. If `n' is  the number of observations
     and `k' the number of regressors in the model, the formula is:


                    F = (RSS-ESS)/ESS * (n-2*k)/k

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

     `Fstats' returns an object of class `"Fstats"', which contains
     mainly a time series of F statistics. The function `plot' has a
     method to plot the F statistics or the corresponding p values;
     with `sctest' a supF-, aveF- or expF-test on structural change can
     be performed.

_A_u_t_h_o_r(_s):

     Achim Zeileis zeileis@ci.tuwien.ac.at

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

     Andrews D.W.K. (1993), Tests for parameter instability and
     structural change with unknown change point, Econometrica, 61,
     821-856.

     Hansen B. (1992), Tests for parameter instability in regressions
     with I(1) processes, Journal of Business & Economic Statistics,
     10, 321-335.

     Hansen B. (1997), Approximate asymptotic p values for
     structural-change tests, Journal of Business & Economic
     Statistics, 15, 60-67.

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

     `plot.Fstats', `sctest.Fstats', `boundary.Fstats'

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

     ## Load dataset "nhtemp" with average yearly temperatures in New Haven
     data(nhtemp)
     ## plot the data
     plot(nhtemp)

     ## test the model null hypothesis that the average temperature remains constant
     ## over the years for potential break points between 1941 (corresponds to from =
     ## 0.5) and 1962 (corresponds to to = 0.85)
     ## compute F statistics
     fs <- Fstats(nhtemp ~ 1, from = 0.5, to = 0.85)
     ## this gives the same result
     fs <- Fstats(nhtemp ~ 1, from = c(1941,1), to = c(1962,1))
     ## plot the F statistics
     plot(fs, alpha = 0.01)
     ## and the corresponding p values
     plot(fs, pval = TRUE, alpha = 0.01)
     ## perform the aveF test
     sctest(fs, type = "aveF")

