Get Power Calculations as List
get_power(study, values = FALSE)
A study list object with class scivrs_study
Whether or not to retun criterion values (default FALSE)
a list of power (and criteria) values
study() %>%
add_hypothesis("H1") %>%
add_analysis("A1", t.test(y~B1, data = D1)) %>%
add_criterion("C1", "p.value", "<", 0.05) %>%
add_analysis("A2", t.test(y~B1, data = D2)) %>%
add_criterion("C2", "p.value", "<", 0.05) %>%
add_eval("corroboration", "C1 & C2") %>%
add_eval("falsification", "!C1 & !C2") %>%
add_sim_data("D1", between = 2, n = 25, mu = c(0, 0.5)) %>%
add_sim_data("D2", between = 2, n = 50, mu = c(0, 0.5)) %>%
study_power(rep = 100) %>%
get_power()
#> id set to dataType string
#> B1 set to dataType string
#> y set to dataType float
#> id set to dataType string
#> B1 set to dataType string
#> y set to dataType float
#> Simulating Datasets...
#> Simulating Datasets...
#> Running Analyses...
#> Evaluating Hypotheses...
#> Hypothesis H1
#> corroboration: 27.0%
#> falsification: 25.0%
#> inconclusive: 48.0%
#> $power
#> $power$H1
#> $power$H1$corroboration
#> [1] 0.27
#>
#> $power$H1$falsification
#> [1] 0.25
#>
#> $power$H1$inconclusive
#> [1] 0.48
#>
#>
#>