Title: | Fit Semiparametric Mixture Cure Models |
---|---|
Description: | An R-package for Estimating Semiparametric PH and AFT Mixture Cure Models. |
Authors: | Chao Cai, Yubo Zou, Yingwei Peng, Jiajia Zhang |
Maintainer: | Chao Cai <[email protected]> |
License: | GPL-2 |
Version: | 2.1 |
Built: | 2024-11-15 06:34:54 UTC |
Source: | CRAN |
Bone marrow transplant study which is widely used in the AFTMC model
data(bmt)
data(bmt)
There were 46 patients in the allogeneic treatment and 44 patients in the autologous treatment group
Time
time to event
Status
censor indicator, 0 for censored and 1 for uncensored
TRT
1 for autologous treatment group; 0 for allogeneic treatment group
Retrieving coefficients, printing method, and summary mthod for a smcure object.
coefsmcure(x,...)
coefsmcure(x,...)
x |
an object from smcure function |
... |
Further arguments to be passed to the printsmcure function. |
Eastern Cooperative Oncology Group (ECOG) data used for modeling PH semicure model
data(e1684)
data(e1684)
A data frame with 284 observations on the following 5 variables.
TRT
0=control group, 1=IFN treatment group
FAILTIME
observed relapse-free time
FAILCENS
relapse-free censor indicator
AGE
continuous variable, which is centered to the mean
SEX
0 for male, 1 fopr female
EM algorithm used in the mixture cure model by assuming a latent indicator of uncure. Detailed estimation methods can be found in the reference section
em(Time, Status, X, Z, offsetvar, b, beta, model, link, emmax, eps)
em(Time, Status, X, Z, offsetvar, b, beta, model, link, emmax, eps)
Time |
time to event of interest |
Status |
status indicator, 0=alive, 1=dead |
X |
a vector or matrix of covariates corresponding to latency part |
Z |
a vector or matrix of covariates corresponding to incidence part |
offsetvar |
offset variable |
b |
initial value for parameter b |
beta |
initial value for parameter beta |
model |
either "ph" or "aft" |
link |
specifies the link in incidence part. The "logit", "probit" or complementary loglog ("cloglog") links are available. By default link = "logit". |
emmax |
specifies the maximum iteration number. If the convergence criterion is not met, the EM iteration will be stopped after emmax iterations and the estimates will be based on the last maximum likelihood iteration. The default emmax = 100. |
eps |
sets the convergence criterion. The default is eps = 1e-7. The iterations are considered to be converged when the maximum relative change in the parameters and likelihood estimates between iterations is less than the value specified. |
plot predicted survival curve(s) from the estimated mixture cure model
plotpredictsmcure(object, type = "S", xlab = "Time", ylab = "Predicted Survival Probability", model = c("ph", "aft"), ...)
plotpredictsmcure(object, type = "S", xlab = "Time", ylab = "Predicted Survival Probability", model = c("ph", "aft"), ...)
object |
an object of the predictsmcure function |
type |
type of plot. "S" means steps plot. |
xlab |
a label for the x axis |
ylab |
a label for the y axis |
model |
either "ph" or "aft" |
... |
Further options in plotfunction can be passed to the plotpredictsmcure function |
Prediction of semicure model
predictsmcure(object, newX, newZ, model = c("ph", "aft"), ...)
predictsmcure(object, newX, newZ, model = c("ph", "aft"), ...)
object |
an object of smcure |
newX |
new value(s) of X |
newZ |
new value(s) of Z |
model |
either 'ph' or 'aft' |
... |
further arguments to be passed to the predictsmcure function |
Predicted population survival function can be calculated by the following equation
Output of smcure object
printsmcure(x, Var, ...)
printsmcure(x, Var, ...)
x |
an object of smcure |
Var |
If it is TRUE, the program returns standard error by bootstrap method. If set to False, the program only returns estimators of coefficients. By default, Var = TRUE |
... |
Further arguments to be passed to the printsmcure function. |
Title
smcure( formula, cureform, offset = NULL, data, na.action = na.omit, model = c("aft", "ph"), link = "logit", Var = TRUE, emmax = 50, eps = 1e-07, nboot = 100 )
smcure( formula, cureform, offset = NULL, data, na.action = na.omit, model = c("aft", "ph"), link = "logit", Var = TRUE, emmax = 50, eps = 1e-07, nboot = 100 )
formula |
a formula object |
cureform |
specifies the variables in the incidence |
offset |
variable(s) with coefficient 1 in PH model or AFT model |
data |
a data.frame in which to interpret the variables named in the formula and cureform |
na.action |
a missing-data filter function. By default na.action = na.omit |
model |
specifies your model ph or aft |
link |
incidence part |
Var |
By default Var = TRUE |
emmax |
maximum iteration number |
eps |
convergence criterion |
nboot |
number of bootstrap sampling |
a smcure object
data(e1684) pd <- smcure(Surv(FAILTIME,FAILCENS)~TRT+SEX+AGE, cureform=~TRT+SEX+AGE,data=e1684,model="ph", Var = FALSE) printsmcure(pd,Var = FALSE)
data(e1684) pd <- smcure(Surv(FAILTIME,FAILCENS)~TRT+SEX+AGE, cureform=~TRT+SEX+AGE,data=e1684,model="ph", Var = FALSE) printsmcure(pd,Var = FALSE)
This R-program uses the Breslow method to estimate baseline survival of PH mixture cure model and AFT mixture cure model.
smsurv(Time, Status, X, beta, w, model)
smsurv(Time, Status, X, beta, w, model)
Time |
this is the follow up time for "ph" model. If model is "aft", then this is residual. |
Status |
The status indicator, normally 0=alive, 1=dead |
X |
effects of covariates of uncured patients |
beta |
initial beta from coxph |
w |
conditional probability of the ith individual remains uncured at the mth iteration. We use Status as initial value |
model |
specifies your model, it can be "ph" or "aft" |