pickInit: Interactively select model starting values

View source: R/FlowHist.R

pickInitR Documentation

Interactively select model starting values

Description

Prompts the user to select the peaks to use as initial values for non-linear regression on a plot of the histogram data.

Usage

pickInit(fh)

Arguments

fh

A FlowHist object

Details

The raw histogram data are plotted, and the user is prompted to select the peak positions to use as starting values in the NLS procedure. This is useful when the automated peak-finding algorithm fails to discriminate between overlapping peaks, or is confused by noise.

Note that the A peak must be lower (smaller mean, further left) than the B peak. If the user selects the A peak with a higher mean than the B peak, the peaks will be swapped to ensure A is lower.

Value

pickInit returns the FlowHist object with its initial value slot updated.

Author(s)

Tyler Smith

Examples

library(flowPloidyData) 
fh2 <- FlowHist(file = flowPloidyFiles()[2], channel = "FL3.INT.LIN")
plot(fh2, init = TRUE) ## automatic peak estimates
## Not run: 
fh2 <- pickInit(fh2)   ## hand-pick peak estimates

## End(Not run)
plot(fh2, init = TRUE) ## revised starting values

plantarum/flowPloidy documentation built on March 25, 2023, 1:37 a.m.