Learn R Programming

CP (version 1.8)

CP-package: Conditional Power Calculations

Description

This package provides several functions for calculating the conditional power for different models in survival time analysis within randomized clinical trials with two different treatments to be compared and survival as an endpoint.

Arguments

Author

Andreas Kuehnapfel

Maintainer: Andreas Kuehnapfel <andreas.kuehnapfel@imise.uni-leipzig.de>

Details

Package:CP
Type:Package
Version:1.8
Date:2023-05-17
License:GPL-3

This package could be some help when you want to calculate the conditional power at the time of an interim analysis of a randomized clinical trial with survival as an endpoint.

The conditional power is defined as the probability of obtaining a significant result at the end of the trial when the real effect is equal to the expected effect given the data from the interim analysis.

Functions for the model with exponential survival (ConPwrExp) and the non-mixture models with exponential (ConPwrNonMixExp), Weibull type (ConPwrNonMixWei) and Gamma type survival (ConPwrNonMixGamma) are provided.

There is also the function CompSurvMod to compare the four mentioned models.

Additionally, there is also a function for the exponential model with the original formulae of the Andersen paper (ConPwrExpAndersen).

Finally, the user is able to generate further data frames by random via GenerateDataFrame.

References

Andreas Kuehnapfel, Fabian Schwarzenberger, Markus Scholz. On the Conditional Power in Survival Time Analysis Considering Cure Fractions. The International Journal of Biostatistics 13 (1), 2017.

Per Kragh Andersen. Conditional power calculations as an aid in the decision whether to continue a clinical trial. Controlled Clinical Trials 8 (1), 67-74, 1987.

See Also

ConPwrExp
ConPwrNonMixExp
ConPwrNonMixWei
ConPwrNonMixGamma
CompSurvMod
ConPwrExpAndersen
GenerateDataFrame
test

Examples

Run this code
 # data frame 'test' generated by 'GenerateDataFrame'
 
 # conditional power calculations
 # within the exponential model
 ConPwrExp(data = test, cont.time = 12, new.pat = c(2.5, 2.5),
           theta.0 = 0.75, alpha = 0.05,
           disp.data = TRUE, plot.km = TRUE)
           
 # conditional power calculations
 # within the non-mixture model with exponential survival
 ConPwrNonMixExp(data = test, cont.time = 12, new.pat = c(2.5, 2.5),
                 theta.0 = 0.75, alpha = 0.05,
                 disp.data = TRUE, plot.km = TRUE)
                 
 # conditional power calculations
 # within the non-mixture model with Weibull type survival
 ConPwrNonMixWei(data = test, cont.time = 12, new.pat = c(2.5, 2.5),
                 theta.0 = 0.75, alpha = 0.05,
                 disp.data = TRUE, plot.km = TRUE)
                
 # conditional power calculations
 # within the non-mixture model with Gamma type survival
 ConPwrNonMixGamma(data = test, cont.time = 12, new.pat = c(2.5, 2.5),
                   theta.0 = 0.75, alpha = 0.05,
                   disp.data = TRUE, plot.km = TRUE)
                   
 # conditional power calculations
 # within the four mentioned models
 CompSurvMod(data = test, cont.time = 12, new.pat = c(2.5, 2.5),
             theta.0 = 0.75, alpha = 0.05,
             disp.data = TRUE, plot.km = TRUE)
 
 # conditional power calculations
 # within the exponential model
 # with the original formulae of the Andersen paper
 ConPwrExpAndersen(data = test, cont.time = 12, new.pat = c(2.5, 2.5),
                   theta.0 = 0.75, alpha = 0.05,
                   disp.data = TRUE, plot.km = TRUE)

Run the code above in your browser using DataLab