SemiparChangePoint            package:sac            R Documentation

_S_e_m_i_p_a_r_a_m_e_t_r_i_c _T_e_s_t _o_f _C_h_a_n_g_e-_p_o_i_n_t(_s) _w_i_t_h _O_n_e-_c_h_a_n_g_e _o_r _E_p_i_d_e_m_i_c _A_l_t_e_r_n_a_t_i_v_e

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

     Calculate test statistics, loglikelihood function and estimate
     unknown parameters in the semiparametric model.

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

     SemiparChangePoint(x, alternative = c("one.change", "epidemic"), 
         adj.Wn = FALSE, tol = 1e-07, 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;

alternative: a character string specifying the alternative hypothesis,
          must be one of '"one-change"' (default) or '"epidemic"'.  You
          can specify just the initial letter.

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

  adj.Wn: logical indicating if 'Wn' should be adjusted or not for
          '"epidemic"' alternative. 

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

     ...: other future arguments 

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

     Model: log{ g(x)/f(x)}=exp{alpha+beta'T(x)} ,  where f(x) and g(x)
     are the density (frequency) functions of the two hypothesized
     populations, and T(x) can be chosen as T(x)=x or T(x)=(x,x^2). 
     The procedure will fail when there is separation in the data in
     the sense of Albert & Anderson(1984, _Biometrika_) and Santner &
     Duffy (1986, _Biometrika_). In this case, the change-point(s) may
     be detected easily using nonparametric method based on cumsum.
     Currently, this function does not check whether the data is
     separated.

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

  k.hat : change-point estimate

  m.hat : second change-point estimate for '"epidemic"' alternative

     ll : loglikelihood function

     Sn : likelihood ratio test statistic for '"one-change"'
          alternative

     Vn : test statistic based integal of weighted likelihood ratio for
          '"epidemic"' alternative

     Wn : test statistic based supremum of weighted likelihood ratio
          for '"epidemic"' alternative

alpha.hat : estimate of alpha

beta.hat : estimate of beta

_N_o_t_e:

     Statistic 'Wn' need be adjusted only for one dimensional
     observations and if no bootstrap test is conducted.

_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 change-point model, _Biometrika_,
     91, 4, 849-862.

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

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

     'schapt', 'p.OneChange', 'p.Epidemic.Vn', 'p.Epidemic.Wn'

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

     require(sac) #load the package
     # one-change alternative
     k<-10
     n<-30
     x<-rnorm(n,0,1)
     x[(k+1):n]<-x[(k+1):n]+1.5
     SemiparChangePoint(x, alternative = "one.change")

     # epidemic alternative
     k<-5
     m<-10
     n<-20
     x<-rnorm(n,0,1)
     x[(k+1):m]<-x[(k+1):m]+1.5
     SemiparChangePoint(x,  alternative = "epidemic")

