BootsModelTest              package:sac              R Documentation

_B_o_o_t_s_t_r_a_p _T_e_s_t _o_f _t_h_e _V_a_l_i_d_i_t_y _o_f _t_h_e _S_e_m_i_p_a_r_a_m_e_t_r_i_c _C_h_a_n_g_e-_P_o_i_n_t _M_o_d_e_l

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

     Using bootstrap method to approximate the 'p'-value of test of the
     model validity. Bootstrap samples are drawn from the
     semiparametrica empirical distribution which are estimates of the
     underlying population distributions.

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

     BootsModelTest(x, k, m, B, Alpha, Beta, tol = 1.0e-7, maxit=50, trace=FALSE)

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

       x: a numeric vector or matrix containing the data, one row per
          observation;

       k: the estimated change-point, output of 'SemiparChangePoint' 

       m: = 'n' the sample size for '"one-change"' alternative, or the
          estimated second change-point for '"epidemic"' alternative,
          an output of 'SemiparChangePoint' 

       B: number of resamples 

   Alpha: estimated parameter alpha, output of 'SemiparChangePoint'  

    Beta: estimated parameter beta, output of 'SemiparChangePoint'  

     tol: the desired accuracy (convergence tolerance), an argument of
          'glm.control'. 

   maxit: the maximum number of iterations, an argument of
          'glm.control'. 

   trace: logical indicating if output should be produced for each
          iteration, an argument of 'glm.control'.

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

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

 Delta  : The test statistic of the model validity

 Pvalue : The bootstrapped 'p'-value 

_N_o_t_e:

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

     Zhong Guan zguan@iusb.edu

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

     Guan, Z.(2001) Some Results About Empirical Likelihood Method,
     _Ph.D. Thesis, The University of Toledo_.

     Guan, Z.(2004) A semiparametric changepoint model, _Biometrika_,
     91, 4, 849-862.

     Guan, Z. Semiparametric Tests for Change-points with Epidemic
     Alternatives.

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

     'SemiparChangePoint', 'schapt'

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

     ## Nile data with one change-point: the annual flows drop in 1898.
     ## It is believed to be caused by the building of the first Aswan dam.
     if(! "package:stats" %in% search()) library(stats)
     data(Nile)
     require(sac) #load the package
     Nile.res<-SemiparChangePoint(Nile, alternative = "one.change")
     BootsModelTest(Nile, Nile.res$k.hat, length(Nile), B=5, Nile.res$alpha.hat, 
         Nile.res$beta.hat)
         # Choose larger B to get better approximate p-value.
         # It takes longer to do bootstrap model test for large B.

