Skip to content

Planning and Analysing Survival Studies under Non-Proportional Hazards

3packages dependsuggested by 1
6.2Kdownloads / year
–test coverage
11/13flavors OK

Overview

About

Piecewise constant hazard functions are used to flexibly model survival distributions with non-proportional hazards and to simulate data from the specified distributions. A function to calculate weighted log-rank tests for the comparison of two hazard functions is included. Also, a function to calculate a test using the maximum of a set of test statistics from weighted log-rank tests (MaxCombo test) is provided. This test utilizes the asymptotic multivariate normal joint distribution of the separate test statistics. The correlation is estimated from the data. These methods are described in Ristl et al. (2021) doi:10.1002/pst.2062. Finally, a function is provided for the estimation and inferential statistics of various parameters that quantify the difference between two survival curves. Eligible parameters are differences in survival probabilities, log survival probabilities, complementary log log (cloglog) transformed survival probabilities, quantiles of the survival functions, log transformed quantiles, restricted mean survival times, as well as an average hazard ratio, the Cox model score statistic (logrank statistic), and the Cox-model hazard ratio. Adjustments for multiple testing and simultaneous confidence intervals are calculated using a multivariate normal approximation to the set of selected parameters.

Install

Health

CRAN checks
2NOTE11OK
Check messages
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Robin Ristl <robin.ristl@meduniwien.ac.at>’

Package CITATION file contains call(s) to old-style personList() or
as.personList().  Please use c() on person objects instead.
Package CITATION file contains call(s) to old-style citEntry().  Please
use bibentry() instead.

CRAN check page ↗

Slowest check: 5.3 min · r-oldrel-windows-x86_64
Status changes
  • NOTE11 OK, 2 NOTE2026-06-09
  • ERROR11 OK, 1 NOTE, 1 ERROR2026-06-08
  • NOTE12 OK, 2 NOTE2026-03-10
Advisories

none known

Documentation

In release 2.1
READMENoVignettesYes · 2 · dynamicNEWSNoCitation fileYes · cites a publicationWebsitenot declared in DESCRIPTION
Help pages
19
Examples that run
100%15 run in a plain check
Exported functions with examples
73%
Documented parameters
94%
Return-value docs
67%
Help pages citing references
63%

Downloads

6.2K
CRAN downloads in the past year
Rank #5,332 · ~17/day · ~519/mo
Daily download trend is not available in this view yet.
57830 days
1.5K90 days
6.2K1 year
Compare downloads with other packages →
Also on78 r2u9 autocran

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)

Installing nph adds 23 packages (10 with compiled code, 26 MB of source tarballs). Heaviest: TH.data 8.2 MB, ggplot2 6.0 MB, isoband 1.5 MB.

Depends (1)
R >= 3.5.0
Imports (7)
statsgraphicsmvtnormggplot2muhazsurvivalmultcomp
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
3direct
0indirect
Depends 1 · Imports 2
Suggested by 1
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

Datasets

People & History

People (2)
Author, Maintainer since 1.9 (2019)
Releases (3)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 2.1Latest
    record
    2022-05-17 · current release · diff ↗ ·
    added 1 export
    nphparams
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • 2.0
    record
    2020-01-10 · diff ↗
  • 1.9
    record
    2019-08-23
  • R
    R 3.6.0 released · 2019-04-26

Package metadata

First published
2019-08-23
Total releases
3 / 7 yrs
License
GPL-3 OSI
Minimum R
≥ 3.5.0
Bundled data
3.1 KB / 1 file
Download size
1.8 MB

Cite

Cite this package

Run in R for the authors' entry:

citation("nph")

The package provides a citation file, so citation() returns the authors' own entry.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for nph version 2.1 [Data set]. HJJB, LLC. Data release v2026-10-20. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy