The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Choosing a Power Analysis

ggpower organizes power analysis around the question being asked.

Example: Planning a One-Sample Mean Test

Suppose a clinical scale has a baseline mean of 10, the expected mean is 15, and the standard deviation is 8. The effect size is:

d <- effect_size_d(mean_h1 = 15, mean_h0 = 10, sd = 8)
d
#> [1] 0.625

For a one-tailed test with alpha = 0.05 and target power = 0.95:

power_compute("t_one_sample", "a_priori", d = d, alpha = 0.05,
              power = 0.95, tails = "one")
#> ggpower result
#> Test: t test: Means - difference from constant (one sample case)
#> Analysis: a_priori
#> 
#> Input parameters
#>   tails: greater
#>   effect_size_d: 0.625
#>   alpha: 0.05
#>   total_sample_size: 30
#>   target_power: 0.95
#> 
#> 
#> Output parameters
#>   noncentrality_parameter: 3.423266
#>   critical_t: 1.699127
#>   df: 29
#>   actual_power: 0.9551444
#> 
#> 
#> Notes
#> - A priori sample sizes are rounded up to integer values and actual power is recomputed.

Choosing tests

Use ggpower_tests() to inspect supported families, domains, and modules. The package registers 48 tests across workspace, biomarker, and clinical workflows.

ggpower_tests()[, c("id", "family", "domain", "module")]
#>                                                            id           family
#> t_one_sample                                     t_one_sample          t tests
#> t_paired                                             t_paired          t tests
#> t_two_sample                                     t_two_sample          t tests
#> t_point_biserial                             t_point_biserial          t tests
#> t_linear_regression                       t_linear_regression          t tests
#> t_linear_regression_two_groups t_linear_regression_two_groups          t tests
#> t_generic                                           t_generic          t tests
#> f_anova_one_way                               f_anova_one_way          F tests
#> f_anova_special                               f_anova_special          F tests
#> f_mreg_omnibus                                 f_mreg_omnibus          F tests
#> f_mreg_increase                               f_mreg_increase          F tests
#> f_variance_two                                 f_variance_two          F tests
#> chisq_variance_one                         chisq_variance_one chi-square tests
#> chisq_gof                                           chisq_gof chi-square tests
#> chisq_contingency                           chisq_contingency chi-square tests
#> exact_binomial                                 exact_binomial            Exact
#> exact_one_proportion                     exact_one_proportion            Exact
#> exact_sign                                         exact_sign            Exact
#> exact_fisher                                     exact_fisher            Exact
#> exact_mcnemar                                   exact_mcnemar            Exact
#> exact_correlation                           exact_correlation            Exact
#> exact_mreg_random                           exact_mreg_random            Exact
#> z_corr_independent                         z_corr_independent          z tests
#> z_corr_dependent_common               z_corr_dependent_common          z tests
#> z_corr_dependent_no_common         z_corr_dependent_no_common          z tests
#> z_logistic                                         z_logistic          z tests
#> z_poisson                                           z_poisson          z tests
#> z_tetrachoric                                   z_tetrachoric          z tests
#> wilcoxon_signed                               wilcoxon_signed    nonparametric
#> wilcoxon_mann_whitney                   wilcoxon_mann_whitney    nonparametric
#> roc_auc_one                                       roc_auc_one        biomarker
#> roc_auc_two                                       roc_auc_two        biomarker
#> diagnostic_acc                                 diagnostic_acc        biomarker
#> survival_logrank                             survival_logrank        biomarker
#> cox_regression                                 cox_regression        biomarker
#> discovery_fdr                                   discovery_fdr        biomarker
#> ttest_biomarker                               ttest_biomarker        biomarker
#> rct_superiority_continuous         rct_superiority_continuous         clinical
#> rct_superiority_binary                 rct_superiority_binary         clinical
#> rct_noninferiority_continuous   rct_noninferiority_continuous         clinical
#> rct_noninferiority_binary           rct_noninferiority_binary         clinical
#> rct_equivalence_continuous         rct_equivalence_continuous         clinical
#> rct_equivalence_proportion         rct_equivalence_proportion         clinical
#> simon_two_stage                               simon_two_stage         clinical
#> cluster_rct                                       cluster_rct         clinical
#> multi_arm_superiority                   multi_arm_superiority         clinical
#> count_endpoint_poisson                 count_endpoint_poisson         clinical
#> survival_pmu                                     survival_pmu         clinical
#>                                   domain    module
#> t_one_sample                     general workspace
#> t_paired                         general workspace
#> t_two_sample                     general workspace
#> t_point_biserial                 general workspace
#> t_linear_regression              general workspace
#> t_linear_regression_two_groups   general workspace
#> t_generic                        general workspace
#> f_anova_one_way                  general workspace
#> f_anova_special                  general workspace
#> f_mreg_omnibus                   general workspace
#> f_mreg_increase                  general workspace
#> f_variance_two                   general workspace
#> chisq_variance_one               general workspace
#> chisq_gof                        general workspace
#> chisq_contingency                general workspace
#> exact_binomial                   general workspace
#> exact_one_proportion             general workspace
#> exact_sign                       general workspace
#> exact_fisher                     general workspace
#> exact_mcnemar                    general workspace
#> exact_correlation                general workspace
#> exact_mreg_random                general workspace
#> z_corr_independent               general workspace
#> z_corr_dependent_common          general workspace
#> z_corr_dependent_no_common       general workspace
#> z_logistic                       general workspace
#> z_poisson                        general workspace
#> z_tetrachoric                    general workspace
#> wilcoxon_signed                  general workspace
#> wilcoxon_mann_whitney            general workspace
#> roc_auc_one                    biomarker biomarker
#> roc_auc_two                    biomarker biomarker
#> diagnostic_acc                 biomarker biomarker
#> survival_logrank               biomarker biomarker
#> cox_regression                 biomarker biomarker
#> discovery_fdr                  biomarker biomarker
#> ttest_biomarker                biomarker biomarker
#> rct_superiority_continuous        pharma  clinical
#> rct_superiority_binary            pharma  clinical
#> rct_noninferiority_continuous     pharma  clinical
#> rct_noninferiority_binary         pharma  clinical
#> rct_equivalence_continuous        pharma  clinical
#> rct_equivalence_proportion        pharma  clinical
#> simon_two_stage                   pharma  clinical
#> cluster_rct                       pharma  clinical
#> multi_arm_superiority             pharma  clinical
#> count_endpoint_poisson            pharma  clinical
#> survival_pmu                      pharma  clinical

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.