MyNixOS website logo
Description

Parametric Time-to-Event Analysis with Variable Incubation Phases.

Fit parametric models for time-to-event data that show an initial 'incubation period', i.e., a variable delay phase where the hazard is zero. The delayed Weibull distribution serves as foundational data model. The specific method of 'MPSE' (maximum product of spacings estimation) and MLE-based methods are used for parameter estimation. Bootstrap confidence intervals for parameters and significance tests in a two group setting are provided.

incubate package

In survival analysis, events sometimes only start to occur after a certain delay since entry time and this delay period might vary for different treatments or groups. While parametric delay models, like the three-parameter Weibull distribution, might adequately describe this process the estimation of delay via standard maximum likelihood is severely biased in small samples. The R-package incubate employs an alternative estimation method called maximum product of spacings estimation (MPSE) to estimate and test delay and other parameters in a one or two group setting. Concretely, building on MPSE, incubate can

  1. fit parameter estimates where certain parameters can be constrained to be shared between both groups
  2. calculate bootstrap confidence intervals for these model parameters and
  3. compare the survival experience of two groups within this statistical model with respect to model parameters.

Example

The incubate-package provides the delayed exponential distribution as special case of the delayed Weibull distribution. We draw random samples corresponding to two groups with different model parameters.

library("incubate")

# simulate data from exponential distribution with delay
x <- rexp_delayed(n = 13, delay1 = 1.0, rate1 = 0.8)
y <- rexp_delayed(n = 11, delay1 = 1.5, rate1 = 1.2)

We use the model function delay_model to fit a exponential model with delay to both groups and show the model fit.

fm <- delay_model(x, y)

plot(fm)

Inference on the model parameters is possible through confint for bootstrap confidence intervals and delay_test for parameter comparisons in a two group setting.

# confidence interval for delay-parameters
confint(fm, parm = c('delay1.x', 'delay1.y'))
#>               2.5%    97.5%
#> delay1.x 0.8060324 1.094331
#> delay1.y 1.3505534 1.753090

# test on difference in delay
# for real applications use R>=1000 bootstrap draws
delay_test <- test_diff(x, y, R = 100)
plot(delay_test)

Parallel computation

To switch on parallel computation, e.g. for bootstrap parameter tests or power simulations, simply set up a suitable computation plan via the Future-API. For instance, do the following to activate four R-sessions in the background of your local computer for computer-intensive tasks in incubate:

library("future")
plan(multisession, workers = 4)

That’s it. You do not have to change any function calls. incubate is future-aware. Consult the future-package on CRAN for more information about futures and about supported computation plans.

When you are done with the heavy computing, it is best practice to release the parallel connections via plan(sequential).

Installation

The incubate package is found on CRAN and development happens at Gitlab.

Use install.packages to install incubate from CRAN as usual, i.e., install.packages("incubate") should do.

To install its latest version from the main branch on Gitlab use the following R-code:

remotes::install_gitlab("imb-dev/incubate")

To install a specific version, add the version tag after the name, separated by a @, e.g. to install incubate in version v1.1.9 use

remotes::install_gitlab("imb-dev/[email protected]")

The suffix @develop points to the latest development version on Gitlab.

Metadata

Version

1.3.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows