Skip to content

Involve the estimation methods for cure mixture and nonmixture models

Notifications You must be signed in to change notification settings

lcyjames/WeibullCMs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Weibull Cure mixture and nonmixture Models

This package performs parameter estimation for the cure mixture and nonmixture models based on right-censored data. The two-parameter Weibull distribution is assumed for the latency component. The cure mixture model assumes a logistic model for the incidence component, and the non-mixture model assumes the complementary log-log model for the incidence component. The parameter estimation for both parametric cure models is performed based on the EM algorithm.

How to import the Functions

install.packages("devtools")
library(devtools)
source_url("https://github.com/lcyjames/WeibullCMs/blob/main/CoreFunctions.R?raw=TRUE")

Functions

wmcmEM(Yi, cen, X, Z, trace=FALSE, tolerance=10^{-4})
This is the estimation procedure of the Weibull Mixture Cure Model based on the EM algorithm.

wnmcmEM(Yi, cen, X, Z, trace=FALSE, tolerance=10^{-4})
This is the estimation procedure of the Weibull Non-Mixture Cure Model based on the EM algorithm

Both functions take the arguments below:

  • Yi is a vector of the right censored observed failure times, with size n
  • cen is the corresponding censoring indicator with 1 being cases and 0 being censored, with size n
  • X is a covariate matrix for the incidence component with size n times the number of covariates
  • Z is a covariate matrix for the latency component with size n times the number of covariates; X and Z do not contain a column of 1 (i.e. no intercept is required); X can be completely, partially, or not different from Z.
  • trace=FALSE by default. For tracking the converging path of the parameter estimation, set trace=TRUE
  • tolerance is the converging criteria typically assigned to be 10^{-4}

About

Involve the estimation methods for cure mixture and nonmixture models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages