Split-Population Duration (Cure) Regression

An implementation of split-population duration regression models. Unlike regular duration models, split-population duration models are mixture models that accommodate the presence of a sub-population that is not at risk for failure, e.g. cancer patients who have been cured by treatment. This package implements Weibull and Loglogistic forms for the duration component, and focuses on data with time-varying covariates. These models were originally formulated in Boag (1949) < http://www.jstor.org/stable/2983694> and Berkson and Gage (1952) < http://www.jstor.org/stable/2281318>, and extended in Schmidt and Witte (1989) .

Build Status CRAN version Coverage Status codecov

spduration implements a split-population duration model for duration data with time-varying covariates where a significant subset of the population or spells will not experience failure.

dur.coups <- add_duration(coups, "succ.coup", unitID="gwcode", tID="year",
# Estimate model
model.coups <- spdur(duration ~ polity2, atrisk ~ polity2, data = dur.coups,
                     silent = TRUE)
## Call:
## spdur(duration = duration ~ polity2, atrisk = atrisk ~ polity2, 
##     data = dur.coups, silent = TRUE)
## Duration equation: 
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  4.00150    0.23762  16.840  < 2e-16 ***
## polity2      0.20588    0.03037   6.779 1.21e-11 ***
## Risk equation: 
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)   6.5278     3.2556   2.005   0.0449 *
## polity2       0.8966     0.4084   2.196   0.0281 *
##            Estimate Std. Error t value Pr(>|t|)
## log(alpha) -0.03204    0.11899  -0.269    0.788
## ---
## Signif. codes: *** = 0.001, ** = 0.01, * = 0.05, . = 0.1
plot(model.coups, type = "hazard")


  • the latest released version from CRAN:
  • the latest development version:



spduration 0.17.1 (2018-03-26)

  • Add pkgdown static documentation website at https://andybeger.com/spduration.
  • Fix C++ code that was causing warnings on R-devel; replacing & and | with && and ||.

spduration 0.17.0 (2017-10-04)

  • Adds proper handling of the various na.action options for spdur and its predict, residuals, and fitted methods.
  • Import forecast generic function from forecast package rather than re-defining it. Adds forecast to neccessary imports.
  • Added bug reports link to DESCRIPTION for github issues page (https://github.com/andybega/spduration/issues).
  • Fixes minor errors in introduction vignette and data documentation.
  • Register C++ routines to avoid R-devel note.

spduration 0.16.0 (2017-04-11)

  • separationplot.spdur -> sepplot. separationplot is a standalone function so change the spdur version to a simple wrapper.
  • Cleaned up NAMESPACE. Moved stats to imported package in description and removed all associated explicit namespace generic imports.
  • Added package vignette.
  • Added file init.c with calls to R_registerRoutines() and R_useDynamicSymbols(); also use .registration=TRUE in useDynLib in NAMESPACE. R-devel (and R 3.4.0 in the future) R CMD check issues a NOTE for registration of routines, this is to avoid that note.
  • Updated DESCRIPTION and added references.

spduration 0.15.1 (2016-05-12)

  • Fixes bug in summary.spdur that would return wrong estimates for log(alpha).
  • Better column names for summary and xtable methods.
  • Fixes test error after testthat update.

spduration 0.15.0

  • Added accessor methods for terms, model.matrix, coef, and vcov.
  • Added fitted and residuals methods.
  • Fixes issue #17, which led to errors in summary.spdur when called on a model with factor variables or without intercept terms.
  • Fixes an issue with the hazard rate plot confidence intervals (plot_hazard(ci = TRUE)), where CIs coud be wrong because coefficients were sampled by equation rather than using the full variance covariance matrix.

spduration 0.14.0

  • Added Belkin & Schofer 2003 coup data in data(bscoup), see ?bscoup.
  • Replaced plot_hazard1 and plot_hazard2 with plot_hazard, added support for loglog models, and other internal streamlining of plotting code.
  • Partial fix for summarizing and printing results for models without intercept term.
  • Removed documentation and export for several internal functions.

spduration 0.13.1

  • Initial CRAN release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.17.1 by Andreas Beger, 4 years ago

https://github.com/andybega/spduration, https://andybeger.com/spduration

Report a bug at https://github.com/andybega/spduration/issues

Browse source code at https://github.com/cran/spduration

Authors: Andreas Beger [aut, cre] , Daina Chiba [aut] , Daniel W. Hill , Jr. [aut] , Nils W. Metternich [aut] , Shahryar Minhas [aut] , Michael D. Ward [aut, cph]

Documentation:   PDF Manual  

GPL-3 license

Imports corpcor, graphics, forecast, plyr, MASS, stats, Rcpp, separationplot, xtable

Suggests covr, devtools, testthat, knitr, rmarkdown

Linking to Rcpp, RcppArmadillo

Suggested by BayesSPsurv.

See at CRAN