Title: | Conditional Power Calculations |
---|---|
Description: | 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. |
Authors: | Andreas Kuehnapfel |
Maintainer: | Andreas Kuehnapfel <[email protected]> |
License: | GPL-3 |
Version: | 1.6 |
Built: | 2024-11-05 02:40:17 UTC |
Source: | https://github.com/andreasstatsr/cp |
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.
Package: | CP |
Type: | Package |
Version: | 1.6 |
Date: | 2016-06-28 |
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
.
The theoretical results of this implementation
are based on some assumptions.
Non-Mixture-Exponential:
Non-Mixture-Weibull: and
Non-Mixture-Gamma: and
In general, such assumptions are not fulfilled when using real data.
Nevertheless, when doing conditional power calculations the situation is that you have no significant difference at the time of interim analysis. In this case, no treatment arm is superior to the other one. Thus, the assumptions named above are approximately satisfied.
In contrast to this, caution should be exercised when calculating the conditional power in the case of significant results at the time of interim analysis.
Andreas Kuehnapfel
Maintainer: Andreas Kuehnapfel <[email protected]>
Kuehnapfel, A. (2013). Die bedingte Power in der Ueberlebenszeitanalyse.
Andersen, P. K. (1987). Conditional power calculations as an aid in the decision whether to continue a clinical trial. Controlled Clinical Trials 8, 67-74.
ConPwrExp
ConPwrNonMixExp
ConPwrNonMixWei
ConPwrNonMixGamma
CompSurvMod
ConPwrExpAndersen
GenerateDataFrame
test
# 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)
# 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)
Calculates the conditional power in the exponential model.
Andreas Kuehnapfel
Calculates the conditional power in the exponential model with the original formulae of the Andersen paper.
Andreas Kuehnapfel
Calculates the conditional power in the non-mixture models.
Andreas Kuehnapfel
CP
ConPwrNonMixExp
ConPwrNonMixWei
ConPwrNonMixGamma
CompSurvMod
Calculates the conditional power within the exponential model and the non-mixture models with exponential, Weibull type and Gamma type survival.
CompSurvMod(data, cont.time, new.pat = c(0, 0), theta.0 = 1, alpha = 0.05, disp.data = FALSE, plot.km = FALSE)
CompSurvMod(data, cont.time, new.pat = c(0, 0), theta.0 = 1, alpha = 0.05, disp.data = FALSE, plot.km = FALSE)
data |
Data frame which consists of at least three columns with the group (two different expressions) in the first, status (1 = event, 0 = censored) in the second and event time in the third column. |
cont.time |
Period of time of continuing the trial. |
new.pat |
2-dimensional vector which consists of numbers of new patients who will be recruited each time unit (first component = group 1, second component = group 2) with default at (0, 0). |
theta.0 |
Originally postulated clinically relevant difference (hazard ratio = hazard of group 2 / hazard of group 1) with default at 1. |
alpha |
Significance level for conditional power calculations with default at 0.05. |
disp.data |
Logical value indicating if all calculated data should be displayed with default at FALSE. |
plot.km |
Logical value indicating if Kaplan-Meier curves and estimated survival curves according to the four mentioned models should be plotted with default at FALSE. |
This function calculates the conditional power within the exponential model and the non-mixture models with exponential, Weibull type and Gamma type survival and plots the conditional power curves.
Optionally, further data will be displayed. This includes data from interim analysis, log-likelihoods, AICs, calculated estimators and further patient times.
Moreover, it is possible to plot the Kaplan-Meier curves and the estimated survival curves according to the four mentioned models.
See Details.
Returns a list which consists of the following components:
lambda1.hat.exp |
estimated hazard of group 1 within the exponential model |
lambda2.hat.exp |
estimated hazard of group 2 within the exponential model |
theta.hat.exp |
estimated hazard ratio = estimated hazard of group 2 / estimated hazard of group 1 within the exponential model |
gamma.theta.0.exp |
conditional power within the exponential model |
lambda1.hat.nm.exp |
estimated rate parameter of group 1 within the non-mixture model with exponential survival |
c1.hat.nm.exp |
estimated survival fraction of group 1 within the non-mixture model with exponential survival |
lambda2.hat.nm.exp |
estimated rate parameter of group 2 within the non-mixture model with exponential survival |
c2.hat.nm.exp |
estimated survival fraction of group 2 within the non-mixture model with exponential survival |
theta.hat.nm.exp |
estimated hazard ratio
= |
gamma.theta.0.nm.exp |
conditional power within the non-mixture model with exponential survival |
lambda1.hat.nm.wei |
estimated scale parameter of group 1 within the non-mixture model with Weibull type survival |
k1.hat.nm.wei |
estimated shape parameter of group 1 within the non-mixture model with Weibull type survival |
c1.hat.nm.wei |
estimated survival fraction of group 1 within the non-mixture model with Weibull type survival |
lambda2.hat.nm.wei |
estimated scale parameter of group 2 within the non-mixture model with Weibull type survival |
k2.hat.nm.wei |
estimated shape parameter of group 2 within the non-mixture model with Weibull type survival |
c2.hat.nm.wei |
estimated survival fraction of group 2 within the non-mixture model with Weibull type survival |
theta.hat.nm.wei |
estimated hazard ratio
= |
gamma.theta.0.nm.wei |
conditional power within the non-mixture model with Weibull type survival |
a1.hat.nm.gamma |
estimated shape parameter of group 1 within the non-mixture model with Gamma type survival |
b1.hat.nm.gamma |
estimated rate parameter of group 1 within the non-mixture model with Gamma type survival |
c1.hat.nm.gamma |
estimated survival fraction of group 1 within the non-mixture model with Gamma type survival |
a2.hat.nm.gamma |
estimated shape parameter of group 2 within the non-mixture model with Gamma type survival |
b2.hat.nm.gamma |
estimated rate parameter of group 2 within the non-mixture model with Gamma type survival |
c2.hat.nm.gamma |
estimated survival fraction of group 2 within the non-mixture model with Gamma type survival |
theta.hat.nm.gamma |
estimated hazard ratio
= |
gamma.theta.0.nm.gamma |
conditional power within the non-mixture model with Gamma type survival |
There are several mechanisms to ensure that no illegal operations will be done and maximum likelihood calculations will be executed stable. That is why there should not be too less data in the data frame, for example one patient of each group and both being censored.
Andreas Kuehnapfel
Kuehnapfel, A. (2013). Die bedingte Power in der Ueberlebenszeitanalyse.
CP
ConPwrExp
ConPwrNonMixExp
ConPwrNonMixWei
ConPwrNonMixGamma
ConPwrExpAndersen
GenerateDataFrame
test
# data frame 'test' generated by 'GenerateDataFrame' # 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)
# data frame 'test' generated by 'GenerateDataFrame' # 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)
Calculates the conditional power within the exponential model.
ConPwrExp(data, cont.time, new.pat = c(0, 0), theta.0 = 1, alpha = 0.05, disp.data = FALSE, plot.km = FALSE)
ConPwrExp(data, cont.time, new.pat = c(0, 0), theta.0 = 1, alpha = 0.05, disp.data = FALSE, plot.km = FALSE)
data |
Data frame which consists of at least three columns with the group (two different expressions) in the first, status (1 = event, 0 = censored) in the second and event time in the third column. |
cont.time |
Period of time of continuing the trial. |
new.pat |
2-dimensional vector which consists of numbers of new patients who will be recruited each time unit (first component = group 1, second component = group 2) with default at (0, 0). |
theta.0 |
Originally postulated clinically relevant difference (hazard ratio = hazard of group 2 / hazard of group 1) with default at 1. |
alpha |
Significance level for conditional power calculations with default at 0.05. |
disp.data |
Logical value indicating if all calculated data should be displayed with default at FALSE. |
plot.km |
Logical value indicating if Kaplan-Meier curves and estimated survival curves according to the exponential model should be plotted with default at FALSE. |
This function calculates the conditional power within the exponential model, i. e.
for all and
,
and plots the conditional power curve.
Optionally, further data will be displayed. This includes data from interim analysis, log-likelihoods, AICs, calculated estimators and further patient times.
Moreover, it is possible to plot the Kaplan-Meier curves and the estimated survival curves according to the exponential model.
See Details.
Returns a list which consists of the following components:
lambda1.hat |
estimated hazard of group 1 |
lambda2.hat |
estimated hazard of group 2 |
theta.hat |
estimated hazard ratio = estimated hazard of group 2 / estimated hazard of group 1 |
gamma.theta.0 |
conditional power |
There are several mechanisms to ensure that no illegal operations will be done. That is why there should not be too less data in the data frame, for example one patient of each group and both being censored.
Andreas Kuehnapfel
Kuehnapfel, A. (2013). Die bedingte Power in der Ueberlebenszeitanalyse.
# 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)
# 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)
Calculates the conditional power within the exponential model with the original formulae of the Andersen paper.
ConPwrExpAndersen(data, cont.time, new.pat = c(0, 0), theta.0 = 1, alpha = 0.05, disp.data = FALSE, plot.km = FALSE)
ConPwrExpAndersen(data, cont.time, new.pat = c(0, 0), theta.0 = 1, alpha = 0.05, disp.data = FALSE, plot.km = FALSE)
data |
Data frame which consists of at least three columns with the group (two different expressions) in the first, status (1 = event, 0 = censored) in the second and event time in the third column. |
cont.time |
Period of time of continuing the trial. |
new.pat |
2-dimensional vector which consists of numbers of new patients who will be recruited each time unit (first component = group 1, second component = group 2) with default at (0, 0). |
theta.0 |
Originally postulated clinically relevant difference (hazard ratio = hazard of group 2 / hazard of group 1) with default at 1. |
alpha |
Significance level for conditional power calculations with default at 0.05. |
disp.data |
Logical value indicating if all calculated data should be displayed with default at FALSE. |
plot.km |
Logical value indicating if Kaplan-Meier curves and estimated survival curves according to the exponential model should be plotted with default at FALSE. |
This function calculates the conditional power within the exponential model, i. e.
for all and
,
and plots the conditional power curve.
The original formulae of the Andersen paper are used.
Optionally, further data will be displayed. This includes data from interim analysis, log-likelihoods, AICs, calculated estimators and further patient times.
Moreover, it is possible to plot the Kaplan-Meier curves and the estimated survival curves according to the exponential model.
See Details.
Returns a list which consists of the following components:
lambda1.hat |
estimated hazard of group 1 |
lambda2.hat |
estimated hazard of group 2 |
theta.hat |
estimated hazard ratio = estimated hazard of group 2 / estimated hazard of group 1 |
gamma.theta.0 |
conditional power |
There are several mechanisms to ensure that no illegal operations will be done. That is why there should not be too less data in the data frame, for example one patient of each group and both being censored.
Andreas Kuehnapfel
Andersen, P. K. (1987). Conditional power calculations as an aid in the decision whether to continue a clinical trial. Controlled Clinical Trials 8, 67-74.
# data frame 'test' generated by 'GenerateDataFrame' # 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)
# data frame 'test' generated by 'GenerateDataFrame' # 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)
Calculates the conditional power within the non-mixture model with exponential survival.
ConPwrNonMixExp(data, cont.time, new.pat = c(0, 0), theta.0 = 1, alpha = 0.05, disp.data = FALSE, plot.km = FALSE)
ConPwrNonMixExp(data, cont.time, new.pat = c(0, 0), theta.0 = 1, alpha = 0.05, disp.data = FALSE, plot.km = FALSE)
data |
Data frame which consists of at least three columns with the group (two different expressions) in the first, status (1 = event, 0 = censored) in the second and event time in the third column. |
cont.time |
Period of time of continuing the trial. |
new.pat |
2-dimensional vector which consists of numbers of new patients who will be recruited each time unit (first component = group 1, second component = group 2) with default at (0, 0). |
theta.0 |
Originally postulated clinically relevant difference (hazard ratio = hazard of group 2 / hazard of group 1) with default at 1. |
alpha |
Significance level for conditional power calculations with default at 0.05. |
disp.data |
Logical value indicating if all calculated data should be displayed with default at FALSE. |
plot.km |
Logical value indicating if Kaplan-Meier curves and estimated survival curves according to the non-mixture model with exponential survival should be plotted with default at FALSE. |
This function calculates the conditional power within the non-mixture model with exponential survival, i. e.
for all ,
and
,
and plots the conditional power curve.
Optionally, further data will be displayed. This includes data from interim analysis, log-likelihoods, AICs, calculated estimators and further patient times.
Moreover, it is possible to plot the Kaplan-Meier curves and the estimated survival curves according to the non-mixture model with exponential survival.
See Details.
Returns a list which consists of the following components:
lambda1.hat |
estimated rate parameter of group 1 |
c1.hat |
estimated survival fraction of group 1 |
lambda2.hat |
estimated rate parameter of group 2 |
c2.hat |
estimated survival fraction of group 2 |
theta.hat |
estimated hazard ratio
= |
gamma.theta.0 |
conditional power |
There are several mechanisms to ensure that no illegal operations will be done and maximum likelihood calculations will be executed stable. That is why there should not be too less data in the data frame, for example one patient of each group and both being censored.
Andreas Kuehnapfel
Kuehnapfel, A. (2013). Die bedingte Power in der Ueberlebenszeitanalyse.
# data frame 'test' generated by 'GenerateDataFrame' # 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)
# data frame 'test' generated by 'GenerateDataFrame' # 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)
Calculates the conditional power within the non-mixture model with Gamma type survival.
ConPwrNonMixGamma(data, cont.time, new.pat = c(0, 0), theta.0 = 1, alpha = 0.05, disp.data = FALSE, plot.km = FALSE)
ConPwrNonMixGamma(data, cont.time, new.pat = c(0, 0), theta.0 = 1, alpha = 0.05, disp.data = FALSE, plot.km = FALSE)
data |
Data frame which consists of at least three columns with the group (two different expressions) in the first, status (1 = event, 0 = censored) in the second and event time in the third column. |
cont.time |
Period of time of continuing the trial. |
new.pat |
2-dimensional vector which consists of numbers of new patients who will be recruited each time unit (first component = group 1, second component = group 2) with default at (0, 0). |
theta.0 |
Originally postulated clinically relevant difference (hazard ratio = hazard of group 2 / hazard of group 1) with default at 1. |
alpha |
Significance level for conditional power calculations with default at 0.05. |
disp.data |
Logical value indicating if all calculated data should be displayed with default at FALSE. |
plot.km |
Logical value indicating if Kaplan-Meier curves and estimated survival curves according to the non-mixture model with Gamma type survival should be plotted with default at FALSE. |
This function calculates the conditional power within the non-mixture model with Gamma type survival, i. e.
for all ,
,
and
with
being
the regularized incomplete Gamma function of the upper bound,
and plots the conditional power curve.
Optionally, further data will be displayed. This includes data from interim analysis, log-likelihoods, AICs, calculated estimators and further patient times.
Moreover, it is possible to plot the Kaplan-Meier curves and the estimated survival curves according to the non-mixture model with Gamma type survival.
See Details.
Returns a list which consists of the following components:
a1.hat |
estimated shape parameter of group 1 |
b1.hat |
estimated rate parameter of group 1 |
c1.hat |
estimated survival fraction of group 1 |
a2.hat |
estimated shape parameter of group 2 |
b2.hat |
estimated rate parameter of group 2 |
c2.hat |
estimated survival fraction of group 2 |
theta.hat |
estimated hazard ratio
= |
gamma.theta.0 |
conditional power |
There are several mechanisms to ensure that no illegal operations will be done and maximum likelihood calculations will be executed stable. That is why there should not be too less data in the data frame, for example one patient of each group and both being censored.
Andreas Kuehnapfel
Kuehnapfel, A. (2013). Die bedingte Power in der Ueberlebenszeitanalyse.
# data frame 'test' generated by 'GenerateDataFrame' # 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)
# data frame 'test' generated by 'GenerateDataFrame' # 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)
Calculates the conditional power within the non-mixture model with Weibull type survival.
ConPwrNonMixWei(data, cont.time, new.pat = c(0, 0), theta.0 = 1, alpha = 0.05, disp.data = FALSE, plot.km = FALSE)
ConPwrNonMixWei(data, cont.time, new.pat = c(0, 0), theta.0 = 1, alpha = 0.05, disp.data = FALSE, plot.km = FALSE)
data |
Data frame which consists of at least three columns with the group (two different expressions) in the first, status (1 = event, 0 = censored) in the second and event time in the third column. |
cont.time |
Period of time of continuing the trial. |
new.pat |
2-dimensional vector which consists of numbers of new patients who will be recruited each time unit (first component = group 1, second component = group 2) with default at (0, 0). |
theta.0 |
Originally postulated clinically relevant difference (hazard ratio = hazard of group 2 / hazard of group 1) with default at 1. |
alpha |
Significance level for conditional power calculations with default at 0.05. |
disp.data |
Logical value indicating if all calculated data should be displayed with default at FALSE. |
plot.km |
Logical value indicating if Kaplan-Meier curves and estimated survival curves according to the non-mixture model with Weibull type survival should be plotted with default at FALSE. |
This function calculates the conditional power within the non-mixture model with Weibull type survival, i. e.
for all ,
,
and
,
and plots the conditional power curve.
Optionally, further data will be displayed. This includes data from interim analysis, log-likelihoods, AICs, calculated estimators and further patient times.
Moreover, it is possible to plot the Kaplan-Meier curves and the estimated survival curves according to the non-mixture model with Weibull type survival.
See Details.
Returns a list which consists of the following components:
lambda1.hat |
estimated scale parameter of group 1 |
k1.hat |
estimated shape parameter of group 1 |
c1.hat |
estimated survival fraction of group 1 |
lambda2.hat |
estimated scale parameter of group 2 |
k2.hat |
estimated shape parameter of group 2 |
c2.hat |
estimated survival fraction of group 2 |
theta.hat |
estimated hazard ratio
= |
gamma.theta.0 |
conditional power |
There are several mechanisms to ensure that no illegal operations will be done and maximum likelihood calculations will be executed stable. That is why there should not be too less data in the data frame, for example one patient of each group and both being censored.
Andreas Kuehnapfel
Kuehnapfel, A. (2013). Die bedingte Power in der Ueberlebenszeitanalyse.
# data frame 'test' generated by 'GenerateDataFrame' # 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)
# data frame 'test' generated by 'GenerateDataFrame' # 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)
Displays the conditional power in
ConPwrExp
, ConPwrNonMixExp
,
ConPwrNonMixWei
and ConPwrNonMixGamma
.
Andreas Kuehnapfel
CP
ConPwrExp
ConPwrNonMixExp
ConPwrNonMixWei
ConPwrNonMixGamma
Displays the conditional power in CompSurvMod
.
Andreas Kuehnapfel
Displays the data in CompSurvMod
.
Andreas Kuehnapfel
Displays the data in the exponential model.
Andreas Kuehnapfel
Displays the data in the non-mixture model with exponential survival.
Andreas Kuehnapfel
Displays the data in the non-mixture model with Gamma type survival.
Andreas Kuehnapfel
Displays the data in the non-mixture model with Weibull type survival.
Andreas Kuehnapfel
Calculates the value of some function of the further person months in the non-mixture model with exponential survival.
Andreas Kuehnapfel
Calculates the value of some function of the further person months in the non-mixture model with Gamma type survival.
Andreas Kuehnapfel
Calculates the value of some function of the further person months in the non-mixture model with Weibull type survival.
Andreas Kuehnapfel
Generates a data frame for conditional power calculations.
GenerateDataFrame()
GenerateDataFrame()
This function generates a data frame for testing the conditional power calculating functions.
Its data is generated by random in the following way:
The number of all patients is a realization of a Poisson distributed random variable with parameter 200.
The probability of censoring is a realization of a uniform distributed random variable of the interval from 0.4 to 0.6, one random variable for each of the two groups 'A' and 'B'.
The patients are randomized to group 'A' or 'B' each with probability 0.5.
The status (1 = event, 0 = censored) is a realization of a Bernoulli random variable with parameter (1 - probability of being censored).
The event time is a realization of an exponential random variable with parameter (1 - probability of being censored).
This function returns a data frame consisting of three columns: the group ('A' or 'B') in the first ('group'), the status (o or 1) in the second ('stat') and the event time in the third column ('time').
Of course, this is only one and also a quiet simple way of generating data frames for interim analysis. Such a generated data frame should be more an aid to get to know the conditional power caluclating functions than simulating realistic data.
Andreas Kuehnapfel
# generate a data frame data <- GenerateDataFrame()
# generate a data frame data <- GenerateDataFrame()
Calculates initial values for maximum likelihood calculations in the non-mixture model with exponential survival.
Andreas Kuehnapfel
Calculates initial values for maximum likelihood calculations in the non-mixture model with Gamma type survival.
Andreas Kuehnapfel
Calculates initial values for maximum likelihood calculations in the non-mixture model with Weibull type survival.
Andreas Kuehnapfel
Displays the data from the interim analysis.
Andreas Kuehnapfel
CP
ConPwrExp
ConPwrNonMixExp
ConPwrNonMixWei
ConPwrNonMixGamma
CompSurvMod
Checks the passed parameters of the user.
Andreas Kuehnapfel
CP
ConPwrExp
ConPwrNonMixExp
ConPwrNonMixWei
ConPwrNonMixGamma
CompSurvMod
Calculates the maximum likelihood estimators of the non-mixture model with exponential survival.
Andreas Kuehnapfel
Calculates the maximum likelihood estimators of the non-mixture model with Gamma type survival.
Andreas Kuehnapfel
Calculates the maximum likelihood estimators of the non-mixture model with Weibull type survival.
Andreas Kuehnapfel
Calculates the further person months in the exponential model.
Andreas Kuehnapfel
Calculates the further person months in the non-mixture model with exponential survival.
Andreas Kuehnapfel
Calculates the further person months in the non-mixture model with Gamma type survival.
Andreas Kuehnapfel
Calculates the further person months in the non-mixture model with Weibull type survival.
Andreas Kuehnapfel
Plots the conditional power curve in
ConPwrExp
, ConPwrNonMixExp
,
ConPwrNonMixWei
and ConPwrNonMixGamma
.
Andreas Kuehnapfel
CP
ConPwrExp
ConPwrNonMixExp
ConPwrNonMixWei
ConPwrNonMixGamma
Plots the conditional power curve in CompSurvMod
.
Andreas Kuehnapfel
Plots the estimated survival curves of the exponential model.
Andreas Kuehnapfel
Plots the estimated survival curves of the non-mixture model with exponential survival.
Andreas Kuehnapfel
Plots the estimated survival curves of the non-mixture model with Gamma type survival.
Andreas Kuehnapfel
Plots the estimated survival curves of the non-mixture model with Weibull type survival.
Andreas Kuehnapfel
Plots the Kaplan-Meier curves.
Andreas Kuehnapfel
CP
ConPwrExp
ConPwrNonMixExp
ConPwrNonMixWei
ConPwrNonMixGamma
CompSurvMod
Splits the entire data frame into two sub data frames each for one group.
Andreas Kuehnapfel
CP
ConPwrExp
ConPwrNonMixExp
ConPwrNonMixWei
ConPwrNonMixGamma
CompSurvMod
The data frame 'test' is generated by random and does not refer to a special realistic issue.
This data frame consists of three columns. The first column consists of the group expressions 'A' and 'B' (character). The second column consists of the status 1 for event or 2 for censored (numeric). The third column consists of the event time (numeric).