This function is experimental. Check power analyses with an external package before using for important decisions.
study_power(study, rep = 100)
A study list object with class scivrs_study
The number of simulations to run
A study object with class scivrs_study
study <- 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)
#> 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: 30.0%
#> falsification: 17.0%
#> inconclusive: 53.0%