if (FALSE) {
# 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")))
}
Run the code above in your browser using DataLab