Description Usage Arguments Details Value References See Also Examples
View source: R/ecoffinder_nls.R
Identifies the wild-type sub-population by fitting a cumulative normal distribution to subsets of MIC or ID data.
1 2 3 4 5 6 7 8 |
conc |
concentration of the antibiotic |
count |
raw frequency |
startpar |
start parameters for the nonlinear search, or "mode" resp. "mean" for an automatic determination |
concentrations |
which concentrations are tested |
log2 |
logical determining if conc are log-transformed or not |
plot |
logical, switch visualization on or off |
Start values for the nonlinear regression can be automatically
determined with function ecoffinder_startpar
.
The default search interval starts one concentration level above the mode resp. mean.
an object of class abr_ecoffinder-class
containing the fitted
parameters and statistics of the final and intermediate fits.
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
ecoffinder_startpar
for heuristic methods to guess start parameters
ECOFFinder
for an interactice shiny app
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## 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)
pstart
## nonlinear regression
p <- ecoffinder_nls(x, y, pstart)
summary(p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.