Description Usage Arguments Value Note Author(s) References

View source: R/gaussian.R View source: R/curveFitTools.R

Generate a vector of values that represent a Gaussian distribution. Secondly, apply a nonlinear least squares fit to gaussian data to determine the fitted gaussian function.

1 2 3 |

`x` |
vector of X locations to evaluate the gaussian at. For 'fit.gaussian', the locations at which the measured Y values are taken from. |

`mean` |
the center locatinon X for the generated gaussian curve |

`sd` |
the standard deviation for the generated gaussian curve |

`height` |
the maximum height of the generated gaussian curve. By default, the curve will have height such that its integral equals 1. |

`offset` |
the linear offset for the baseline of the generated gaussian curve |

`y` |
the raw data measurements at 'x', that are to be fit by a gaussian model. |

`fit.offset` |
logical, should the model include the offset term, to fit the baseline tails of the raw data. |

For 'gaussian', a vector of length ` length(x)`

, that gives the amplitude
of that gaussian function evaluated at `x`

.

For `fit.gaussian`

, a list:

`coefficients ` |
a vector of named coefficients (mean, sd, height, offset) giving the parameters of the best fit gaussian model. |

`y ` |
a vector of the same length as |

Implemented via ` nls`

Bob Morrison

based on code from: Earl F. Glynn, Stowers Inst for Medical Research

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.