Public Health Research Toolkit

Plan Your Study With Confidence

Evidence-based sample size and power calculations for public health, epidemiology, clinical, and health research.

Explore Study Designs
9 Available calculators
PH Public-health focused
R Statistical engine
CALCULATORS

Choose Your Study Design

Select the statistical objective or epidemiologic design that best matches your research question.

01

Single Proportion

Estimate prevalence, coverage, risk, or another population proportion.

Available
02

Single Mean

Estimate a population mean with a predefined level of precision.

Available
03

Two Proportions

Compare proportions between two independent populations.

Available
04

Two Means

Compare continuous outcomes between two independent study groups.

Available
05

Case-Control

Estimate sample size using exposure prevalence and an expected odds ratio.

Available
06

Cohort Study

Compare outcome risks between exposed and unexposed populations.

Available
07

Cluster Survey

Account for clustering using cluster size and intra-cluster correlation.

Available
08

Diagnostic Accuracy

Estimate sample size for sensitivity, specificity, and diagnostic accuracy.

Available
09

Correlation

Calculate sample size required to detect a correlation coefficient.

Available
10

Regression

Planning for linear and logistic regression models.

Coming soon
11

Survival Analysis

Power and required events for time-to-event studies.

Coming soon
12

Non-Inferiority

Sample size for non-inferiority and equivalence studies.

Coming soon

Evidence-based

Each calculator documents the underlying statistical method, assumptions, formula, and methodological reference.

Designed for Researchers

Results include interpretation, intermediate calculations, and important adjustments rather than only a final number.

Public Health Oriented

Modules are designed around common epidemiologic and public-health research designs.

PANDUAN PEMILIHAN METODE METHOD SELECTION GUIDE

Bantu Pilih Kalkulator Help Me Choose

Jawab beberapa pertanyaan mengenai tujuan, outcome, dan desain studi. Aplikasi akan merekomendasikan kalkulator yang paling sesuai. Answer a few questions about the objective, outcome, and study design. The application will recommend the most appropriate calculator.

Karakteristik Studi Study Characteristics

Rekomendasi Recommendation

ANALISIS SENSITIVITAS SENSITIVITY ANALYSIS

Perbandingan Skenario Scenario Comparison

Bandingkan beberapa asumsi perencanaan penelitian dan lihat bagaimana perubahan effect size, power, design effect, atau loss memengaruhi kebutuhan sampel. Compare alternative research-planning assumptions and examine how changes in effect size, power, design effect, or loss affect sample-size requirements.

Metode Perhitungan Calculation Method

Parameter yang Sama untuk Semua Skenario Parameters Shared Across Scenarios

Parameter di bagian ini dipertahankan sama. Perbedaan antar-skenario diatur pada bagian berikutnya. Parameters in this section remain fixed. Scenario-specific assumptions are defined below.

Asumsi Setiap Skenario Scenario-Specific Assumptions

Gunakan Skenario A sebagai baseline, kemudian ubah Skenario B dan C untuk mengevaluasi asumsi alternatif. Use Scenario A as the baseline, then modify Scenarios B and C to evaluate alternative assumptions.

Ringkasan Perbandingan Comparison Summary

Kebutuhan Sampel Sample-Size Requirement

Interpretasi Perbandingan Interpreting the Comparison

Perbandingan skenario digunakan untuk menilai seberapa sensitif kebutuhan sampel terhadap perubahan asumsi. Scenario comparison evaluates how sensitive the required sample size is to changes in planning assumptions.

Skenario dengan jumlah sampel terbesar tidak otomatis menjadi pilihan terbaik. Gunakan asumsi yang paling dapat dipertanggungjawabkan berdasarkan literatur, data awal, atau pertimbangan substantif. The scenario requiring the largest sample is not automatically the best choice. Use assumptions that are scientifically defensible based on literature, pilot data, or substantive considerations.

TRANSPARANSI METODOLOGI METHODOLOGICAL TRANSPARENCY

Methods & Validation Center Methods & Validation Center

Halaman ini menjelaskan metode statistik yang digunakan, asumsi utama, keterbatasan, serta hasil pemeriksaan internal terhadap benchmark metodologis yang relevan. This page documents the statistical methods, key assumptions, limitations, and internal checks against relevant methodological benchmarks.


