Skip to contents

Simple power analysis and sample size calculation for survival studies. User-friendly interface for basic survival power calculations with multiple statistical methods.

Usage

simpleSurvivalPower(
  clinical_preset = "custom",
  analysis_type = "sample_size",
  test_type = "log_rank",
  study_design = "two_arm_parallel",
  primary_endpoint = "overall_survival",
  effect_size_type = "hazard_ratio",
  effect_size = 0.75,
  alpha_level = 0.05,
  power_level = 0.8,
  allocation_ratio = 1,
  sample_size_input = 200,
  control_median_survival = 12,
  survival_distribution = "exponential",
  weibull_shape = 1,
  accrual_period = 24,
  follow_up_period = 12,
  accrual_pattern = "uniform",
  dropout_rate = 0.05,
  ni_margin = 1.25,
  ni_type = "relative_margin",
  competing_risk_rate = 0.1,
  competing_risk_hr = 1,
  rmst_tau = 36,
  rmst_difference = 3,
  snp_maf = 0.3,
  genetic_model = "additive",
  number_of_arms = 3,
  multiple_comparisons = "dunnett",
  interim_analyses = 0,
  alpha_spending = "none",
  stratification_factors = 0,
  cluster_size = 50,
  icc = 0.05,
  sensitivity_analysis = FALSE,
  simulation_runs = 10000
)

Arguments

clinical_preset

Pre-configured parameter sets for common clinical trial designs. Selecting a preset will automatically populate appropriate values.

analysis_type

Type of power analysis to perform

test_type

Type of statistical test for power calculation

study_design

Overall study design type

primary_endpoint

Primary survival endpoint

effect_size_type

Type of effect size specification

effect_size

Expected effect size (HR, median ratio, or difference)

alpha_level

Significance level (two-sided)

power_level

Desired statistical power

allocation_ratio

Ratio of control to experimental group sizes

sample_size_input

Total sample size to use when calculating power, effect size, or duration

control_median_survival

Expected median survival in control group

survival_distribution

Assumed survival distribution

weibull_shape

Shape parameter for Weibull distribution

accrual_period

Patient recruitment period

follow_up_period

Additional follow-up after recruitment ends

accrual_pattern

Pattern of patient accrual over time

dropout_rate

Annual rate of loss to follow-up

ni_margin

Non-inferiority margin (hazard ratio scale)

ni_type

Type of non-inferiority margin

competing_risk_rate

Annual rate of competing risk events

competing_risk_hr

Treatment effect on competing risks

rmst_tau

Restriction time for RMST analysis

rmst_difference

Expected difference in restricted mean survival time

snp_maf

Minor allele frequency for SNP analysis

genetic_model

Genetic inheritance model

number_of_arms

Total number of treatment arms (including control)

multiple_comparisons

Method for multiple comparisons adjustment

interim_analyses

Number of planned interim analyses

alpha_spending

Alpha spending function for interim analyses

stratification_factors

Number of stratification factors

cluster_size

Average cluster size for cluster randomized trials

icc

ICC for cluster randomized trials

sensitivity_analysis

Perform sensitivity analysis across parameter ranges

simulation_runs

Number of simulation runs for complex calculations

Value

A results object containing:

results$instructionsa html
results$power_summarya table
results$sample_size_resultsa table
results$power_resultsa table
results$effect_size_resultsa table
results$study_duration_resultsa table
results$assumptions_tablea table
results$competing_risks_tablea table
results$non_inferiority_tablea table
results$rmst_analysis_tablea table
results$snp_analysis_tablea table
results$multi_arm_tablea table
results$interim_analysis_tablea table
results$sensitivity_analysis_tablea table
results$regulatory_tablea table
results$power_curve_plotan image
results$sample_size_plotan image
results$survival_curves_plotan image
results$accrual_timeline_plotan image
results$sensitivity_plotan image
results$clinical_interpretationa html

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$power_summary$asDF

as.data.frame(results$power_summary)

Details

This function provides a streamlined approach to survival power analysis. For specialized needs, consider the other power analysis functions: Classical, Competing Risks, Advanced, or Comprehensive.

Examples

simpleSurvivalPower(
    test_type = "log_rank",
    effect_size = 0.75,
    alpha = 0.05,
    power = 0.80,
    allocation_ratio = 1,
    accrual_period = 24,
    follow_up_period = 36
)