precision_plot | R Documentation |
This function visualizes what is described in the CLSI EP12 guideline for qualitative test with internal continuous response (ICR). The hit rate, i.e. the number of measurements deemed to have a certain condition. The C5 and C95 concentrations will be derived per default by this function but it can be set to any set of hit rates. The histograms representing normal distribution of imprecisions at specific concentrations will be scaled to nicely fit into the plot, i.e. the area under the plot will not be equal to 1.
precision_plot(
vfp,
model.no = NULL,
cutoff,
prob = c(0.05, 0.5, 0.95),
col = c("blue", "black", "red"),
Cutoff = list(),
Title = list(),
Xlabel = list(),
Ylabel = list(),
HRLine = list(),
Legend = FALSE,
nclass = -1,
BG = "gray90",
digits = 3,
alpha = 0.15,
alpha2 = 0,
xlim = NULL,
col.grid = "white",
Nrand = 1e+06
)
vfp |
(VFP) object modeling imprecision over the measuring range |
model.no |
(integer) specifying the VFP-model to used |
cutoff |
(numeric) specifying one or two cutoff(s), the latter will implicitly define an equivical zone with implications on how 'prob' will be interpreted (see 'prob' for details) |
prob |
(numeric) values 0 < x < 1 specifying coverage probability of an respecitive normal distribution at cutoff, in case of two cutoffs all elements of 'prob' < 0.5 will be evaluated in regard to cutoff 1, and all 'prob' > 0.5 in regard to cutoff 2 |
col |
(character) strings specifying colors of the different distributions, which will be plotted semi-transparent using 'alpha1' for specifying the level of transparency (1=opaque, 0=fully transparent) |
Cutoff |
(list) specifying all parameters of the |
Title |
(list) specifying all parameters applicable in function
|
Xlabel |
(list) specifying all parameters applicable in function
|
Ylabel |
(list) specifying all parameters applicable in function
|
HRLine |
(list) specifying all parameters applicable in |
Legend |
(logical) TRUE = a legend is added to the plot |
nclass |
(integer) number of classes in the histograms representing normal distributions of imprecision at Cx-concentrations, number<10 will lead to automatically determining appropriate numbers per histogram (default) |
BG |
(character) string specifying a background color |
digits |
(integer) number of significant digits used to indicated concentrations Cx |
alpha |
(numeric) value 0<=x<=1 specifying the level of transparency of histograms |
alpha2 |
(numeric) similar to 'alpha' referring to the coverage probability, i.e. setting it to a value < 0 will highlight coverage probabilities in histograms |
xlim |
(numeric) plotting limits in X-direction |
col.grid |
(character) string specifying a color name to be used for the grid providing orientation in X- and Y-direction |
Nrand |
(integer) specifying the number of data points simulated to represent a normal distribution |
Andre Schuetzenmeister andre.schuetzenmeister@roche.com
## Not run:
# perform variance component analysis
library(VCA)
data(VCAdata1)
# perform VCA-anaylsis
lst <- anovaVCA(y~(device+lot)/day/run, VCAdata1, by="sample")
# transform list of VCA-objects into required matrix
mat <- get_mat(lst) # automatically selects "total"
mat
# fit all models batch-wise, the best fitting will be used automatically
res <- fit_vfp(model.no=1:9, Data=mat)
# plot hit and visualize imprecision usign default settings
precision_plot(res, cutoff=20)
# without normal distribution at cutoff do
precision_plot(res, cutoff=20, prob=c(.05, .95), col=c("blue", "red"))
# highlight the proportion > cutoff (hit rate) more
precision_plot(res, cutoff=20, prob=c(.05, .95), col=c("blue", "red"), alpha2=.5)
# plot with legend
precision_plot(res, cutoff=20, prob=c(.05, .95), col=c("blue", "red"), alpha2=.5, Legend=TRUE)
# use different probabilities and colors
precision_plot(res, cutoff=20, prob=c(.05, .95), col="black", alpha2=.3)
# now using two cutoffs, i.e. with equivocal zone
precision_plot( res, cutoff=c(17, 19), prob=c(.05, .95), col=c("mediumblue", "red3"),
alpha2=.5, HRLine=list(col=c("mediumblue", "red3")))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.