Learn R Programming

⚠️There's a newer version (2.1) of this package.Take me there.

nph (version 2.0)

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. Also, a function to calculate weighted log-rank tests for the comparison of two hazard functions is included. Finally, a function to calculate a test using the maximum of a set of test statistics from weighted log-rank tests is provided. This test utilizes the asymptotic multivariate normal joint distribution of the separate test statistics. The correlation is estimated from the data.

Copy Link

Version

Install

install.packages('nph')

Monthly Downloads

311

Version

2.0

License

GPL-3

Maintainer

Robin Ristl

Last Published

January 10th, 2020

Functions in nph (2.0)

pop_pchaz

Calculate survival for piecewise constant hazards with change after random time and mixture of subpopulations
sample_fun

Draw survival times based on study settings
sample_conditional_fun

Draw conditional survival times based on study settings
rSurv_fun

Draw random survival times from mixpch object.
rSurv_conditional_fun

Draw conditional random survival times from mixpch object.
subpop_pchaz

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

Plot of survival, hazard and hazard ratio of two groups as a function of time
logrank.test

Weighted log-rank test
logrank.maxtest

Maximum log-rank test
m2r

Transform median time into rate
pchaz

Calculate survival for piecewise constant hazard
plot.mixpch

Plot mixpch Objects
plot_subgroups

Draw a population composition plot
nph_gui

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

Draw a state space figure