exp_data: Simulate Current Status Data from Exponential Failure and...

Description Usage Arguments Value Examples

View source: R/simulated_data.R

Description

exp_data returns a list that includes a data frame of size [n,3]. The first column corresponds to the univarite covarite Z, the second column is the current status indicator, and the third column is the censoring times. Note that when test=TRUE we get an extra column with the true uncensored failure time T.

Usage

1
exp_data(n, tau = 3, test = FALSE)

Arguments

n

A positive integer (sample size)

tau

A non-negative value (defining the support of T and C). Default value is 3.

test

Logical indicating whether the function should return in addition also the true (uncensored) failure time, together with Bayes risk, for testing. Default value is False and then only current status data is returned (for training).

Value

A list containing: (1) the simulated data in the format of a data frame with the columns Z, delta, C, and possibly also T (for testing only), and (2) the Bayes risk which can only be evaluated when test=TRUE (otherwise it is NA).

Examples

1
d <- exp_data(n=100)

Yael-Travis-Lumer/KMforCSD documentation built on June 3, 2021, 6:54 a.m.