lpsmc: Fit a mixture cure model with Laplacian-P-splines.

View source: R/lpsmc.R

lpsmcR Documentation

Fit a mixture cure model with Laplacian-P-splines.

Description

This routine fits a mixture cure model with a logistic link function for the incidence part and a flexible Cox proportional hazards model for the latency part where the baseline survival is approximated with penalized B-splines. Laplace approximations are used to approximate the conditional posterior distribution of the latent vector. A robust prior specification is imposed on the roughness penalty parameter following Jullion and Lambert (2007). The roughness penalty parameter is optimized and a maximum a posteriori estimate is returned. The routine computes point estimates and credible intervals for the latent parameters.

Usage

lpsmc(
  formula,
  data,
  K = 15,
  penorder = 3,
  stepsize = 0.2,
  deltaprior = 1e-04,
  v0 = 15,
  checkPD = TRUE
)

Arguments

formula

A model formula of the form Surv(tobs,delta)~ inci()+late().

data

A data frame.

K

The number of B-spline coefficients.

penorder

The order of the penalty.

stepsize

The stepsize taken to maximize the log posterior penalty.

deltaprior

The parameters of the Gamma prior for the dispersion parameter.

v0

Initial parameter value for finding MAP of penalty parameter.

checkPD

Should checks for positive definiteness be made? Default is TRUE.

Value

An object of class lpsmc.

Author(s)

Oswaldo Gressani oswaldo_gressani@hotmail.fr .

References

Jullion, A. and Lambert, P. (2007). Robust specification of the roughness penalty prior distribution in spatially adaptive Bayesian P-splines models. Computational Statistical & Data Analysis 51 (5), 2542-2558.https://doi.org/10.1016/j.csda.2006.09.027

See Also

lpsmc.object

Examples

### Real data application ECOG e1684 clinical trial
data("ecog1684")
formula <- Surv(tobs,delta) ~ inci(SEX + TRT + AGE) + late(SEX + TRT + AGE)
fite1684 <- lpsmc(formula = formula, data = ecog1684)
fite1684

### Application on breast cancer data
rm(list=ls())
data("breastcancer")
formula <- Surv(tobs, delta) ~ inci(AGE + ER) + late(AGE + ER)
fitcancer <- lpsmc(formula = formula, data = breastcancer, K = 20)
fitcancer


oswaldogressani/mixcurelps documentation built on Oct. 30, 2024, 10:45 p.m.