calcPearsonChi           package:flowStats           R Documentation

_P_e_a_r_s_o_n_s _c_h_i-_s_q_u_a_r_e _s_t_a_t_i_s_t_i_c _f_o_r _c_o_m_p_a_r_i_n_g _t_h_e _p_r_o_b_a_b_i_l_i_t_y 
_b_i_n_n_e_d _d_a_t_a_s_e_t_s

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

     This function calculates the Pearsons chi-squared statistic for
     comparing  data binned using the 'proBin' and 'binByRef'
     functions.Internally, the  function utilizes the chisq.test
     function.

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

     calcPearsonChi(ctrlRes,sampRes)

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

 ctrlRes: The result generated by calling the 'probBin' function on a
          control dataset.

 sampRes: The result generated by calling the 'byByRef' function on a
          sample dataset

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

     A list containing the statistic, p.value, observed, expected
     counts and the residuals

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

     Nishant Gopalakrishnan

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

     'proBin', 'calcPBChiSquare'

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

     data(GvHD)
     # flow frame 1 is treated as  control dataset and used to generate bins
     resCtrl<-proBin(GvHD[[1]][,c("FSC-H","SSC-H","Time")],200)  
     plotBins(resCtrl,GvHD[[1]],channels=c("FSC-H","SSC-H","Time"),title="Binned control data")
     # Same bins are applied to flowFrame 16
     resSample<-binByRef(resCtrl,GvHD[[16]][,c("FSC-H","SSC-H","Time")])
     stat<-calcPearsonChi(resCtrl,resSample)

