Description Usage Arguments Details Value References Examples
View source: R/estimateCutoff.R
The function estimateCutoff contains an algorithm designed to estimate an Epidemiological Cutoff Value of Zone Data pairings of bacteria and antibiotics. The method was inspired by the paper "Statistical characterisation of bacterial wild-type MIC value distributions and the determination of epidemiological cut-off values".
1 2 | estimateCutoff(obs, diam = 6:50, start = "mean", fit = "n_abs",
q = 0.0075, plot = FALSE)
|
obs |
numeric vector giving the absolute frequency of observations per diameter |
diam |
numeric vector containing the diameter range (in mm), same length as obs, with default from 6:50 |
start |
method for estimating mean start parameter; default: "mean", other option: "peak1" |
fit |
criterium for the fit; default: "n_abs", other options: "Pmean", "Psd", "Pn", "sigma" |
q |
numeric value for the quantile of the distribution; default: 0.0075 |
plot |
logical; if FALSE (default) no plot is drawn |
Normal distributions are fitted to several subsets of the data, where (a part of) the most resistant data is removed. For this, Nonlinear Least Squares is used, which needs to be initzialized with starting values.
There are two options to estimate the start value of the parameter mean of the fitted normal distribution:
"mean" = weighted mean
"peak1" = the rightmost peak of the kernel density estimate, which surpasses a certain share (12.5 This can be especially useful, if the resistant observations also resemble a normal distribution.
To determine the subset which yields the best fitted normal distribution, one of the following criteria needs to be chosen:
n_abs: the absolute deviation of the estimated number of observations in the subset to N
Pmean: the p-value of the parameter mean in the NLS model
Psd: the p-value of the parameter sd in the NLS model
Pn: the p-value of the parameter n in the NLS model
sigma: a parameter of the nls-function, which is the square root of the estimated variance of the random error
Here, the default value is "n_ab", which is also used in the original algorithm for MIC data.
numeric value, estimate for the ECOFF
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 | data("ZD", package = "EUCASTData") #load data
observations <- as.numeric(ZD[706,4:48])
estimateCutoff(observations, start = "peak1", fit = "n_abs", plot=TRUE)
example1 <- as.numeric(subset(ZD, Antimicrobial == "Ampicillin" & Bacterium == "Escherichia coli",
grepl("^Z", colnames(ZD))))
estimateCutoff(example1, start = "peak1", fit = "n_abs", plot=TRUE)
example2 <- as.numeric(subset(ZD, Antimicrobial == "Piperacillin" & Bacterium == "Escherichia coli",
grepl("^Z", colnames(ZD))))
estimateCutoff(example2, start = "peak1", fit = "n_abs", plot=TRUE)
example3 <- as.numeric(subset(ZD, Antimicrobial == "Mecillinam" & Bacterium == "Escherichia coli",
grepl("^Z", colnames(ZD))))
estimateCutoff(example3, start = "peak1", fit = "n_abs", plot=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.