calcPearsonChi: Pearsons chi-square statistic for comparing the probability...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/pbin.R

Description

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.

Usage

1
calcPearsonChi(ctrlRes,sampRes)

Arguments

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

Value

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

Author(s)

Nishant Gopalakrishnan

See Also

proBin, calcPBChiSquare

Examples

1
2
3
4
5
6
7
8
library(flowCore)
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)

flowStats documentation built on Nov. 8, 2020, 6:49 p.m.