test_veris_consistency | R Documentation |
This is most useful for testing an enumerations whether an enumeration has stayed the same since last year. It functions by creating an null distribution around the observed proportion, and then checking the probability of the proportion being 0 (i.e. no change).
test_veris_consistency(
chunk,
Ea,
Eb,
ci.level = 0.05,
reps = 1000,
quietly = FALSE,
visualize = FALSE
)
chunk |
getenumCI() object |
Ea |
Enumeration A. e.g. "action.Error" |
Eb |
Enumeration B. e.g. "action.Misuse" |
ci.level |
the confidence level to test against |
reps |
number of simulations to conduct |
quietly |
do not produce textual output |
visualize |
produce visual output |
Technically instead of 'true/false', the language should really be along the lines of "we have evidence for the alternative hypothesis ..." or "we do not have evidence to go against our original null hypothesis ...", but for simplicity we have left it the way it is.
a logical TRUE/FALSE to the hypothesis
## Not run:
tmp <- tempfile(fileext = ".dat")
download.file("https://github.com/vz-risk/VCDB/raw/master/data/verisr/vcdb.dat", tmp, quiet=TRUE)
load(tmp, verbose=TRUE)
vcdb %>%
filter(timeline.incident.year %in% 2015:2020) %>%
filter(attribute.confidentiality.data_disclosure.Yes) %>%
verisr::getenumCI2020(
"attribute.confidentiality.data.variety",
by="plus.dbir_year") %>%
filter(!is.na(by)) %>%
filter(enum == "Bank") %>%
select(-enum) %>%
rename(enum = by) %>%
verisr::test_veris_consistency(Ea="2019", Eb="2020")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.