Sample Size and Power Calculation for Common Non-Parametric Tests in Survival Analysis
Overview
A number of statistical tests have been proposed to compare two survival curves, including the difference in (or ratio of) t-year survival, difference in (or ratio of) p-th percentile survival, difference in (or ratio of) restricted mean survival time, and the weighted log-rank test. Despite the multitude of options, the convention in survival studies is to assume proportional hazards and to use the unweighted log-rank test for design and analysis. This package provides sample size and power calculation for all of the above statistical tests with allowance for flexible accrual, censoring, and survival (eg. Weibull, piecewise-exponential, mixture cure). It is the companion R package to the paper by Yung and Liu (2020) doi:10.1111/biom.13196. Specific to the weighted log-rank test, users may specify which approximations they wish to use to estimate the large-sample mean and variance. The default option has been shown to provide substantial improvement over the conventional sample size and power equations based on Schoenfeld (1981) doi:10.1093/biomet/68.1.316.
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 14
- Examples that run
- 100%9 run in a plain check
- Exported functions with examples
- 64%
- Documented parameters
- 88%
- Return-value docs
- 100%
- Help pages citing references
- 29%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 432
- Median days to close, 50 most recently updated closed PRs
- 17
Stars over time
Forks over time
Issues over time
PRs over time
2 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/godwinyyung/npsurvss on 2026-10-22.
Dependencies
Installing npsurvSS adds no packages beyond those that come with R.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 1.1.0Latest
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 1.0.12019-12-18
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2019-12-18
- Total releases
- 2 / 7 yrs
- License
- GPL-2 OSI
- Minimum R
- ≥ 3.4.0
- Download size
- 283 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("npsurvSS")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.