Learn R Programming

nph (version 2.1)

Planning and Analysing Survival Studies under Non-Proportional Hazards

Description

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) . 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.

Copy Link

Version

Install

install.packages('nph')

Monthly Downloads

311

Version

2.1

License

GPL-3

Maintainer

Robin Ristl

Last Published

May 16th, 2022

Functions in nph (2.1)

pchaz

Calculate survival for piecewise constant hazard
logrank.test

Weighted log-rank test
pembro

Reconstructed Data Set Based On Survival Curves In Burtess et al. 2019
plot.nphparams

Plot nphparams Objects
plot_diagram

Draw a state space figure
plot.mixpch

Plot mixpch Objects
m2r

Transform median time into rate
logrank.maxtest

Maximum combination (MaxCombo) log-rank test
nphparams

Simultaneous Inference For Parameters Quantifying Differences Between Two Survival Functions
pop_pchaz

Calculate survival for piecewise constant hazards with change after random time and mixture of subpopulations
print.nphparams

Print nphparams Objects
subpop_pchaz

Calculate survival for piecewise constant hazards with change after random time
rSurv_conditional_fun

Draw conditional random survival times from mixpch object.
rSurv_fun

Draw random survival times from mixpch object.
nph_gui

Launch a GUI (shiny app) for the nph package
plot_subgroups

Draw a population composition plot
plot_shhr

Plot of survival, hazard and hazard ratio of two groups as a function of time
sample_conditional_fun

Draw conditional survival times based on study settings
sample_fun

Draw survival times based on study settings