Uji Validasi Internal Internal Validation Tests

Status PASS berarti implementasi memenuhi benchmark yang ditentukan pada skenario pengujian tersebut. Status ini tidak berarti bahwa metode bebas dari seluruh asumsi atau keterbatasan metodologis. PASS indicates that the implementation met the specified benchmark for that test scenario. It does not imply that the method is free from methodological assumptions or limitations.

Validasi dilakukan pada skenario benchmark tertentu. Perubahan input, desain sampling kompleks, atau kondisi yang jauh dari asumsi metode tetap memerlukan pertimbangan statistik substantif. Validation is performed on selected benchmark scenarios. Alternative inputs, complex sampling, or conditions far from model assumptions still require substantive statistical judgment.

Matriks Metodologi Methodology Matrix

Complex Sampling dan Design Effect Complex Sampling and Design Effect

$$DEFF_{cluster}=1+(m-1)\rho$$

$$DEFF_{weight}=1+CV(w)^2$$

$$n_{effective}\approx\frac{n_{nominal}}{DEFF}$$

Penyesuaian DEFF pada aplikasi digunakan sebagai pendekatan perencanaan. Actual design effect dapat dipengaruhi oleh clustering, stratification, unequal weights, PPS, calibration, outcome yang dianalisis, dan interaksi antar-komponen desain. DEFF adjustments in the application are planning approximations. The actual design effect may depend on clustering, stratification, unequal weights, PPS, calibration, the outcome being analyzed, and interactions among design components.


Batas Penggunaan Scope and Limitations

  • Hasil merupakan alat perencanaan statistik dan tidak menggantikan penilaian desain penelitian. Results are statistical planning tools and do not replace study-design judgment.
  • Effect size, prevalensi, SD, ICC, event rate, dan parameter lain sebaiknya didasarkan pada literatur, pilot study, atau pertimbangan substantif. Effect size, prevalence, SD, ICC, event rate, and other assumptions should be supported by literature, pilot data, or substantive considerations.
  • DEFF untuk complex survey tidak boleh digunakan sebagai pengganti metode khusus cluster randomized trial. Complex-survey DEFF should not be used as a substitute for a dedicated cluster-randomized-trial method.
  • Survival Analysis versi saat ini menggunakan asumsi proportional hazards. The current Survival Analysis implementation assumes proportional hazards.
  • Multiple Linear Regression saat ini merupakan global model test berbasis R², bukan power untuk koefisien prediktor individual. The current Multiple Linear Regression module addresses the global R-squared model test rather than power for an individual regression coefficient.

Referensi Metodologis Utama Key Methodological References

  1. R Core Team. stats::power.t.test — Power calculations for one- and two-sample t tests.
  2. R Core Team. stats::power.prop.test — Power calculations for two-sample tests for proportions.
  3. Cohen J. Statistical Power Analysis for the Behavioral Sciences. 2nd ed. 1988.
  4. Schoenfeld DA. Sample-size formula for the proportional-hazards regression model. Biometrics. 1983;39(2):499–503.
  5. Buderer NM. Incorporating the prevalence of disease into the sample size calculation for sensitivity and specificity. Acad Emerg Med. 1996;3(9):895–900.
  6. Kish L. Survey Sampling. New York: Wiley; 1965.
  7. Valliant R, Dever JA, Kreuter F. Practical Tools for Designing and Weighting Survey Samples.
ESTIMATION

Sample Size for a Single Proportion

Estimate the sample required for prevalence, coverage, risk, or another population proportion using either absolute or relative precision.

Study Parameters


Sampling Design


Statistical Method

Step 1. Calculate the sample size required under simple random sampling.

$$ n_{SRS} = \frac{Z_{1-\alpha/2}^{2}p(1-p)}{d_{abs}^{2}} $$

For absolute precision, d_abs is entered directly. For relative precision r, the equivalent absolute precision is d_abs = r × p.

$$ d_{abs} = r \times p $$

Step 2. If a complex sampling design is used, the SRS requirement is adjusted by the design effect.

