Learn R Programming

flowMerge (version 2.20.0)

fitPiecewiseLinreg: Fit Piecewise Linear Regression for a list of flowMerge Objects

Description

Fits a two--component piecewise linear regression to the entropy vs number of clusters for a list of merged cluster solutions.

Usage

fitPiecewiseLinreg(x, plot=FALSE, normalized=TRUE, ...)

Arguments

x
A "list" of flowMerge objects for 1 through K clusters derived from a single max BIC flowObj or flowClust object.
plot
A logical indicating whether to plot the fit or not. Default is FALSE.
normalized
A logical indicating whether the merging should be done using the normalized or unnormalized entropy
...
Additional arguments not currently used.

Value

An integer value corresponding to the position of the changepoint.

Details

An S4 method that takes a list of flowMerge objects output by the merge method, extracts the entropy and fits a piecwise linear regression to the entropy vs number of clusters in order to find the postion of the changepoint. The location of the changepoint corresponds to the optimal merged cluster solution. The piecewise linear regression now is fitted to the entropy vs cumulative sum of merged observations at each number of clusters. This normalizes the change in entropy for the number of data points as described in Baudry et al.

References

Finak G, Bashasharti A, Brinkmann R, Gottardo R. Merging Mixture Model Components for Improved Cell Population Identification in High Throughput Flow Cytometry Data; Advances in Bioinformatics (To Appear)

See Also

merge

Examples

Run this code
#data(rituximab)
#data(RituximabFlowClustFit)
#o<-flowObj(flowClust.res[[which.max(BIC(flowClust.res))]],rituximab);
#m<-merge(o)
#i<-fitPiecewiseLinreg(m);

Run the code above in your browser using DataLab