Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SampleSizeR

R-CMD-check CRAN status

Overview

SampleSizeR is an R package for sample size determination in epidemiological, clinical, and diagnostic research. The package provides easy-to-use functions for commonly used study designs while automatically accounting for finite population correction, design effect, response rate, and anticipated dropout.

The package returns standardized S3 objects with methods for printing, summarizing, plotting, and exporting results.


Installation

From CRAN

install.packages("SampleSizeR")

Development version

install.packages("remotes")

remotes::install_github("USERNAME/SampleSizeR")

Implemented Study Designs

Epidemiological Studies

  • Cross-sectional prevalence studies
  • Cluster prevalence studies
  • Cohort studies
  • Case-control studies

Clinical Trials

  • Parallel clinical trials
  • Superiority trials
  • Non-inferiority trials
  • Equivalence trials

Diagnostic Studies

  • Diagnostic sensitivity
  • Diagnostic specificity
  • ROC AUC studies
  • Diagnostic agreement studies

Features

  • Confidence interval based calculations
  • Power-based sample size estimation
  • Finite population correction
  • Cluster design effect adjustment
  • Response rate adjustment
  • Dropout adjustment
  • Publication-ready summaries
  • Built-in plotting methods
  • Data frame conversion

Example 1: Prevalence Study

library(SampleSizeR)

result <- ss_prevalence(
  prevalence = 0.20,
  precision = 0.05,
  conf.level = 0.95
)

print(result)
summary(result)
plot(result)

Example 2: Cohort Study

cohort <- ss_cohort(
  p0 = 0.15,
  risk.ratio = 2,
  power = 0.80
)

summary(cohort)

Example 3: Diagnostic Sensitivity

diag <- ss_diagnostic_sensitivity(
  sensitivity = 0.90,
  precision = 0.05
)

diag

Output

All functions return a SampleSizeR object.

class(result)

[1] "SampleSizeR"

Supported methods

print(result)

summary(result)

plot(result)

as.data.frame(result)

Documentation

help(package = "SampleSizeR")

or

?ss_prevalence

Citation

If you use SampleSizeR in published research, please cite:

Vinodh Kumar OR (2026).

SampleSizeR: Sample Size Determination for Epidemiological, Clinical and Diagnostic Studies.


Bug Reports

Please report bugs and feature requests at

https://github.com/USERNAME/SampleSizeR/issues


License

GPL-3

About

Provides comprehensive methods for sample size determination for epidemiological studies, clinical trials, diagnostic accuracy studies, and diagnostic agreement studies

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages