MTAFT_test {MTAFT} | R Documentation |
Perform score-type test for the presence of threshold effect in multi-threshold situations.
Description
This function performs a score-type test statistics for the presence of threshold effect in multi-threshold situations.
Usage
MTAFT_test(Y, X, Tq, delta, nboots)
Arguments
Y |
Response variable. |
X |
Covariates. |
Tq |
Threshold variable. |
delta |
Indicator vector for censoring. |
nboots |
Number of bootstrap iterations. |
Value
p-value result indicating the presence of threshold effect.
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)]
# Perform score-type test with 500 bootstraps
pval <- MTAFT_test(Y, X, Tq, delta, nboots = 500)
# Perform score-type test with 1000 bootstraps
pval <- MTAFT_test(Y, X, Tq, delta, nboots = 1000)
[Package MTAFT version 0.1.0 Index]