Title: | Estimation of CCI and CLFS Functions |
---|---|
Description: | The currentSurvival package contains functions for the estimation of the current cumulative incidence (CCI) and the current leukaemia-free survival (CLFS). The CCI is the probability that a patient is alive and in any disease remission (e.g. complete cytogenetic remission in chronic myeloid leukaemia) after initiating his or her therapy (e.g. tyrosine kinase therapy for chronic myeloid leukaemia). The CLFS is the probability that a patient is alive and in any disease remission after achieving the first disease remission. |
Authors: | Eva Koritakova (Janousova), Tomas Pavlik, Jiri Mayer, Ladislav Dusek |
Maintainer: | Eva Koritakova <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.1 |
Built: | 2024-10-31 19:49:21 UTC |
Source: | CRAN |
This function estimates the current cumulative incidence (CCI), i.e. the probability that a patient is alive and in any disease remission (e.g. complete cytogenetic remission in chronic myeloid leukaemia) after initiating his or her therapy (e.g. tyrosine kinase therapy for chronic myeloid leukaemia). Optionally, this function estimates the common cumulative incidence (comCI), i.e. the probability that a patient is alive and in the first disease remission after therapy initiation. The CCI and comCI curves can also be stratified by risk factors. Moreover, statistical test can be applied to compare the risk groups.
cci(data, maxx = NULL, com.est = TRUE, conf.int = FALSE, conf.int.level = NULL, no.iter = NULL, points = NULL, fig = TRUE, strat = FALSE, pvals = FALSE, pval.test = NULL)
cci(data, maxx = NULL, com.est = TRUE, conf.int = FALSE, conf.int.level = NULL, no.iter = NULL, points = NULL, fig = TRUE, strat = FALSE, pvals = FALSE, pval.test = NULL)
data |
a matrix with ascending times from therapy initiation to occurrence of individual events (in days, i.e. positive integer values), total follow-up times from therapy initiation to data cut-off date (in days), and censoring indicators; moreover, a vector for stratification factor may be included; |
maxx |
maximum follow-up time calculated from therapy initiation in years (defining time period for which the point estimates will be computed and curves will be plotted). Setting maxx smaller than the maximum follow-up time enables creating plots without fluctuating curve ends that may be caused by small number of patients. The default value is the maximum follow-up time (i.e. max(data[,2*r+1])/365). |
com.est |
a logical value indicating whether common cumulative incidence function should be estimated. The default value is TRUE. |
conf.int |
a logical value indicating whether confidence interval for the function(s) should be estimated. The default value is FALSE. |
conf.int.level |
two-sided confidence interval level (must be in range 0.9 and 0.99). The default value is 0.95. |
no.iter |
a number of bootstrap iterations for confidence interval computation (must be in range between 10 and 10,000). The default value is 100. |
points |
time points in which the point estimates will be computed (in months). The default values are 0, 12, 24, ..., floor(maxx/(365/12)). |
fig |
a logical value indicating whether a figure should be plotted. The default value is TRUE. |
strat |
a logical value indicating whether a stratification factor is included. The default value is FALSE. |
pvals |
a logical value indicating whether p-values for the comparison of stratified curves at pre-defined time points should be computed. The default value is FALSE. |
pval.test |
a type of a test that will be used for the computation of p-values. Possible values are “naive”, “log”, “loglog”. The default value is “loglog”. |
a list containing the following elements:
no.risk |
numbers of patients at risk at the defined time points |
pest |
a matrix of point estimates (accompanied with confidence intervals) at the defined time points |
pest.day |
a matrix of point estimates (accompanied with confidence intervals) at each day of the follow-up time |
pval |
p-values for the comparison of point estimates at the defined time points |
summary |
summary of input data |
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Pavlik T., Janousova E., Pospisil Z., et al. (2011). Estimation of current cumulative incidence of leukaemia-free patients and current leukaemia-free survival in chronic myeloid leukaemia in the era of modern pharmacotherapy. BMC Med Res Methodol 11:140.
## 4 examples of CCI estimation without stratification (and ## comCI estimation) with and without confidence intervals: data(cml) # load example data set cml <- cml[,c(1:7)] # select event and follow-up times and death # (stratification factor is not included) res <- cci(cml) # CCI + comCI without confidence intervals res <- cci(cml, com.est=FALSE) # CCI without confidence intervals ## Not run: res <- cci(cml, conf.int=TRUE, no.iter=10) # CCI + comCI with # confidence intervals res <- cci(cml, com.est=FALSE, conf.int=TRUE, no.iter=10) # CCI # with confidence intervals ## End(Not run) ## 4 examples of CCI estimation with stratification (and comCI ## estimation) with and without confidence intervals: data(cml) # load example data set cml <- cml[,c(1:7,10)] # select event and follow-up times, death, # and the EUTOS score as a stratification parameter res <- cci(cml, strat=TRUE) # stratified CCI + comCI without # confidence intervals res <- cci(cml, com.est=FALSE, strat=TRUE) # stratified CCI # without confidence intervals ## Not run: res <- cci(cml, conf.int=TRUE, no.iter=10, strat=TRUE, pvals=TRUE) # stratified CCI + comCI with confidence intervals res <- cci(cml, com.est=FALSE, conf.int=TRUE, no.iter=10, strat=TRUE, pvals=TRUE) # stratified CCI with # confidence intervals ## End(Not run) ## Not run: ## As the function does not allow setting plot option (e.g. line ## colour, width and type), you can create a plot using the ## following commands: data(cml) # load example data set cml <- cml[,c(1:7)] # select event and follow-up times and death # (stratification factor is not included) res <- cci(cml, conf.int=TRUE, no.iter=10) # CCI + comCI with # confidence intervals maxx <- max(res$pest.day[,1]) # maximum follow-up time in days x=0:maxx yrs <- floor(maxx/365) # maximum follow-up time in years plot(0,0,pch='.',cex=0.01,xlab="Years after therapy initiation", ylab="Probability",axes=FALSE,xlim=c(0,maxx),ylim=c(0,1)) # plot initialization axis(2,at=seq(0,1,0.2)) # setting of points where tick-marks are # to be drawn on the y-axis axis(1,at=seq(0,((yrs+1)*365),365),labels=seq(0,(yrs+1),1)) # setting of points where tick-marks are to be drawn on the # x-axis lines(x,res$pest.day[,2],type="S",lty=1,lwd=1) # lower confidence # interval for the CCI function estimate lines(x,res$pest.day[,3],type="S",lty=1,lwd=2) # CCI estimate lines(x,res$pest.day[,4],type="S",lty=1,lwd=1) # upper confidence # interval for the CCI function estimate lines(x,res$pest.day[,5],type="S",lty=2,lwd=1) # lower confidence # interval for the comCI function estimate lines(x,res$pest.day[,6],type="S",lty=2,lwd=2) # comCI estimate lines(x,res$pest.day[,7],type="S",lty=2,lwd=1) # upper confidence # interval for the comCI function estimate legend("bottomright",legend=c("CCI","95% conf. int.","comCI", "95% conf. int."),lwd=c(2,1,2,1),lty=c(1,1,2,2),bty="n", cex=0.9) ## End(Not run)
## 4 examples of CCI estimation without stratification (and ## comCI estimation) with and without confidence intervals: data(cml) # load example data set cml <- cml[,c(1:7)] # select event and follow-up times and death # (stratification factor is not included) res <- cci(cml) # CCI + comCI without confidence intervals res <- cci(cml, com.est=FALSE) # CCI without confidence intervals ## Not run: res <- cci(cml, conf.int=TRUE, no.iter=10) # CCI + comCI with # confidence intervals res <- cci(cml, com.est=FALSE, conf.int=TRUE, no.iter=10) # CCI # with confidence intervals ## End(Not run) ## 4 examples of CCI estimation with stratification (and comCI ## estimation) with and without confidence intervals: data(cml) # load example data set cml <- cml[,c(1:7,10)] # select event and follow-up times, death, # and the EUTOS score as a stratification parameter res <- cci(cml, strat=TRUE) # stratified CCI + comCI without # confidence intervals res <- cci(cml, com.est=FALSE, strat=TRUE) # stratified CCI # without confidence intervals ## Not run: res <- cci(cml, conf.int=TRUE, no.iter=10, strat=TRUE, pvals=TRUE) # stratified CCI + comCI with confidence intervals res <- cci(cml, com.est=FALSE, conf.int=TRUE, no.iter=10, strat=TRUE, pvals=TRUE) # stratified CCI with # confidence intervals ## End(Not run) ## Not run: ## As the function does not allow setting plot option (e.g. line ## colour, width and type), you can create a plot using the ## following commands: data(cml) # load example data set cml <- cml[,c(1:7)] # select event and follow-up times and death # (stratification factor is not included) res <- cci(cml, conf.int=TRUE, no.iter=10) # CCI + comCI with # confidence intervals maxx <- max(res$pest.day[,1]) # maximum follow-up time in days x=0:maxx yrs <- floor(maxx/365) # maximum follow-up time in years plot(0,0,pch='.',cex=0.01,xlab="Years after therapy initiation", ylab="Probability",axes=FALSE,xlim=c(0,maxx),ylim=c(0,1)) # plot initialization axis(2,at=seq(0,1,0.2)) # setting of points where tick-marks are # to be drawn on the y-axis axis(1,at=seq(0,((yrs+1)*365),365),labels=seq(0,(yrs+1),1)) # setting of points where tick-marks are to be drawn on the # x-axis lines(x,res$pest.day[,2],type="S",lty=1,lwd=1) # lower confidence # interval for the CCI function estimate lines(x,res$pest.day[,3],type="S",lty=1,lwd=2) # CCI estimate lines(x,res$pest.day[,4],type="S",lty=1,lwd=1) # upper confidence # interval for the CCI function estimate lines(x,res$pest.day[,5],type="S",lty=2,lwd=1) # lower confidence # interval for the comCI function estimate lines(x,res$pest.day[,6],type="S",lty=2,lwd=2) # comCI estimate lines(x,res$pest.day[,7],type="S",lty=2,lwd=1) # upper confidence # interval for the comCI function estimate legend("bottomright",legend=c("CCI","95% conf. int.","comCI", "95% conf. int."),lwd=c(2,1,2,1),lty=c(1,1,2,2),bty="n", cex=0.9) ## End(Not run)
This is an internal function and is not usually called by user.
This function estimates the unstratified current cumulative incidence (CCI), i.e. the probability that a patient is alive and in any disease remission after initiating his or her therapy. Optionally, this function estimates the unstratified common cumulative incidence (comCI) function.
cci.nostrat(data, maxx = NULL, com.est = TRUE, conf.int = FALSE, conf.int.level = NULL, no.iter = NULL, points = NULL, fig = TRUE)
cci.nostrat(data, maxx = NULL, com.est = TRUE, conf.int = FALSE, conf.int.level = NULL, no.iter = NULL, points = NULL, fig = TRUE)
data |
a matrix with ascending times from therapy initiation to occurrence of individual events (in days, i.e. positive integer values), total follow-up times from therapy initiation to data cut-off date (in days), and censoring indicators; the size of the data matrix is n times (2*r+2), where n is the number of patients and r is the maximum number of disease remissions achieved by patients; the data matrix consists of the following columns: |
maxx |
maximum follow-up time calculated from therapy initiation in days (defining time period for which the point estimates will be computed and curves will be plotted). Setting maxx smaller than the maximum follow-up time enables creating plots without fluctuating curve ends that may be caused by small number of patients. The default value is the maximum follow-up time (i.e. max(data[,2*r+1])). |
com.est |
a logical value indicating whether common cumulative incidence function should be estimated. The default value is TRUE. |
conf.int |
a logical value indicating whether confidence interval for the function(s) should be estimated. The default value is FALSE. |
conf.int.level |
two-sided confidence interval level (must be in range 0.9 and 0.99). The default value is 0.95. |
no.iter |
a number of bootstrap iterations for confidence interval computation (must be in range between 10 and 10,000). The default value is 100. |
points |
time points in which the point estimates will be computed (in months). The default values are 0, 12, 24, ..., floor(maxx/(365/12)). |
fig |
a logical value indicating whether a figure should be plotted. The default value is TRUE. |
a list containing the following elements:
no.risk |
numbers of patients at risk at the defined time points |
pest |
a matrix of point estimates (accompanied with confidence intervals) at the defined time points |
pest.day |
a matrix of point estimates (accompanied with confidence intervals) at each day of the follow-up time |
summary |
summary of input data |
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Pavlik T., Janousova E., Pospisil Z., et al. (2011). Estimation of current cumulative incidence of leukaemia-free patients and current leukaemia-free survival in chronic myeloid leukaemia in the era of modern pharmacotherapy. BMC Med Res Methodol 11:140.
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
This is an internal function and is not usually called by user.
This function estimates the current cumulative incidence (CCI), i.e. the probability that a patient is alive and in any disease remission after initiating his or her therapy.
cci.pest(E, LastContact, Exitus, maxx)
cci.pest(E, LastContact, Exitus, maxx)
E |
a matrix with ascending times from therapy initiation to occurrence of individual events (in days); the size of the data matrix is n times (2*r), where n is the number of patients and r is the maximum number of disease remissions achieved by patients; the data matrix consists of the following columns: |
LastContact |
a vector containing the follow-up time (time from therapy initiation to death or to the date of last contact with a patient) |
Exitus |
a vector containing the censoring indicators (1..patient died, 0..patient is censored) |
maxx |
maximum follow-up time in days |
x |
days from 0 to maximum follow-up time maxx |
y |
CCI function estimates at each day |
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Pavlik T., Janousova E., Pospisil Z., et al. (2011). Estimation of current cumulative incidence of leukaemia-free patients and current leukaemia-free survival in chronic myeloid leukaemia in the era of modern pharmacotherapy. BMC Med Res Methodol 11:140.
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
This is an internal function and is not usually called by user.
This function estimates the stratified current cumulative incidence (CCI), i.e. the probability that a patient is alive and in any disease remission after initiating his or her therapy. Optionally, this function estimates the stratified common cumulative incidence (comCI) function. Moreover, statistical test can be applied to compare the risk groups.
cci.strat(data, stratf = NULL, maxx = NULL, com.est = TRUE, conf.int = FALSE, conf.int.level = NULL, no.iter = NULL, points = NULL, fig = TRUE, pvals = FALSE, pval.test = NULL)
cci.strat(data, stratf = NULL, maxx = NULL, com.est = TRUE, conf.int = FALSE, conf.int.level = NULL, no.iter = NULL, points = NULL, fig = TRUE, pvals = FALSE, pval.test = NULL)
data |
a matrix with ascending times from therapy initiation to occurrence of individual events (in days, i.e. positive integer values), total follow-up times from therapy initiation to data cut-off date (in days), and censoring indicators; the size of the data matrix is n times (2*r+2), where n is the number of patients and r is the maximum number of disease remissions achieved by patients; the data matrix consists of the following columns: |
stratf |
stratification factor (maximum number of stratification levels is 8 because of figure clarity) |
maxx |
maximum follow-up time calculated from therapy initiation in days (defining time period for which the point estimates will be computed and curves will be plotted). Setting maxx smaller than the maximum follow-up time enables creating plots without fluctuating curve ends that may be caused by small number of patients. The default value is the maximum follow-up time (i.e. max(data[,2*r+1])). |
com.est |
a logical value indicating whether common cumulative incidence function should be estimated. The default value is TRUE. |
conf.int |
a logical value indicating whether confidence interval for the function(s) should be estimated. The default value is FALSE. |
conf.int.level |
two-sided confidence interval level (must be in range 0.9 and 0.99). The default value is 0.95. |
no.iter |
a number of bootstrap iterations for confidence interval computation (must be in range between 10 and 10,000). The default value is 100. |
points |
time points in which the point estimates will be computed (in months). The default values are 0, 12, 24, ..., floor(maxx/(365/12)). |
fig |
a logical value indicating whether a figure should be plotted. The default value is TRUE. |
pvals |
a logical value indicating whether p-values for the comparison of stratified curves at pre-defined time points should be computed. The default value is FALSE. |
pval.test |
a type of a test that will be used for the computation of p-values. Possible values are “naive”, “log”, “loglog”. The default value is “loglog”. |
a list containing the following elements:
no.risk |
numbers of patients at risk at the defined time points |
pest |
a matrix of point estimates (accompanied with confidence intervals) at the defined time points |
pest.day |
a matrix of point estimates (accompanied with confidence intervals) at each day of the follow-up time |
pval |
p-values for the comparison of point estimates at the defined time points |
summary |
summary of input data |
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Pavlik T., Janousova E., Pospisil Z., et al. (2011). Estimation of current cumulative incidence of leukaemia-free patients and current leukaemia-free survival in chronic myeloid leukaemia in the era of modern pharmacotherapy. BMC Med Res Methodol 11:140.
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
This is an internal function and is not usually called by user.
This function computes chi-square test for the comparison of three or more survival curves at fixed points in time using log transformation of the survival estimates.
chisq.log(st, ot.sq)
chisq.log(st, ot.sq)
st |
point estimates at fixed points in time |
ot.sq |
estimated variance |
chi-square test statistic
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Klein J.P., Logan B., Harhoff M., et al. (2007). Analyzing survival curves at a fixed point in time. Statistics in Medicine 26:4505–4519.
cci
, clfs
, chisq.loglog
, chisq.naive
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
This is an internal function and is not usually called by user.
This function computes chi-square test for the comparison of three or more survival curves at fixed points in time using complementary log-log transformation of the survival estimates.
chisq.loglog(st, ot.sq)
chisq.loglog(st, ot.sq)
st |
point estimates at fixed points in time |
ot.sq |
estimated variance |
chi-square test statistic
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Klein J.P., Logan B., Harhoff M., et al. (2007). Analyzing survival curves at a fixed point in time. Statistics in Medicine 26:4505–4519.
cci
, clfs
, chisq.log
, chisq.naive
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
This is an internal function and is not usually called by user.
This function computes naive chi-square test for the comparison of three or more survival curves at fixed points in time.
chisq.naive(st, ot.sq)
chisq.naive(st, ot.sq)
st |
point estimates at fixed points in time |
ot.sq |
estimated variance |
chi-square test statistic
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Klein J.P., Logan B., Harhoff M., et al. (2007). Analyzing survival curves at a fixed point in time. Statistics in Medicine 26:4505–4519.
cci
, clfs
, chisq.log
, chisq.loglog
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
This function estimates the current leukaemia-free survival (CLFS), i.e. the probability that a patient is alive and in any disease remission (e.g. complete cytogenetic remission in chronic myeloid leukaemia) after achieving the first disease remission. Optionally, this function estimates the common leukaemia-free survival (LFS), i.e. the probability that a patient is alive and in the first disease remission after achieving the first disease remission. The CLFS and LFS curves can also be stratified by risk factors. Moreover, statistical test can be applied to compare the risk groups. Only patients who achieved at least one disease remission during their treatment course are used for the estimation of the CLFS and LFS functions.
clfs(data, maxx = NULL, com.est = TRUE, conf.int = FALSE, conf.int.level = NULL, no.iter = NULL, points = NULL, fig = TRUE, strat = FALSE, pvals = FALSE, pval.test = NULL)
clfs(data, maxx = NULL, com.est = TRUE, conf.int = FALSE, conf.int.level = NULL, no.iter = NULL, points = NULL, fig = TRUE, strat = FALSE, pvals = FALSE, pval.test = NULL)
data |
a matrix with ascending times from therapy initiation to occurrence of individual events (in days, i.e. positive integer values), total follow-up times from therapy initiation to data cut-off date (in days), and censoring indicators; moreover, a vector for stratification factor may be included; |
maxx |
maximum follow-up time calculated from the achievement of the first disease remission in years (defining time period for which the point estimates will be computed and curves will be plotted). Setting maxx smaller than the maximum follow-up time enables creating plots without fluctuating curve ends that may be caused by small number of patients. The default value is the maximum follow-up time except the time from therapy initiation to achievement of the first disease remission (i.e. max(data[,2*r+1]-data[,1])/365). |
com.est |
a logical value indicating whether common leukaemia-free survival function should be estimated. The default value is TRUE. |
conf.int |
a logical value indicating whether confidence interval for the function(s) should be estimated. The default value is FALSE. |
conf.int.level |
two-sided confidence interval level (must be in range 0.9 and 0.99). The default value is 0.95. |
no.iter |
a number of bootstrap iterations for confidence interval computation (must be in range between 10 and 10,000). The default value is 100. |
points |
time points in which the point estimates will be computed (in months). The default values are 0, 12, 24, ..., floor(maxx/(365/12)). |
fig |
a logical value indicating whether a figure should be plotted. The default value is TRUE. |
strat |
a logical value indicating whether a stratification factor is included. The default value is FALSE. |
pvals |
a logical value indicating whether p-values for the comparison of stratified curves at pre-defined time points should be computed. The default value is FALSE. |
pval.test |
a type of a test that will be used for the computation of p-values. Possible values are “naive”, “log”, “loglog”. The default value is “loglog”. |
a list containing the following elements:
no.risk |
numbers of patients at risk at the defined time points |
pest |
a matrix of point estimates (accompanied with confidence intervals) at the defined time points |
pest.day |
a matrix of point estimates (accompanied with confidence intervals) at each day of the follow-up time |
pval |
p-values for the comparison of point estimates at the defined time points |
summary |
summary of input data |
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Pavlik T., Janousova E., Pospisil Z., et al. (2011). Estimation of current cumulative incidence of leukaemia-free patients and current leukaemia-free survival in chronic myeloid leukaemia in the era of modern pharmacotherapy. BMC Med Res Methodol 11:140.
## 4 examples of CLFS estimation without stratification (and ## LFS estimation) with and without confidence intervals: data(cml) # load example data set cml <- cml[,c(1:7)] # select event and follow-up times and death # (stratification factor is not included) res <- clfs(cml) # CLFS + LFS without confidence intervals res <- clfs(cml, com.est=FALSE) # CLFS without confidence # intervals ## Not run: res <- clfs(cml, conf.int=TRUE, no.iter=10) # CLFS + LFS with # confidence intervals res <- clfs(cml, com.est=FALSE, conf.int=TRUE, no.iter=10) # CLFS # with confidence intervals ## End(Not run) ## 4 examples of CLFS estimation with stratification (and LFS ## estimation) with and without confidence intervals: data(cml) # load example data set cml <- cml[,c(1:7,10)] # select event and follow-up times, death, # and the EUTOS score as a stratification parameter res <- clfs(cml, strat=TRUE) # stratified CLFS + LFS without # confidence intervals res <- clfs(cml, com.est=FALSE, strat=TRUE) # stratified CLFS # without confidence intervals ## Not run: res <- clfs(cml, conf.int=TRUE, no.iter=10, strat=TRUE, pvals=TRUE) # stratified CLFS + LFS with confidence intervals res <- clfs(cml, com.est=FALSE, conf.int=TRUE, no.iter=10, strat=TRUE, pvals=TRUE) # stratified CLFS with # confidence intervals ## End(Not run) ## Not run: ## As the function does not allow setting plot option (e.g. line ## colour, width and type), you can create a plot using the ## following commands: data(cml) # load example data set cml <- cml[,c(1:7)] # select event and follow-up times and death # (stratification factor is not included) res <- clfs(cml, conf.int=TRUE, no.iter=10) # CLFS + LFS with # confidence intervals maxx <- max(res$pest.day[,1]) # maximum follow-up time in days x=0:maxx yrs <- floor(maxx/365) # maximum follow-up time in years plot(0,1,pch='.',cex=0.01,xlim=c(0,maxx),ylim=c(0,1),axes=FALSE, xlab="Years after achievement of the first remission", ylab="Probability") # plot initialization axis(2,at=seq(0,1,0.2)) # setting of points where tick-marks are # to be drawn on the y-axis axis(1,at=seq(0,((yrs+1)*365),365),labels=seq(0,(yrs+1),1)) # setting of points where tick-marks are to be drawn on the # x-axis lines(x,res$pest.day[,2],type="S",lty=1,lwd=1) # lower confidence # interval for the CLFS function estimate lines(x,res$pest.day[,3],type="S",lty=1,lwd=2) # CLFS estimate lines(x,res$pest.day[,4],type="S",lty=1,lwd=1) # upper confidence # interval for the CLFS function estimate lines(x,res$pest.day[,5],type="S",lty=2,lwd=1) # lower confidence # interval for the LFS function estimate lines(x,res$pest.day[,6],type="S",lty=2,lwd=2) # LFS estimate lines(x,res$pest.day[,7],type="S",lty=2,lwd=1) # upper confidence # interval for the LFS function estimate legend("bottomright",legend=c("CLFS","95% conf. int.","LFS", "95% conf. int."),lwd=c(2,1,2,1),lty=c(1,1,2,2),bty="n", cex=0.9) ## End(Not run)
## 4 examples of CLFS estimation without stratification (and ## LFS estimation) with and without confidence intervals: data(cml) # load example data set cml <- cml[,c(1:7)] # select event and follow-up times and death # (stratification factor is not included) res <- clfs(cml) # CLFS + LFS without confidence intervals res <- clfs(cml, com.est=FALSE) # CLFS without confidence # intervals ## Not run: res <- clfs(cml, conf.int=TRUE, no.iter=10) # CLFS + LFS with # confidence intervals res <- clfs(cml, com.est=FALSE, conf.int=TRUE, no.iter=10) # CLFS # with confidence intervals ## End(Not run) ## 4 examples of CLFS estimation with stratification (and LFS ## estimation) with and without confidence intervals: data(cml) # load example data set cml <- cml[,c(1:7,10)] # select event and follow-up times, death, # and the EUTOS score as a stratification parameter res <- clfs(cml, strat=TRUE) # stratified CLFS + LFS without # confidence intervals res <- clfs(cml, com.est=FALSE, strat=TRUE) # stratified CLFS # without confidence intervals ## Not run: res <- clfs(cml, conf.int=TRUE, no.iter=10, strat=TRUE, pvals=TRUE) # stratified CLFS + LFS with confidence intervals res <- clfs(cml, com.est=FALSE, conf.int=TRUE, no.iter=10, strat=TRUE, pvals=TRUE) # stratified CLFS with # confidence intervals ## End(Not run) ## Not run: ## As the function does not allow setting plot option (e.g. line ## colour, width and type), you can create a plot using the ## following commands: data(cml) # load example data set cml <- cml[,c(1:7)] # select event and follow-up times and death # (stratification factor is not included) res <- clfs(cml, conf.int=TRUE, no.iter=10) # CLFS + LFS with # confidence intervals maxx <- max(res$pest.day[,1]) # maximum follow-up time in days x=0:maxx yrs <- floor(maxx/365) # maximum follow-up time in years plot(0,1,pch='.',cex=0.01,xlim=c(0,maxx),ylim=c(0,1),axes=FALSE, xlab="Years after achievement of the first remission", ylab="Probability") # plot initialization axis(2,at=seq(0,1,0.2)) # setting of points where tick-marks are # to be drawn on the y-axis axis(1,at=seq(0,((yrs+1)*365),365),labels=seq(0,(yrs+1),1)) # setting of points where tick-marks are to be drawn on the # x-axis lines(x,res$pest.day[,2],type="S",lty=1,lwd=1) # lower confidence # interval for the CLFS function estimate lines(x,res$pest.day[,3],type="S",lty=1,lwd=2) # CLFS estimate lines(x,res$pest.day[,4],type="S",lty=1,lwd=1) # upper confidence # interval for the CLFS function estimate lines(x,res$pest.day[,5],type="S",lty=2,lwd=1) # lower confidence # interval for the LFS function estimate lines(x,res$pest.day[,6],type="S",lty=2,lwd=2) # LFS estimate lines(x,res$pest.day[,7],type="S",lty=2,lwd=1) # upper confidence # interval for the LFS function estimate legend("bottomright",legend=c("CLFS","95% conf. int.","LFS", "95% conf. int."),lwd=c(2,1,2,1),lty=c(1,1,2,2),bty="n", cex=0.9) ## End(Not run)
This is an internal function and is not usually called by user.
This function estimates the unstratified current leukaemia-free survival (CLFS), i.e. the probability that a patient is alive and in any disease remission after achieving the first disease remission. Optionally, this function estimates the unstratified common leukaemia-free survival (LFS) function. Only patients who achieved at least one disease remission during their treatment course are used for the estimation of the CLFS and LFS functions.
clfs.nostrat(data, maxx = NULL, com.est = TRUE, conf.int = FALSE, conf.int.level = NULL, no.iter = NULL, points = NULL, fig = TRUE)
clfs.nostrat(data, maxx = NULL, com.est = TRUE, conf.int = FALSE, conf.int.level = NULL, no.iter = NULL, points = NULL, fig = TRUE)
data |
a matrix with ascending times from therapy initiation to occurrence of individual events (in days, i.e. positive integer values), total follow-up times from therapy initiation to data cut-off date (in days), and censoring indicators; the size of the data matrix is n times (2*r+2), where n is the number of patients and r is the maximum number of disease remissions achieved by patients; the data matrix consists of the following columns: |
maxx |
maximum follow-up time calculated from the achievement of the first disease remission in days (defining time period for which the point estimates will be computed and curves will be plotted). Setting maxx smaller than the maximum follow-up time enables creating plots without fluctuating curve ends that may be caused by small number of patients. The default value is the maximum follow-up time except the time from therapy initiation to achievement of the first disease remission (i.e. max(data[,2*r+1]-data[,1])). |
com.est |
a logical value indicating whether common cumulative incidence function should be estimated. The default value is TRUE. |
conf.int |
a logical value indicating whether confidence interval for the function(s) should be estimated. The default value is FALSE. |
conf.int.level |
two-sided confidence interval level (must be in range 0.9 and 0.99). The default value is 0.95. |
no.iter |
a number of bootstrap iterations for confidence interval computation (must be in range between 10 and 10,000). The default value is 100. |
points |
time points in which the point estimates will be computed (in months). The default values are 0, 12, 24, ..., floor(maxx/(365/12)). |
fig |
a logical value indicating whether a figure should be plotted. The default value is TRUE. |
a list containing the following elements:
no.risk |
numbers of patients at risk at the defined time points |
pest |
a matrix of point estimates (accompanied with confidence intervals) at the defined time points |
pest.day |
a matrix of point estimates (accompanied with confidence intervals) at each day of the follow-up time |
summary |
summary of input data |
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Pavlik T., Janousova E., Pospisil Z., et al. (2011). Estimation of current cumulative incidence of leukaemia-free patients and current leukaemia-free survival in chronic myeloid leukaemia in the era of modern pharmacotherapy. BMC Med Res Methodol 11:140.
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
This is an internal function and is not usually called by user.
This function estimates the current leukaemia-free survival (CLFS) function, i.e. the probability that a patient is alive and in any disease remission after achieving the first disease remission. Only patients who achieved at least one disease remission during their treatment course are used for the estimation of the CLFS function.
clfs.pest(E, LastContact, Exitus, maxx)
clfs.pest(E, LastContact, Exitus, maxx)
E |
a matrix with ascending times from achievement of the first disease remission to occurrence of individual events (in days); the size of the data matrix is n times (2*r-1), where n is the number of patients and r is the maximum number of disease remissions achieved by patients; the data matrix consists of the following columns: |
LastContact |
a vector containing the follow-up time (time from achievement of the first disease remission to death or to the date of last contact with a patient) |
Exitus |
a vector containing the censoring indicators (1..patient died, 0..patient is censored) |
maxx |
maximum follow-up time in days |
a list containing the following elements:
x |
days from 0 to maximum follow-up time maxx |
y |
CLFS function estimates at each day |
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Pavlik T., Janousova E., Pospisil Z., et al. (2011). Estimation of current cumulative incidence of leukaemia-free patients and current leukaemia-free survival in chronic myeloid leukaemia in the era of modern pharmacotherapy. BMC Med Res Methodol 11:140.
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
This is an internal function and is not usually called by user.
This function estimates the stratified current leukaemia-free survival (CLFS), i.e. the probability that a patient is alive and in any disease remission after achieving the first disease remission. Optionally, this function estimates the stratified common leukaemia-free survival (LFS) function. Moreover, statistical test can be applied to compare the risk groups. Only patients who achieved at least one disease remission during their treatment course are used for the estimation of the CLFS and LFS functions.
clfs.strat(data, stratf = NULL, maxx = NULL, com.est = TRUE, conf.int = FALSE, conf.int.level = NULL, no.iter = NULL, points = NULL, fig = TRUE, pvals = FALSE, pval.test = NULL)
clfs.strat(data, stratf = NULL, maxx = NULL, com.est = TRUE, conf.int = FALSE, conf.int.level = NULL, no.iter = NULL, points = NULL, fig = TRUE, pvals = FALSE, pval.test = NULL)
data |
a matrix with ascending times from therapy initiation to occurrence of individual events (in days, i.e. positive integer values), total follow-up times from therapy initiation to data cut-off date (in days), and censoring indicators; the size of the data matrix is n times (2*r+2), where n is the number of patients and r is the maximum number of disease remissions achieved by patients; the data matrix consists of the following columns: |
stratf |
stratification factor (maximum number of stratification levels is 8 because of figure clarity) |
maxx |
maximum follow-up time calculated from the achievement of the first disease remission in days (defining time period for which the point estimates will be computed and curves will be plotted). Setting maxx smaller than the maximum follow-up time enables creating plots without fluctuating curve ends that may be caused by small number of patients. The default value is the maximum follow-up time except the time from therapy initiation to achievement of the first disease remission (i.e. max(data[,2*r+1]-data[,1])). |
com.est |
a logical value indicating whether common cumulative incidence function should be estimated. The default value is TRUE. |
conf.int |
a logical value indicating whether confidence interval for the function(s) should be estimated. The default value is FALSE. |
conf.int.level |
two-sided confidence interval level (must be in range 0.9 and 0.99). The default value is 0.95. |
no.iter |
a number of bootstrap iterations for confidence interval computation (must be in range between 10 and 10,000). The default value is 100. |
points |
time points in which the point estimates will be computed (in months). The default values are 0, 12, 24, ..., floor(maxx/(365/12)). |
fig |
a logical value indicating whether a figure should be plotted. The default value is TRUE. |
pvals |
a logical value indicating whether p-values for the comparison of stratified curves at pre-defined time points should be computed. The default value is FALSE. |
pval.test |
a type of a test that will be used for the computation of p-values. Possible values are “naive”, “log”, “loglog”. The default value is “loglog”. |
a list containing the following elements:
no.risk |
numbers of patients at risk at the defined time points |
pest |
a matrix of point estimates (accompanied with confidence intervals) at the defined time points |
pest.day |
a matrix of point estimates (accompanied with confidence intervals) at each day of the follow-up time |
pval |
p-values for the comparison of point estimates at the defined time points |
summary |
summary of input data |
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Pavlik T., Janousova E., Pospisil Z., et al. (2011). Estimation of current cumulative incidence of leukaemia-free patients and current leukaemia-free survival in chronic myeloid leukaemia in the era of modern pharmacotherapy. BMC Med Res Methodol 11:140.
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
data of patients with chronic myeloid leukaemia
data(cml)
data(cml)
A data frame with 104 observations on the following 10 variables.
CCgR01
time from therapy initiation to achievement of the first disease remission
loss_CCgR01
time from therapy initiation to loss of the first disease remission
CCgR02
time from therapy initiation to achievement of the second disease remission
loss_CCgR02
time from therapy initiation to loss of the second disease remission
CCgR03
time from therapy initiation to achievement of the third disease remission
follow.up
follow-up time (time from therapy initiation to death or to the date of last contact with a patient)
death
censoring indicator (1..patient died, 0..patient is censored)
sokal
Sokal score (1..low-risk, 2..intermediate-risk, 3..high-risk)
euro
Euro score (1..low-risk, 2..intermediate-risk, 3..high-risk)
eutos
EUTOS score (0..low-risk, 1..high-risk)
population-based, observational study, INFINITY (https://www.leukemia-cell.org/index-en.php?pg=infinity–project-information)
Pavlik T., Janousova E., Pospisil Z., et al. (2011). Estimation of current cumulative incidence of leukaemia-free patients and current leukaemia-free survival in chronic myeloid leukaemia in the era of modern pharmacotherapy. BMC Med Res Methodol 11:140.
data(cml) str(cml)
data(cml) str(cml)
This is an internal function and is not usually called by user.
This function estimates the common cumulative incidence (comCI), i.e. the probability that a patient is alive and in the first disease remission after initiating his or her therapy.
comci.pest(t, LastContact, Exitus, maxx)
comci.pest(t, LastContact, Exitus, maxx)
t |
a vector containing the time from therapy initiation to achievement of the first disease remission (in days) |
LastContact |
a vector containing the follow-up time (time from therapy initiation to death or to the date of last contact with a patient) |
Exitus |
a vector containing the censoring indicators (1..patient died, 0..patient is censored) |
maxx |
maximum follow-up time in days |
a list containing the following elements:
x |
days from 0 to maximum follow-up time maxx |
y |
comCI function estimates at each day |
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Pavlik T., Janousova E., Pospisil Z., et al. (2011). Estimation of current cumulative incidence of leukaemia-free patients and current leukaemia-free survival in chronic myeloid leukaemia in the era of modern pharmacotherapy. BMC Med Res Methodol 11:140.
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
This is an internal function and is not usually called by user.
This function estimates the common leukaemia-free survival (LFS) function, i.e. the probability that a patient is alive and in the first disease remission after achieving the first disease remission. Only patients who achieved at least one disease remission during their treatment course are used for the estimation of the LFS function.
lfs.pest(t, LastContact, Exitus, maxx)
lfs.pest(t, LastContact, Exitus, maxx)
t |
a vector containing the time from achievement of the first disease remission to loss of the first disease remission (in days) |
LastContact |
a vector containing the follow-up time (time from achievement of the first disease remission to death or to the date of last contact with a patient) |
Exitus |
a vector containing the censoring indicators (1..patient died, 0..patient is censored) |
maxx |
maximum follow-up time in days |
a list containing the following elements:
x |
days from 0 to maximum follow-up time maxx |
y |
LFS function estimates at each day |
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Pavlik T., Janousova E., Pospisil Z., et al. (2011). Estimation of current cumulative incidence of leukaemia-free patients and current leukaemia-free survival in chronic myeloid leukaemia in the era of modern pharmacotherapy. BMC Med Res Methodol 11:140.
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
This is an internal function and is not usually called by user.
This function computes p-values for the comparison of two survival curves at fixed time points.
pvals.2cat(pest, pval.test)
pvals.2cat(pest, pval.test)
pest |
a matrix of point estimates accompanied with confidence intervals at fixed time points |
pval.test |
a type of a test used for the computation of p-values. Possible values are “naive”, “log”, “loglog”. The default value is “loglog”. |
a vector containing p-values for the comparison of the point estimates at fixed time points
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Klein J.P., Logan B., Harhoff M., et al. (2007). Analyzing survival curves at a fixed point in time. Statistics in Medicine 26:4505–4519.
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
This is an internal function and is not usually called by user.
This function computes p-values for the comparison of three or more survival curves at fixed time points.
pvals.cat(pest, pval.test)
pvals.cat(pest, pval.test)
pest |
a matrix of point estimates accompanied with confidence intervals at fixed time points |
pval.test |
a type of a test used for the computation of p-values. Possible values are “naive”, “log”, “loglog”. The default value is “loglog”. |
a vector containing p-values for the comparison of the point estimates at fixed time points
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Klein J.P., Logan B., Harhoff M., et al. (2007). Analyzing survival curves at a fixed point in time. Statistics in Medicine 26:4505–4519.
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.
This is an internal function and is not usually called by user.
This function assigns survival estimates to each day of the follow-up.
stretch(S, maxx)
stretch(S, maxx)
S |
a list containing: |
maxx |
maximum follow-up time in days |
a list containing the following elements:
x |
days from 0 to maximum follow-up time maxx |
y |
survival estimates at each day |
Eva Janousova, Tomas Pavlik
Institute of Biostatistics and Analyses
Masaryk University, Brno, Czech Republic
[email protected]
Pavlik T., Janousova E., Pospisil Z., et al. (2011). Estimation of current cumulative incidence of leukaemia-free patients and current leukaemia-free survival in chronic myeloid leukaemia in the era of modern pharmacotherapy. BMC Med Res Methodol 11:140.
# This is an internal function and is not usually called by user.
# This is an internal function and is not usually called by user.