$$ n_{design} = n_{SRS} \times DEFF $$

Step 3. The design-adjusted sample is inflated for expected non-response.

$$ n_{final} = \frac{n_{design}}{1-r_{NR}} $$

Key References

  • Lwanga SK, Lemeshow S. Sample Size Determination in Health Studies. World Health Organization.
  • Cochran WG. Sampling Techniques. 3rd ed.
  • Kish L. Survey Sampling. John Wiley & Sons.
ESTIMATION

Sample Size for a Single Mean

Estimate the sample size required to estimate a population mean with a specified confidence level and absolute precision.

Study Parameters

Statistical Method

$$ n_0 = \frac{Z_{1-\alpha/2}^{2}\sigma^2}{d^2} $$

σ represents the expected population standard deviation and d is the desired absolute precision.

Key References

  • Lwanga SK, Lemeshow S. Sample Size Determination in Health Studies. WHO; 1991.
  • Cochran WG. Sampling Techniques. 3rd ed. Wiley; 1977.
COMPARISON & POWER ANALYSIS

Two Independent Proportions

Plan or evaluate a comparison of two independent proportions with optional complex-survey adjustment.

Study Parameters


Sampling Design

Power Curve

Method

The independent-sample calculation uses a normal approximation for the difference between two proportions.

For complex-survey planning, nominal sample size is approximated as independent-sample requirement × DEFF. Power calculations use n-effective ≈ n-nominal / DEFF.

COMPARISON & POWER ANALYSIS

Two Independent Means

Plan or evaluate a comparison of two independent means, with optional complex-survey planning adjustment.

Study Parameters


Sampling Design

Power Curve

Statistical Method

Under independent sampling, power is calculated using a non-central t distribution and Welch-Satterthwaite degrees of freedom.

$$ SE = \sqrt{\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}} $$

For complex-survey planning, the required independent sample is inflated by the selected design effect.

$$ n_{nominal} \approx n_{effective} \times DEFF $$

For prospective power or detectable-effect calculations under complex sampling, the calculator uses the planning approximation n_effective ≈ n_nominal / DEFF.

Paired Mean

Paired / Before–After Continuous Outcome
Use this calculator when the same individuals are measured twice or observations are naturally matched. The SD input is the standard deviation of the paired differences, not the SD of each measurement separately.

Paired Proportion — McNemar

Paired Binary Outcome
Use this design for paired binary observations such as before versus after status or individually matched observations. Only discordant pairs contribute information to the McNemar comparison.

One-Way ANOVA

Independent Groups
Use this calculator to compare the means of three or more independent groups. The current implementation assumes balanced allocation across groups.
EPIDEMIOLOGIC DESIGN & POWER

Unmatched Case-Control Study

Plan sample size, evaluate power, or estimate the minimum detectable odds ratio for an unmatched case-control study.

Study Parameters


Sampling Design

Power Curve

Method

The expected exposure prevalence among cases is derived from exposure prevalence among controls and the assumed OR.

$$ P_{case}=\frac{OR\times P_{control}}{1-P_{control}+OR\times P_{control}} $$

The resulting exposure proportions are treated as a two-independent-proportion comparison for planning.

EPIDEMIOLOGIC DESIGN & POWER

Cohort Study

Plan sample size, calculate statistical power, or determine a minimum detectable risk ratio.

Study Parameters


Sampling Design

Power Curve

Method

Outcome risk among exposed participants is derived from baseline risk among unexposed participants and the expected risk ratio.

$$ P_{exposed}=RR\times P_{unexposed} $$
CLUSTER SAMPLING

Sample Size for a Cluster Survey

Estimate sample size for a prevalence or proportion survey using cluster sampling, accounting for intra-cluster correlation and average cluster size.

Study Parameters

Statistical Method

The calculation first estimates the sample size required under simple random sampling.

$$ n_0 = \frac{Z_{1-\alpha/2}^{2}p(1-p)}{d^2} $$

The sample size is then multiplied by a design effect derived from the average cluster size and intra-cluster correlation coefficient.

$$ DEFF = 1 + (m-1)\rho $$

Where m is the average cluster size and ρ is the intra-cluster correlation.

