rcensI {rcens} | R Documentation |
Generate interval censoring sample
Description
Generator of interval censored samples where the length of interval is random, given a generator of samples of the distribution X (rdistrX) with parameters appended by the list param_X. Generator sample of distribution C (censoring) with parameters appended by the list param_C In which, you can control the desired censorship percentage.
Usage
rcensI(
rdistrX,
rdistrC,
param_X,
param_C,
n = 10000,
epsilon = 0.5,
n_mc = 10000,
theta = 1,
verbose = FALSE
)
Arguments
rdistrX |
sample generator of distribution X. |
rdistrC |
sample generator of distribution C. |
param_X |
list with parameters of rdistrX function. |
param_C |
list with parameters of rdistrC function, one of these parameters |
n |
number of sample to create. |
epsilon |
Parameter to estimate the number of visit (in [0,1]), shrink it only if the algorithm takes too long |
n_mc |
number of sample use to estimate the moments of C, greater n_mc more accuracy. |
theta |
Desired censoring percentage |
verbose |
if TRUE print a censoring percentage of new created database. |
Value
A list with sample data information:
sample_censored | vector of censored sample |
sample_uncensored | vector of uncensored sample (original) |
censored_indicator | vector of 1 and 0 indicating whether the i-th sample is censored |
1:= no censored, 0:= censored | |
n_censored | number of censored samples |
Author(s)
Daniel Saavedra Morales
See Also
rcensT1
for generate censorship sample type I.
rcensT2
for generate censorship sample type II.
rcensT3
for generate censorship sample type III
rcensIfix
for generate interval censoring sample
with fix length interval
Examples
#Example Exponential - Uniform
Data_I = rcensI(rdistrX = rexp, rdistrC = runif,
param_X = list("rate" = 2),
param_C = list("min" = 0, "max" = 1),
n = 1e02, theta = .9)
## Example with plot in examples_plot/Example_rcensI_plot.R