Exponentially Modified Gaussian (EMG) minpack.lm objective function, calculates residuals using the EMG Peak Shape

emgGaussian_minpack.lm_objectiveFun(params, observed, xx)

Arguments

params

(list) exponentially modified gaussian parameters (params$gamma, params$center, params$sigma, params$amplitude)

observed

(numeric) observed y value at xx

xx

(numeric) value at which to evalute the exponentially modified gaussian

Value

difference between observed and expected exponentially modified gaussian value evaluated at xx