Description Usage Arguments Value Examples
View source: R/simulated_data.R
weibull_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.
1 | weibull_data(n, tau = 1, test = FALSE)
|
n |
A positive integer (sample size) |
tau |
A non-negative value (defining the support of T and C). Default value is 1. |
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). |
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).
1 | d <- weibull_data(n=100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.