IAEISE: The Integrate Absolute Error and The Integrate Square Error

View source: R/IAEISE.R

IAEISER Documentation

The Integrate Absolute Error and The Integrate Square Error

Description

Two ways of the continuous-time approach to continuous-time identification based on least-squares and least-absolute errors are proposed. Integrate Absolute Error and Integrate Square Error.To evaluate the performance of survival models methods Lower values of IAE or ISE indicate better performances.

Usage

IAEISE(object, sp_matrix, IRange = c(-2, -1))

Arguments

object

object of class Surv created by Surv function or a fitted survival model, including the survival model fitted by coxph, survreg, and rfsrc.

sp_matrix

a matrix or data.frame of predicted values of survival probabilities for the testing set. rows denote different samples, columns denote different time points, and the values in row i and column j of the matrix denote the predicted survival probability of the ith sample at the time point corresponding to the jth column.

IRange

a vector contains all discrete time points corresponding to the predicted probability in sp_matrix. Or the scale you want to get the IAE and ISE; .

Value

Estimates of the Integrate Absolute Error and the Integrate Square Error of the predicted values of survival probabilities.

Author(s)

Hanpu Zhou zhouhanpu@csu.edu.cn

References

Marron, J. S. , & Wand, M. P. . (1992). Exact mean integrated squared error. Annals of Statistics, 20(2), 712-736.

HooraMoradian, DenisLarocque, & FranoisBellavance. (2017). L1 splitting rules in survival forests. Lifetime Data Analysis, 23(4), 671–691.

Kowalczuk, & Z. (1998). Integrated squared error and integrated absolute error in recursive identification of continuous-time plants. Control 98 Ukacc International Conference on (Vol.1998, pp.693-698). IET.

Examples


library(survival)
library(SurvMetrics)
set.seed(123)
N <- 100
mydata <- SDGM4(N, p = 20, c_step = -0.5)
index.train <- sample(1:N, 2 / 3 * N)
data.train <- mydata[index.train, ]
data.test <- mydata[-index.train, ]

time_interest <- sort(data.train$time[data.train$status == 1])
sp_matrix <- matrix(sort(runif(nrow(data.test) * length(time_interest)),
  decreasing = TRUE
), nrow = nrow(data.test))
object <- Surv(data.test$time, data.test$status)

# a vector for all the distinct time
IAEISE(object, sp_matrix, time_interest)
# a range
IAEISE(object, sp_matrix, c(12, 350))


SurvMetrics documentation built on Sept. 4, 2022, 1:06 a.m.