breakdates            package:strucchange            R Documentation

_B_r_e_a_k_d_a_t_e_s _C_o_r_r_e_s_p_o_n_d_i_n_g _t_o _B_r_e_a_k_p_o_i_n_t_s

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

     A generic function for computing the breakdates corresponding to
     breakpoints (and their confidence intervals).

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

     breakdates(obj, format.times = FALSE, ...)

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

     obj: An object of class '"breakpoints"', '"breakpointsfull"' or
          their confidence intervals as returned by 'confint'.

format.times: logical. If set to 'TRUE' a vector of strings with the
          formatted breakdates. See details for more information.

     ...: currently not used.

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

     Breakpoints are the number of observations that are the last in
     one segment and breakdates are the corresponding points on the
     underlying time scale. The breakdates can be formatted which
     enhances readability in particular for quarterly or monthly time
     series. For example the breakdate '2002.75' of a monthly time
     series will be formatted to '"2002(10)"'.

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

     A vector or matrix containing the breakdates.

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

     'breakpoints', 'confint'

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

     if(! "package:stats" %in% search()) library(ts)

     ## Nile data with one breakpoint: the annual flows drop in 1898
     ## because the first Ashwan dam was built
     data(Nile)
     plot(Nile)

     bp.nile <- breakpoints(Nile ~ 1)
     summary(bp.nile)
     plot(bp.nile)

     ## compute breakdates corresponding to the
     ## breakpoints of minimum BIC segmentation
     breakdates(bp.nile)

     ## confidence intervals
     ci.nile <- confint(bp.nile)
     breakdates(ci.nile)
     ci.nile

     plot(Nile)
     lines(ci.nile)

