MyNixOS website logo
Description

Simulate and Analyze Interval- and Mixed-Censored Survival Data.

Provides tools to simulate and analyze survival data with interval-, left-, right-, and uncensored observations under common parametric distributions, including "Weibull", "Exponential", "Log-Normal", "Log-Logistic", "Gamma", "Gompertz", "Normal", "Logistic", and "EMV". The package supports both direct maximum likelihood estimation and imputation-based methods, making it suitable for methodological research, simulation benchmarking, and teaching. A web-based companion app is also available for demonstration purposes.

simIC

The simIC package provides tools for simulating and analyzing interval-censored survival data, including left-, right-, and uncensored observations, using a variety of parametric distributions. It is useful for teaching, model development, and method evaluation in survival analysis.

✨ Features

  • Supports commonly used parametric distributions:

    • Weibull
    • Exponential
    • Log-Normal
    • Logistic
    • Normal
    • Log-Logistic
    • Gamma
    • Gompertz
    • EMV (Extreme Minimum Value / Gumbel)
  • Simulates survival data with interval, left, right, and uncensored observations using user-defined visit schedules (start_time, end_time) and an optional tolerance (uncensored_tol) for detecting exact event times.

  • Provides two estimation functions:

    • mle_int()

      • Performs direct maximum likelihood estimation
      • Automatically detects and handles:
        • Interval-censored: contribution from F(Ri) - F(Li)
        • Left-censored: contribution from F(Ri)
        • Right-censored: contribution from 1 - F(Li)
        • Uncensored: contribution from f(ti)
    • mle_imp()

      • Uses imputation-based likelihood for interval- and uncensored data
      • For left- and right-censored, uses the proper likelihood contributions without imputation
      • Specifically:
        • Interval-censored: event times imputed from (Li, Ri) using midpoint, random, medians, or survival-based methods
        • Left-censored: contribution from F(Ri)
        • Right-censored: contribution from 1 - F(Li)
        • Uncensored: contribution from f(ti)

📦 Installation

You can install the development version of simIC from GitHub:

install.packages("remotes")
remotes::install_github("jayarasan/simIC")
library(simIC)

🧪 Simulate Survival Data
# Interval-censored data only (no visit window)
data <- simIC(n = 100, dist = "weibull", shape = 1.5, scale = 5, width = 2)

# Left-, right-, and uncensored data using a follow-up window and tolerance
data <- simIC(n = 100, dist = "weibull", shape = 1.5, scale = 5,
              width = 2, start_time = 0, end_time = 10, uncensored_tol = 0.1)

📈 Model Fitting Examples

# Direct MLE for interval-censored data
fit_int <- mle_int(data$left, data$right, dist = "weibull")
print(fit_int$estimates)

# Imputation-based MLE (midpoint)
fit_imp <- mle_imp(data$left, data$right, dist = "weibull", impute = "midpoint")
print(fit_imp$estimates)
Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • 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