lorentz peak function.

SSpsVoigt2(input,y0, A, nu, xc, wl, wg)

Arguments

input

a numeric vector of values at which to evaluate the model.

y0

offset

A

area

nu

profile shape factor

xc

center

wl

width lorentz

wg

width gauss

Value

a numeric vector of the same length as input. It is the value of the expression y0+A*((nu*2*wl)/(pi*4*(x-xc)^2+wl^2)+(1-nu)*(sqrt(4*log(2))*exp((-4*log(2)*(x-xc)^2)/wg^2))/sqrt(pi*wg)).

Note

This is primarily intended for use in formulae given to the nls function or similar functions for example mle2.

References

qtiplot: https://www.qtiplot.com/doc/manual-en/x9885.html.

See also

Examples

data(smoking) model <- nlsLM(USA~SSpsVoigt2(year,y0, A, nu, xc, wl, wg),data=smoking)