Key References

  • Cochran WG. Sampling Techniques. 3rd ed. Wiley; 1977.
  • Kerry SM, Bland JM. The intracluster correlation coefficient in cluster randomisation. BMJ.
  • Lwanga SK, Lemeshow S. Sample Size Determination in Health Studies. WHO; 1991.
DIAGNOSTIC ACCURACY

Sample Size for Diagnostic Accuracy

Estimate the total sample required to achieve specified precision for sensitivity and specificity, taking expected disease prevalence into account.

Study Parameters

Statistical Method

The required number of participants with the condition is calculated from the anticipated sensitivity.

$$ n_{disease} = \frac{Z_{1-\alpha/2}^{2}Se(1-Se)} {d_{Se}^{2}} $$

The required number without the condition is similarly calculated from the anticipated specificity.

$$ n_{non-disease} = \frac{Z_{1-\alpha/2}^{2}Sp(1-Sp)} {d_{Sp}^{2}} $$

Expected disease prevalence is then used to determine the total number of participants required to satisfy both sensitivity and specificity precision targets.

Key Reference

  • Buderer NMF. Statistical methodology: I. Incorporating the prevalence of disease into the sample size calculation for sensitivity and specificity. Academic Emergency Medicine. 1996.
ASSOCIATION & POWER

Pearson Correlation

Calculate required sample size, statistical power, or the minimum detectable correlation.


Sampling Design

Power Curve

Method

Power calculations use Fisher's z transformation of the expected Pearson correlation coefficient.

$$ z_r=\frac{1}{2}\ln\left(\frac{1+r}{1-r}\right) $$

For complex sampling, nominal sample size is converted to an approximate effective sample using n/DEFF.

MODELING & POWER ANALYSIS

Multiple Linear Regression

Power analysis for the overall multiple-regression model using Cohen's f-squared and model R-squared.

Study Parameters


Sampling Design

Power Curve

Statistical Method

$$ f^2 = \frac{R^2}{1-R^2} $$

The calculator evaluates the overall F-test that the predictors jointly explain variation in the outcome.

For complex survey planning, nominal sample size is approximated from effective sample size using DEFF.

Scope: This version is for multiple linear regression. Logistic regression requires a different framework and will be developed separately.

Logistic Regression

Binary Outcome — Focal Predictor
This calculator estimates power or sample size for one focal predictor in a logistic regression model. Additional covariates can be represented through the R-squared adjustment.
TIME-TO-EVENT & POWER

Survival Analysis

Event-driven sample-size and power planning for a two-group log-rank comparison under the proportional-hazards assumption.

Study Parameters

Power Curve

Statistical Method

The calculator uses the Schoenfeld event-based approximation for a two-group proportional-hazards comparison.

$$ D = \frac{(Z_{1-\alpha}+Z_{1-\beta})^2}{p_1p_2[\log(HR)]^2} $$

D is the required number of observed events. Total sample size additionally depends on the anticipated proportion of participants experiencing the event during follow-up.

Important: This approximation assumes proportional hazards. Delayed effects, crossing hazards, substantial non-proportional hazards, or complex accrual/censoring may require simulation-based planning.

ADVANCED STUDY DESIGN

Non-Inferiority: Two Independent Means

Plan a parallel-group non-inferiority study for a continuous outcome.

Study Parameters

Statistical Method

The current implementation assumes that larger outcome values are better. The non-inferiority null boundary is treatment-control = -Margin.

$$ H_0:\mu_T-\mu_C\leq-\Delta \quad ; \quad H_1:\mu_T-\mu_C>-\Delta $$

Sample size depends on the distance between the expected true difference and the non-inferiority boundary.

Scope: This first version covers continuous outcomes. Non-inferiority for proportions and equivalence should be implemented as separate methods.

Cluster Randomized Trial

Parallel Two-Arm Cluster Randomized Trial
Use this calculator when entire clusters such as schools, villages, clinics, hospitals, or communities are randomized to intervention or control.

The cluster size entered below should represent the expected average analyzable number of individuals per cluster.
Use CV = 0 for approximately equal cluster sizes. For unequal cluster sizes, CV = SD(cluster size) / mean(cluster size).