get.p                package:rflowcyt                R Documentation

_T_e_s_t _i_f _t_h_e _k_e_r_n_e_l _d_e_n_s_i_t_y _e_s_t_i_m_a_t_e _g_i_v_e_n _b_y _x _a_n_d _h_0 _h_a_s _a_t _m_o_s_t _m _m_o_d_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     This function returns the p-value of rejecting the null hypothesis
     that the kernel density estimate given by x and h0 has at most m
     modes.

_U_s_a_g_e:

     get.p(x,h0,m=1,num.sim=200)

_A_r_g_u_m_e_n_t_s:

       x: the data vector 

      h0: the bandwidth for the gaussian kernel density estimate for
          the standardized data

       m: the number iof modes we are trying to reject is the maximum 

 num.sim: the number of bootstrap simulations to determine this p-value 

_V_a_l_u_e:

     returns the p-value of the test

_A_u_t_h_o_r(_s):

     Kevin Rader

_R_e_f_e_r_e_n_c_e_s:

     B.W. Silverman (1981),Using Kernel Density Estimates to
     Investigate Multimodatlity. J.R. Statist. Soc. B,43,1,97-99.

_S_e_e _A_l_s_o:

     'get.h', 'emp.f', 'get.num.modes'

_E_x_a_m_p_l_e_s:

      set.seed(12345)
      x1<-matrix(rnorm(50),ncol=1)
      x2<-matrix(c(rnorm(25,mean=-2),rnorm(25,mean=2)),ncol=1)
      h1<-get.h(x1,m=1,prec=0.001)
      h2<-get.h(x2,m=1,prec=0.001)
      p1<-get.p(x1,h1,1,100)
      p2<-get.p(x2,h2,1,100)
      c(p1,p2)

