Package 'smcure'

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

Help Index


Bone marrow transplant study

Description

Bone marrow transplant study which is widely used in the AFTMC model

Usage

data(bmt)

Format

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


Retrieves the estimated coefficients from object

Description

Retrieving coefficients, printing method, and summary mthod for a smcure object.

Usage

coefsmcure(x,...)

Arguments

x

an object from smcure function

...

Further arguments to be passed to the printsmcure function.


Eastern Cooperative Oncology Group (ECOG) data

Description

Eastern Cooperative Oncology Group (ECOG) data used for modeling PH semicure model

Usage

data(e1684)

Format

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

Description

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

Usage

em(Time, Status, X, Z, offsetvar, b, beta, model, link, emmax, eps)

Arguments

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 smcure object

Description

plot predicted survival curve(s) from the estimated mixture cure model

Usage

plotpredictsmcure(object, type = "S", xlab = "Time",
ylab = "Predicted Survival Probability",
model = c("ph", "aft"), ...)

Arguments

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

Description

Prediction of semicure model

Usage

predictsmcure(object, newX, newZ, model = c("ph", "aft"), ...)

Arguments

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

Details

Predicted population survival function can be calculated by the following equation

Spop(t)=π+(1π)S(t)S_{pop}(t)=\pi+(1-\pi)*S(t)


Print smcure object

Description

Output of smcure object

Usage

printsmcure(x, Var, ...)

Arguments

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

Description

Title

Usage

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
)

Arguments

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

Value

a smcure object

Examples

data(e1684)
pd <- smcure(Surv(FAILTIME,FAILCENS)~TRT+SEX+AGE,
cureform=~TRT+SEX+AGE,data=e1684,model="ph",
Var = FALSE)
printsmcure(pd,Var = FALSE)

Estimation of the baseline survival

Description

This R-program uses the Breslow method to estimate baseline survival of PH mixture cure model and AFT mixture cure model.

Usage

smsurv(Time, Status, X, beta, w, model)

Arguments

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"