ProbBin.FCS {rflowcyt} | R Documentation

## ProbBin.FCS R-object: Probability binning of 2 samples

### Description

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

### Usage

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

### Arguments

`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: "by.control" in which the breaks for the bins are based on the unstimulated having N observations in each bin "combined" 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

### Details

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.

### Value

`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

### WARNING

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.

### Note

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

### Author(s)

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

### References

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

### See Also

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

### Examples

    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)
    }

[Package rflowcyt version 1.0.1 Index]