Package 'CP'

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

Help Index


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.

Details

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.

Note

The theoretical results of this implementation are based on some assumptions.
Non-Mixture-Exponential: λ[1]=λ[2]\lambda[1] = \lambda[2]
Non-Mixture-Weibull: λ[1]=λ[2]\lambda[1] = \lambda[2] and k[1]=k[2]k[1] = k[2]
Non-Mixture-Gamma: a[1]=a[2]a[1] = a[2] and b[1]=b[2]b[1] = b[2]

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.

Author(s)

Andreas Kuehnapfel

Maintainer: Andreas Kuehnapfel <[email protected]>

References

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.

See Also

ConPwrExp
ConPwrNonMixExp
ConPwrNonMixWei
ConPwrNonMixGamma
CompSurvMod
ConPwrExpAndersen
GenerateDataFrame
test

Examples

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

Auxiliary Function

Description

Calculates the conditional power in the exponential model.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrExp CompSurvMod


Auxiliary Function

Description

Calculates the conditional power in the exponential model with the original formulae of the Andersen paper.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrExp CompSurvMod


Auxiliary Function

Description

Calculates the conditional power in the non-mixture models.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixExp ConPwrNonMixWei ConPwrNonMixGamma CompSurvMod


Conditional Power (Comparison)

Description

Calculates the conditional power within the exponential model and the non-mixture models with exponential, Weibull type and Gamma type survival.

Usage

CompSurvMod(data, cont.time, new.pat = c(0, 0),
             theta.0 = 1, alpha = 0.05,
             disp.data = FALSE, plot.km = FALSE)

Arguments

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.

Details

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.

Value

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 = log(log(estimated survival fraction of group 2)) / log(log(estimated survival fraction of group 1)) within the non-mixture model with exponential survival

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 = log(log(estimated survival fraction of group 2)) / log(log(estimated survival fraction of group 1)) within the non-mixture model with Weibull type survival

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 = log(log(estimated survival fraction of group 2)) / log(log(estimated survival fraction of group 1)) within the non-mixture model with Gamma type survival

gamma.theta.0.nm.gamma

conditional power within the non-mixture model with Gamma type survival

Note

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.

Author(s)

Andreas Kuehnapfel

References

Kuehnapfel, A. (2013). Die bedingte Power in der Ueberlebenszeitanalyse.

See Also

CP
ConPwrExp
ConPwrNonMixExp
ConPwrNonMixWei
ConPwrNonMixGamma
ConPwrExpAndersen
GenerateDataFrame
test

Examples

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

Conditional Power (Exponential)

Description

Calculates the conditional power within the exponential model.

Usage

ConPwrExp(data, cont.time, new.pat = c(0, 0),
           theta.0 = 1, alpha = 0.05,
           disp.data = FALSE, plot.km = FALSE)

Arguments

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.

Details

This function calculates the conditional power within the exponential model, i. e.

S(t)=e(λt)S(t) = e^(- \lambda t)

for all t0t \ge 0 and λ>0\lambda > 0, 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.

Value

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

Note

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.

Author(s)

Andreas Kuehnapfel

References

Kuehnapfel, A. (2013). Die bedingte Power in der Ueberlebenszeitanalyse.

See Also

CP
GenerateDataFrame
test

Examples

# 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 (Exponential (Andersen))

Description

Calculates the conditional power within the exponential model with the original formulae of the Andersen paper.

Usage

ConPwrExpAndersen(data, cont.time, new.pat = c(0, 0),
                   theta.0 = 1, alpha = 0.05,
                   disp.data = FALSE, plot.km = FALSE)

Arguments

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.

Details

This function calculates the conditional power within the exponential model, i. e.

S(t)=e(λt)S(t) = e^(- \lambda t)

for all t0t \ge 0 and λ>0\lambda > 0, 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.

Value

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

Note

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.

Author(s)

Andreas Kuehnapfel

References

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.

See Also

CP
GenerateDataFrame
test

Examples

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

Conditional Power (Non-Mixture-Exponential)

Description

Calculates the conditional power within the non-mixture model with exponential survival.

Usage

ConPwrNonMixExp(data, cont.time, new.pat = c(0, 0),
                 theta.0 = 1, alpha = 0.05,
                 disp.data = FALSE, plot.km = FALSE)

Arguments

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.

Details

This function calculates the conditional power within the non-mixture model with exponential survival, i. e.

S(t)=c(1e(λt))S(t) = c^(1 - e^(- \lambda t))

for all t0t \ge 0, λ>0\lambda > 0 and 0<c<10 < c < 1, 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.

Value

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 = log(log(estimated survival fraction of group 2)) / log(log(estimated survival fraction of group 1))

gamma.theta.0

conditional power

Note

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.

Author(s)

Andreas Kuehnapfel

References

Kuehnapfel, A. (2013). Die bedingte Power in der Ueberlebenszeitanalyse.

See Also

CP
GenerateDataFrame
test

Examples

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

Conditional Power (Non-Mixture-Gamma)

Description

Calculates the conditional power within the non-mixture model with Gamma type survival.

Usage

ConPwrNonMixGamma(data, cont.time, new.pat = c(0, 0),
                   theta.0 = 1, alpha = 0.05,
                   disp.data = FALSE, plot.km = FALSE)

Arguments

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.

Details

This function calculates the conditional power within the non-mixture model with Gamma type survival, i. e.

S(t)=c(Γ(0)(a,bt))S(t) = c^(\Gamma^(0)(a, b t))

for all t0t \ge 0, a>0a > 0, b>0b > 0 and 0<c<10 < c < 1 with Γ(0)\Gamma^(0) 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.

Value

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 = log(log(estimated survival fraction of group 2)) / log(log(estimated survival fraction of group 1))

gamma.theta.0

conditional power

Note

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.

