PSpower  ·  V0.3 DEMO

Sample size & power calculator for comparative effectiveness studies (RCT and observational studies)

design-stage tool
CRAN: PSpower ↗
Citations

Please use the following citations when using this calculator:

  1. Liu, B., Yang, C. & Li, F. (2026). Sample size and power calculations for causal inference in observational studies. Annals of Statistics, 54 (4) 2191–2208, 2026. doi:10.1214/26-AOS2649 ↗
  2. Yang, C., Liu, B. & Li, F. (2026). Sample size and power calculations for causal inference from observational data with time-to-event outcomes. arXiv:2605.10088 ↗
Computing a sample size

Enter the design-stage inputs, including significance level, target power, and treatment proportion, to get the minimum sample size (or achieved power) for three target populations: overall (ATE), overlap (ATO), or treated (ATT).

  • Continuouseffect size (Cohen's d), overlap coefficient, and confounding coefficient.
  • Binaryrisks in control and treatment, overlap coefficient, and confounding coefficient.
  • Time-to-eventtargeted marginal hazard ratio, event rates in control and treatment, and overlap coefficient.

Optionally, add an expected attrition rate to inflate the sample size into an enrollment target.

Inverting to power

Switch the Calculate control (top of panel 1) from "Sample size" to "Power" to run the calculation in reverse: enter a fixed sample size and the calculator returns the power it achieves, instead of the sample size needed for a target power.

Overlap coefficient and confounding coefficient

Overlap coefficient: how similar the treatment and control groups are, measured by the overlap coefficient of their propensity-score distributions (Inman & Bradley, 1989): the probability mass shared by the two distributions. Equivalently, the overlap coefficient is the largest possible probability that a randomly drawn treated patient and a randomly drawn control patient have the same propensity score. It equals 1 in randomized trials; lower values mean the groups look less alike. Yang, Liu & Li (2026) recommend the following rule of thumb:

  • < 0.50very poor overlap
  • 0.50 – 0.65poor
  • 0.65 – 0.75moderate
  • ≥ 0.75good

Confounding coefficient: captures whether the same patient factors that drove the treatment decision are also driving the outcome. 0 means no confounding (RCT-equivalent); larger values mean stronger confounding. Liu, Yang & Li (2026) recommend values close to zero as the default, absent additional evidence of stronger confounding.

Sensitivity analysis: both are usually uncertain at the design stage. We recommend sliding each over a plausible range and reporting the sample size as an interval, for example, reporting the sample size under overlap coefficients of 0.65, 0.75, and 0.85 to reflect poor, moderate, and good overlap, and confounding coefficients of 0.01, 0.08, and 0.15 to reflect slight, moderate, and severe confounding.

Target population

The treatment effect is defined relative to a target population, that is, the population for which the effect is of interest. The choice is primarily based on scientific questions and goals. Computationally, ATO is most efficient when overlap is poor.

  • ATO Average Treatment effect on the Overlap population — the effect on patients for whom either treatment is plausible (clinical equipoise). Most robust choice when overlap is poor. Uses overlap weights.
  • ATE Average Treatment Effect on the Overall population — the effect on the full study population, containing everyone in the study sample. Uses inverse-probability weights.
  • ATT Average Treatment effect on the Treated population — the effect on patients who actually received the treatment. Uses treated propensity-score weights.
More resources
  • R packagePSpower on CRAN — canonical implementation
  • Bug reportsOpen an issue on the package's GitHub repository
RHC data background

The Right Heart Catheterization (RHC) study (Connors et al., 1996, JAMA) evaluated the treatment effect of RHC, an invasive monitoring procedure, in critically ill patients. The dataset contains 5,735 patients. Evidence since has suggested RHC does not improve, and may worsen, clinical outcomes. We illustrate the calculator with three endpoints from this literature:

  • ContinuousHospital length of stay
  • Binary30-day mortality
  • Time-to-eventTime to death within 180 days
Design and Input

Suppose researchers use RHC data to design a new study. They expect a treatment proportion of about 0.40, matching the RHC data. Since RHC patients differ systematically from those who aren't catheterized, they also expect poor to moderate overlap: an overlap coefficient of 0.65, with a sensitivity range of 0.55–0.75. Since RHC data is retrospective, no attrition is anticipated. Given the poor to moderate overlap, they compute results for the overall (ATE), overlap (ATO), and treated (ATT) populations. For each outcome, the smallest effect they consider clinically meaningful:

  • ContinuousEffect size (Cohen's d) of 0.20 on length of stay (small to moderate, roughly 2 extra days on a 10-day SD), confounding coefficient of 0.02 (the default)
  • Binary30-day mortality rising from 30% to 35%
  • Time-to-event180-day event rates of 0.55 (RHC) and 0.50 (control); marginal hazard ratio of 1.1, RHC opposing treatment (raising the risk of death)
Sample size calculation

They calculate the sample size using the calculator with the inputs specified above, using a one-sided test at a significance level of 0.05 and 80% power.

Required sample size at an overlap coefficient of 0.65 (sensitivity range 0.55–0.75 in parentheses)
OutcomeATEATOATT
Continuous920 (743 – 1,522)781 (708 – 905)1,014 (780 – 1,743)
Binary3,203 (2,586 – 5,298)2,717 (2,463 – 3,148)3,530 (2,714 – 6,069)
Time-to-event7,802 (6,156 – 29,226)6,484 (5,905 – 7,374)8,322 (6,488 – 14,448)
Power calculation

Suppose instead they already have the full RHC-sized cohort (5,735 patients) and want to test all three outcomes simultaneously, using a Bonferroni-corrected significance level of 0.05/3 ≈ 0.017 and a one-sided test. They calculate the achieved power for each outcome using the calculator with the same inputs.

Achieved power at an overlap coefficient of 0.65 (sensitivity range 0.55–0.75 in parentheses)
OutcomeATEATOATT
Continuous100.0% (99.7 – 100.0%)100.0% (100.0 – 100.0%)100.0% (99.1 – 100.0%)
Binary88.5% (67.7 – 94.2%)93.1% (89.0 – 95.2%)85.1% (61.4 – 93.1%)
Time-to-event50.2% (15.2 – 60.7%)58.3% (52.6 – 62.6%)47.5% (28.7 – 58.3%)

1Test setup

Study type
Calculate
Estimand
Sidedness
0.050
0.80

2Study characteristics

0.200
0.500
0.000

3Confounding

propensity-score overlap: good
0.750
0.50 0.65 0.75 0.85 0.95 1
confounding between treatment decision and outcome
0.020
0 0.05 0.10 0.15
Required sample size: — units continuous
—
Propensity Score by Arm
treated control
Sample Size vs Effect size —

Citations

Please use the following citations when using this calculator:

  1. Liu, B., Yang, C. & Li, F. (2026). Sample size and power calculations for causal inference in observational studies. Annals of Statistics, 54 (4) 2191–2208, 2026. doi:10.1214/26-AOS2649 ↗
  2. Yang, C., Liu, B. & Li, F. (2026). Sample size and power calculations for causal inference from observational data with time-to-event outcomes. arXiv:2605.10088 ↗