MTAFT_simdata {MTAFT}R Documentation

Generate simulated data for MTAFT analysis.

Description

This function generates simulated data for the MTAFT (Multi-Threshold Accelerated Failure Time) analysis based on a simple simulation procedure described in the article.

Usage

MTAFT_simdata(n, err = c("normal", "t3"))

Arguments

n

The number of sample size.

err

The error distribution type, either "normal" or "t3".

Value

A dataset containing the simulated data for MTAFT analysis.

Examples

# Generate simulated data with 500 samples and normal error distribution
dataset <- MTAFT_simdata(n = 500, err = "normal")
Y <- dataset[, 1]
delta <- dataset[, 2]
Tq <- dataset[, 3]
X <- dataset[, -c(1:3)]

# Generate simulated data with 200 samples and t3 error distribution
dataset <- MTAFT_simdata(n = 200, err = "t3")
Y <- dataset[, 1]
delta <- dataset[, 2]
Tq <- dataset[, 3]
X <- dataset[, -c(1:3)]

[Package MTAFT version 0.1.0 Index]