MyNixOS website logo
Description

Data-Driven Estimation for Multi-Threshold Accelerate Failure Time Model.

Developed a data-driven estimation framework for the multi-threshold accelerate failure time (MTAFT) model. The MTAFT model features different linear forms in different subdomains, and one of the major challenges is determining the number of threshold effects. The package introduces a data-driven approach that utilizes a Schwarz' information criterion, which demonstrates consistency under mild conditions. Additionally, a cross-validation (CV) criterion with an order-preserved sample-splitting scheme is proposed to achieve consistent estimation, without the need for additional parameters. The package establishes the asymptotic properties of the parameter estimates and includes an efficient score-type test to examine the existence of threshold effects. The methodologies are supported by numerical experiments and theoretical results, showcasing their reliable performance in finite-sample cases.

MTAFT: Data-driven Estimation for Multi-Threshold Accelerated Failure Time Model

This repository contains the code for the article titled "Data-driven Estimation for Multi-Threshold Accelerated Failure Time Model" (MTAFT). The MTAFT model is a statistical method used for estimating failure times in the presence of multiple thresholds. The code provided here implements the MTAFT model and its associated functions.

Functions

The repository includes the following R functions:

MTAFT_CV

This function implements the cross-validation (CV) method proposed in the MTAFT article. It combines the Wild Binary Segmentation (WBS) or Dynamic Programming (DP) algorithm to determine the optimal number of thresholds.

MTAFT_IC

This function implements the information criterion (IC) method proposed in the MTAFT article. It also combines the WBS or DP algorithm to determine the optimal number of thresholds.

TSMCP

This function implements Li and Jin's (2018) method, which transforms the multi-threshold estimation problem into a variable selection problem.

MTAFT_simdata

This function provides a simple data generation process for simulating data to evaluate the performance of the MTAFT model. It generates a dataset consisting of the response variable (Y), deletion indicator function (delta), threshold variable (Tq), and covariate matrix (X).

MTAFT_test

This function implements a hypothesis test for the existence of thresholds using a score-type statistic. It is applicable to scenarios with multiple thresholds.

Usage

Install

devtools::install_github("zenghao-stat/MTAFT")
library(MTAFT)

Here are examples of how to use the provided R functions:

Generating simulated data

n <- 500
err <- "normal" # or "t3"
dataset <- MTAFT_simdata(n, err)
Y <- dataset[, 1]
delta <- dataset[, 2]
Tq <- dataset[, 3]
X <- dataset[, -c(1:3)]

Testing threshold effects

nboots <- 500
pval <- MTAFT_test(Y, X, Tq, delta, nboots)

Detecting the number and positions of breakpoints

library(grpreg)

n1 <- sum(delta)
c <- seq(0.5, 1.5, 0.1)
m <- ceiling(c * sqrt(n1))
bicy <- rep(NA, length(c))
tsmc <- NULL
p <- ncol(X)
for (i in 1:length(c)) {
  tsm <- try(TSMCP(Y, X, delta, c[i], penalty = "scad"), silent = TRUE)
  if (is(tsm, "try-error")) next()
  bicy[i] <- log(n) * ((length(tsm[[1]]) + 1) * (p + 1)) + n * log(tsm[[3]])
  tsmc[[i]] <- tsm
}

if (any(!is.na(bicy))) {
  tsmcp <- tsmc[[which(bicy == min(bicy))[1]]]
  thre.LJ <- Tq[tsmcp[[1]]]
  thre.num.Lj <- length(thre.LJ)
}

Applying the information criterion method

c0 <- 0.299
delta0 <- 2.01
algorithm <- "WBS"
dist_min <- 50
ncps_max <- 4

result <- MTAFT_IC(Y, X, delta, Tq, c0, delta0, algorithm, dist_min, ncps_max)

Applying the cross-validation method

algorithm <- "WBS"
dist_min <- 50
ncps_max <- 4

result <- MTAFT_CV(Y, X, delta, Tq, algorithm, dist_min, ncps_max)

Reference

Wan, C., Zeng, H., Zhong, W., et al. (2023) Data-driven estimation for multi-threshold accelerated failure time model. Working paper.

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-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