rcensIfix {rcens} | R Documentation |
Generate interval censoring sample (Fix)
Description
Generator of interval censored samples where the length of interval is fixed, given a generator of samples of the distribution X (rdistrX) with parameters appended by the list param_X. In which, you can control the desired censorship percentage.
Usage
rcensIfix(
rdistrX,
param_X,
interval_length,
n = 10000,
theta = 1,
verbose = FALSE
)
Arguments
rdistrX |
sample generator of distribution X. |
param_X |
list with parameters of rdistrX function. |
interval_length |
length of interval |
n |
number of sample to create. |
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
rcensI
for generate interval censoring sample
with random length interval
Examples
#Example Exponential - Uniform
Data_Ifix = rcensIfix(rdistrX = rexp, interval_length = 2,
param_X = list("rate" = .5),
n = 1e02, theta = .9)
## Example with plot in examples_plot/Example_rcensIfix_plot.R