calcPBChiSquare          package:flowStats          R Documentation

_P_r_o_b_a_b_i_l_i_t_y _b_i_n_n_i_n_g _m_e_t_i_r_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 Probability binning metric proposed
     by Baggerly et al. The function utilizes the data binned using the
     'proBin' and 'binByRef' functions.

_U_s_a_g_e:

     calcPBChiSquare(ctrlRes,sampRes,ctrlCount,sampCount)

_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
          test sample dataset

ctrlCount: The number of events in the control sample

sampCount: The number of events in the test sample being compared

_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")])
     ctrlCount<-nrow(GvHD[[1]])
     sampCount<-nrow(GvHD[[16]])
     stat<-calcPBChiSquare(resCtrl,resSample,ctrlCount,sampCount)

