ecoffinder_startpar: Start Values for ECOFFinder

Description Usage Arguments Details Value References See Also Examples

View source: R/ecoffinder_startpar.R

Description

A heuristic function functon to estimate start values for the ECOFFinder.

Usage

1
ecoffinder_startpar(x, y, method = c("peak1", "mode", "mean"), bw = "nrd0")

Arguments

x

x-values (log2 MIC or inhibition zone diameter)

y

y-values (frequencies)

method

select heuristic "peak1", "mode" or "mean"

bw

bandwith of kernel density smoother (see density)

Details

Start values for the nonlinear regression are estimated from the mode and median absolute deviation, from mean and standard deviation of the data or from a heuristic peak detection method, borrowed from package cardidates.

Value

vector with estimates for location, scale and total frequency

References

Rolinski, S., Sachse, S. and Petzoldt, T. (2007) cardidates: Identification of Cardinal Dates in Ecological Time Series. R package version 0.4.8. https://cran.r-project.org/package=cardidates

Turnidge, J., Kahlmeter, G., Kronvall, G. (2006) Statistical characterization of bacterial wild-type MIC value distributions and the determination of epidemiological cut-off values. Clin Microbial Infect 12: 418-425 doi: 10.1111/j.1469-0691.2006.01377.x

See Also

ecoffinder_nls

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## raw data contain NA values
data(micdata)
plot(freq ~ log2(conc), data=micdata, type="h")

## discard NA values
measured <- na.omit(micdata)

## cumulative plot
plot(cumsum(freq) ~ log2(conc), data=measured, type="l")

x <- log2(measured$conc)
y <- measured$freq

## heuristic start values
(pstart <- ecoffinder_startpar(x, y, method = "mean"))
(pstart <- ecoffinder_startpar(x, y, method = "mode"))
(pstart <- ecoffinder_startpar(x, y, method = "peak1"))

tpetzoldt/antibioticR documentation built on Sept. 25, 2021, 1:17 p.m.