Author(s)

Andreas Kuehnapfel

References

Kuehnapfel, A. (2013). Die bedingte Power in der Ueberlebenszeitanalyse.

See Also

CP
GenerateDataFrame
test

Examples

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

Conditional Power (Non-Mixture-Weibull)

Description

Calculates the conditional power within the non-mixture model with Weibull type survival.

Usage

ConPwrNonMixWei(data, cont.time, new.pat = c(0, 0),
                 theta.0 = 1, alpha = 0.05,
                 disp.data = FALSE, plot.km = FALSE)

Arguments

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.

Details

This function calculates the conditional power within the non-mixture model with Weibull type survival, i. e.

S(t)=c(1e(λtk))S(t) = c^(1 - e^(- \lambda t^k))

for all t0t \ge 0, λ>0\lambda > 0, k>0k > 0 and 0<c<10 < c < 1, 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.

Value

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 = log(log(estimated survival fraction of group 2)) / log(log(estimated survival fraction of group 1))

gamma.theta.0

conditional power

Note

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.

Author(s)

Andreas Kuehnapfel

References

Kuehnapfel, A. (2013). Die bedingte Power in der Ueberlebenszeitanalyse.

See Also

CP
GenerateDataFrame
test

Examples

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

Auxiliary Function

Description

Displays the conditional power in ConPwrExp, ConPwrNonMixExp, ConPwrNonMixWei and ConPwrNonMixGamma.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrExp ConPwrNonMixExp ConPwrNonMixWei ConPwrNonMixGamma


Auxiliary Function

Description

Displays the conditional power in CompSurvMod.

Author(s)

Andreas Kuehnapfel

See Also

CP CompSurvMod


Auxiliary Function

Description

Displays the data in CompSurvMod.

Author(s)

Andreas Kuehnapfel

See Also

CP CompSurvMod


Auxiliary Function

Description

Displays the data in the exponential model.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrExp


Auxiliary Function

Description

Displays the data in the non-mixture model with exponential survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixExp


Auxiliary Function

Description

Displays the data in the non-mixture model with Gamma type survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixGamma


Auxiliary Function

Description

Displays the data in the non-mixture model with Weibull type survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixWei


Auxiliary Function

Description

Calculates the value of some function of the further person months in the non-mixture model with exponential survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixExp


Auxiliary Function

Description

Calculates the value of some function of the further person months in the non-mixture model with Gamma type survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixGamma


Auxiliary Function

Description

Calculates the value of some function of the further person months in the non-mixture model with Weibull type survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixWei


Generating Data Frame

Description

Generates a data frame for conditional power calculations.

Usage

GenerateDataFrame()

Details

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

Value

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

Note

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.

Author(s)

Andreas Kuehnapfel

See Also

CP
test

Examples

# generate a data frame
 data <- GenerateDataFrame()

Auxiliary Function

Description

Calculates initial values for maximum likelihood calculations in the non-mixture model with exponential survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixExp


Auxiliary Function

Description

Calculates initial values for maximum likelihood calculations in the non-mixture model with Gamma type survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixGamma


Auxiliary Function

Description

Calculates initial values for maximum likelihood calculations in the non-mixture model with Weibull type survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixWei


Auxiliary Function

Description

Displays the data from the interim analysis.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrExp ConPwrNonMixExp ConPwrNonMixWei ConPwrNonMixGamma CompSurvMod


Auxiliary Function

Description

Checks the passed parameters of the user.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrExp ConPwrNonMixExp ConPwrNonMixWei ConPwrNonMixGamma CompSurvMod


Auxiliary Function

Description

Calculates the maximum likelihood estimators of the non-mixture model with exponential survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixExp


Auxiliary Function

Description

Calculates the maximum likelihood estimators of the non-mixture model with Gamma type survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixGamma


Auxiliary Function

Description

Calculates the maximum likelihood estimators of the non-mixture model with Weibull type survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixWei


Auxiliary Function

Description

Calculates the further person months in the exponential model.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrExp


Auxiliary Function

Description

Calculates the further person months in the non-mixture model with exponential survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixExp


Auxiliary Function

Description

Calculates the further person months in the non-mixture model with Gamma type survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixGamma


Auxiliary Function

Description

Calculates the further person months in the non-mixture model with Weibull type survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixWei


Auxiliary Function

Description

Plots the conditional power curve in ConPwrExp, ConPwrNonMixExp, ConPwrNonMixWei and ConPwrNonMixGamma.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrExp ConPwrNonMixExp ConPwrNonMixWei ConPwrNonMixGamma


Auxiliary Function

Description

Plots the conditional power curve in CompSurvMod.

Author(s)

Andreas Kuehnapfel

See Also

CP CompSurvMod


Auxiliary Function

Description

Plots the estimated survival curves of the exponential model.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrExp


Auxiliary Function

Description

Plots the estimated survival curves of the non-mixture model with exponential survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixExp


Auxiliary Function

Description

Plots the estimated survival curves of the non-mixture model with Gamma type survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixGamma


Auxiliary Function

Description

Plots the estimated survival curves of the non-mixture model with Weibull type survival.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrNonMixWei


Auxiliary Function

Description

Plots the Kaplan-Meier curves.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrExp ConPwrNonMixExp ConPwrNonMixWei ConPwrNonMixGamma CompSurvMod


Auxiliary Function

Description

Splits the entire data frame into two sub data frames each for one group.

Author(s)

Andreas Kuehnapfel

See Also

CP ConPwrExp ConPwrNonMixExp ConPwrNonMixWei ConPwrNonMixGamma CompSurvMod


Test Data Frame

Description

The data frame 'test' is generated by random and does not refer to a special realistic issue.

Format

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

Source

CP
GenerateDataFrame