test_veris_proportion | R Documentation |
Use to test statements like "Everything Else is greater than 20 chunk <- vcdb dplyr::filter(plus.dbir_year dplyr::filter(attribute.confidentiality.data_disclosure.Yes) verisr::getenumCI2020("pattern.Everything Else", force=TRUE, ci.method="bootstrap") chunk enum x n freq method lower upper 1 Everything Else 42 271 0.15498 bootstrap 0.1141 0.19982 dbirR::test_veris_proportion(chunk, "Everything Else", .11, "greater") The hypothesis is TRUE because the confidence of 98.90 [1] TRUE
test_veris_proportion(
chunk,
Ea,
prop,
direction,
ci.level = 0.05,
reps = 1000,
quietly = FALSE,
visualize = FALSE
)
chunk |
getenumCI() object |
Ea |
Enumeration A. e.g. "action.Error" |
prop |
the value to test against |
direction |
the direction to test ("greater", "less", ) |
ci.level |
the confidence level to test against |
reps |
number of simulations to conduct |
quietly |
do not produce textual output |
visualize |
produce visual output |
You want to write in a report "Everything else is equal to 21 chunk <- vcdb dplyr::filter(plus.dbir_year dplyr::filter(attribute.confidentiality.data_disclosure.Yes) verisr::getenumCI2020("pattern.Everything Else", force=TRUE, ci.method="bootstrap") chunk enum x n freq method lower upper 1 Everything Else 42 271 0.15498 bootstrap 0.1141 0.19982 dbirR::test_veris_proportion(chunk, "Everything Else", .15, "equal") The hypothesis is TRUE because the proportion of 15 [1] TRUE
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.
WARNING: This currently only works with 'logical' columns
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 %>%
dplyr::filter(plus.dbir_year %in% 2019) %>%
dplyr::filter(attribute.confidentiality.data_disclosure.Yes) %>%
verisr::getenumCI2020("pattern.Everything Else", force=TRUE, ci.method="bootstrap") %>%
verisr::test_veris_proportion("Everything Else", .11, "greater")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.