Description Usage Arguments Details Value References See Also Examples
View source: R/ecoffinder_startpar.R
A heuristic function functon to estimate start values for the ECOFFinder.
1 | ecoffinder_startpar(x, y, method = c("peak1", "mode", "mean"), bw = "nrd0")
|
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 |
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.
vector with estimates for location, scale and total frequency
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
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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.