Learn R Programming

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

PWEALL (version 1.3.0)

Design and Monitoring of Survival Trials Accounting for Complex Situations

Description

Calculates various functions needed for design and monitoring survival trials accounting for complex situations such as delayed treatment effect, treatment crossover, non-uniform accrual, and different censoring distributions between groups. The event time distribution is assumed to be piecewise exponential (PWE) distribution and the entry time is assumed to be piecewise uniform distribution. As compared with Version 1.2.1, two more types of hybrid crossover are added. A bug is corrected in the function "pwecx" that calculates the crossover-adjusted survival, distribution, density, hazard and cumulative hazard functions. Also, to generate the crossover-adjusted event time random variable, a more efficient algorithm is used and the output includes crossover indicators.

Copy Link

Version

Install

install.packages('PWEALL')

Monthly Downloads

231

Version

1.3.0

License

GPL (>= 2)

Maintainer

Xiaodong Luo

Last Published

October 18th, 2018

Functions in PWEALL (1.3.0)

pwe

Piecewise exponential distribution: hazard, cumulative hazard, density, distribution, survival
pwepowerfindt

Calculating the timepoint where a certain power of the specified test statistics is obtained
pwu

Piecewise uniform distribution: distribution
rmstutil

A utility function to calculate the true restricted mean survival time (RMST) and its variance account for delayed treatment, discontinued treatment and non-uniform entry
rmstsim

simulating the restricted mean survival times
rmstpower

Calculate powers at different cut-points based on difference of restricted mean survival times (RMST)
overallvar

calculate the overall variance
overallcovp2

calculate the other parts of the overall covariance
hxbeta

A function to calculate the beta-smoothed hazard rate
rmstpowerfindt

Calculating the timepoint where a certain power of mean difference of RMSTs is obtained
pwepowerni

Calculating the powers of various the test statistics for non-inferiority trials
innercov

A utility function to calculate the inner integration of the overall covariance
rpwe

Piecewise exponential distribution: random number generation
innervar

A utility function to calculate the inner integration of the overall variance
pwecx

Various function for piecewise exponential distribution with crossover effect
qpwe

Piecewise exponential distribution: quantile function
cpboundary

The stopping boundary based on the conditional power criteria
cpstop

The stopping probability based on the stopping boundary
qpwu

Piecewise uniform distribution: quantile function
rpwecx

Piecewise exponential distribution with crossover effect: random number generation
pwecxcens

Integration of the density of piecewise exponential distribution with crossover effect and the censoring function
overallcov

calculate the overall covariance
rmstcov

Calculation of the variance and covariance of estimated restricted mean survival time
pwecxpwu

Integration of the density of piecewise exponential distribution with crossover effect, censoring and recruitment function
rmsth

Estimate the restricted mean survival time (RMST) and its variance from data
pwepower

Calculating the powers of various the test statistics for superiority trials
overallcovp1

calculate the first part of the overall covariance
pwefv2

A utility function
pwefvplus

A utility functon
rpwu

Piecewise uniform distribution: random number generation
pwepowereq

Calculating the powers of various the test statistics for equivalence trials
spf

A utility function
wlrutil

A utility function to calculate some common functions in contructing weights
wlrcal

A utility function to calculate the weighted log-rank statistics and their varainces given the weights
wlrcom

A function to calculate the various weighted log-rank statistics and their varainces
PWEALL-package

tools:::Rd_package_title("PWEALL")
fourhr

A utility functon
ovbeta

calculate the overall log hazard ratio
instudyfindt

calculate the timeline in study when some or all subjects have entered
pwecxpwufindt

calculate the timeline when certain number of events accumulates
pwecxpwuforvar

calculate the utility function used for varaince calculation
cp

Conditional power given observed log hazard ratio
pwesim

simulating the test statistics