ProbBin.FCS             package:rflowcyt             R Documentation

_P_r_o_b_B_i_n._F_C_S _R-_o_b_j_e_c_t: _P_r_o_b_a_b_i_l_i_t_y _b_i_n_n_i_n_g _o_f _2 _s_a_m_p_l_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Constructs a list of histogram objects and other variables on the
     probability binning between 2 samples, usually the stimulated and
     unstimulated data (post gating).

_U_s_a_g_e:

     ProbBin.FCS(controldata, stimuldata, N, varname = "",
     PBspec = c("by.control", "combined"), MY.DEBUG = TRUE, ...)

_A_r_g_u_m_e_n_t_s:

controldata: a vector of the unstimulated sample data (of 1 variable)

stimuldata: a vector of the stimulated sample data (of 1 variable) 

       N: the number of observations per a bin 

 varname: character string of the name of the variable (optional) 

  PBspec: The type of probability binning either:

     "_b_y._c_o_n_t_r_o_l" in which the breaks for the bins are based on the
          unstimulated having N observations in each bin

     "_c_o_m_b_i_n_e_d" in which the breaks for the bins are based on the
          combined dataset (stimulated and unstimulated) having N
          observations in each bin 

MY.DEBUG: If TRUE, then debugging statements will be printed; default
          is TRUE.

     ...: other options besides 'plot' and 'br' in hist function

_D_e_t_a_i_l_s:

     Based on either the control data or the combined data, breaks for
     the bins are determined by having a specific number of
     observations fall in each bin.  These breaks are then applied to
     the stimulated data or both the control and stimulated data,
     respectively.  The resulting two histograms (one of the stimulated
     data and the other of the control data) are the result of this
     probability binning method.

_V_a_l_u_e:

unst.hist: histogram object of the control/unstimulated data

st.hist : histogram object of the stimulated data

      PB: type of Probability binning: either "by.control" or
          "combined"

N.in.bin: number in each bin

 varname: character string of the variable name

_W_A_R_N_I_N_G:

     Gating and subsetting should precede the analysis and the use of
     this function.  It is a good idea to implement 'icreateGate' or
     'createGate' and 'extractGatedData' before this analysis on
     univariate data.

_N_o_t_e:

     Further graphing & testing can be implemented via the following
     functions in rflowcyt package:'plot.ProbBin.FCS',
     'summary.ProbBin.FCS', 'ProbBin.flowcytest'

_A_u_t_h_o_r(_s):

     Zoe Moodie, A.J. Rossini, J.Y. Wan

_R_e_f_e_r_e_n_c_e_s:

     Mario Roederer, et al. "Probability Binning Comparison: A Metric
     for Quantitating Univariate Distribution Differences" Cytometry
     45:37-46 (2001).

_S_e_e _A_l_s_o:

     'hist', 'breakpoints.ProbBin', 'plot.ProbBin.FCS',
     'summary.ProbBin.FCS', 'ProbBin.flowcytest', 'is', 'as'

_E_x_a_m_p_l_e_s:

     if (require(rfcdmin)){

     data.there<-is.element(c("st.1829", "unst.1829", "st.DRT", "unst.DRT"),objects())
     if ( ( sum(data.there) != length(data.there) )){
     ## obtaining the FCS objects from VRC data
     data(VRCmin)
     }
     ## This only serves as an example.
     ## Gating/subsetting should precede this analysis
     IFN.gamma.1<-unst.1829@data[1:2000,4]
     IFN.gamma.2<-st.1829@data[1:2000,4]

     #Probability binning using the control dataset to determine the breaks
     PB1<-ProbBin.FCS(IFN.gamma.1, IFN.gamma.2, 200,
     varname=colnames(unst.1829@data)[4], PBspec="by.control",MY.DEBUG=FALSE)

     ## Probability Binning using the combined dataset (control & stimulated)
     ## to determing the breaks
     PB2<-ProbBin.FCS(IFN.gamma.1, IFN.gamma.2, 200,
     varname=colnames(unst.1829@data)[4], PBspec="combined",MY.DEBUG=FALSE)
     }

