makeStartParams: Create a named vector of starting parameters for an...

Description Usage Arguments Value

View source: R/nlsGaussianSum.R

Description

Create a named vector of starting parameters for an nlsGaussiamSum model with 'n.components' gaussians. For n.components == 2, the value of this function could look like this: c(a1=40000, s1=4, mu1=30, a2=40000, s2=4, mu2=60) The exact values depend on the maximum intensity 'max.y' that was observed in a trace and the maximum value on the horizontal axis. The parameters result in 'n.components' gaussian curves that are spread evenly across the range of x-values.

Usage

1
makeStartParams(n.components, max.x, max.y)

Arguments

n.components

The number of gaussian curves to use.

max.x

The maximum value in the x-range.

max.y

The maximum value in the y-range.

Value

A named vector of parameters that can be plugged into the fitting function used internally.


hafenr/MACode documentation built on May 17, 2019, 2:24 p.m.