Description Usage Arguments Details Value Note Author(s) See Also Examples
This function implements an algorithm for generating a progressive Type-II censored version of a specified dataset.
1 |
r |
desired number of failures to observe. |
p |
a parameter controlling the amount of censoring. The action of
censoring individuals after each failure occurs with probabilty |
data |
a numeric vector of a real dataset (mixture/not mixture) or an
object of class |
It creates a progressive Type-II censored version of a given real
dataset or a simulated dataset from mixgen
. The
output of this function can be passed as an argument to
pcensmixR
or pcensmixSim
for the purpose of fitting a
normal mixture model to the progressively censored dataset.
An object of class "pcgen"
containing the following
information:
original_data |
original mixture data |
label |
component membership indicator for the original simulated mixture data. This will not be returned if a real data has been used. |
censored_version_of_data |
progressive Type-II censored version of data, i.e., each observation is equal to the actual observed survival time in the event of failure and is equal to the latest observe failure time if it is associated to an unobserved censored observation. Notice that they are order statistics. |
component_indicator |
component indicator associated with the censored_verison_of_data. This will not be returned if a real data has been used. |
censoring_indicator |
censoring indicator associated with the censored_verison_of_data. |
See print.pcgen
for printing data of class
"pcgen"
.
Lida Fallah, John Hinde
Maintainer: Lida Fallah <l.fallah22@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## 1. Generate a progressive Type-II censored data from a simulated mixture data with
## allowing for censoring with controlling parameters p = 0.3 and r = 12.
set.seed(0)
mixture <- mixgen(N = 20, dist1 = 'norm', dist2 = 'weibull', control = list(12, 2, 15, 4, 0.3))
Pdat0 <- pcgen(r = 12, p = 0.3, data = mixture)
print(Pdat0)
## 2. Examples of generating a progresively Type-II censored data
set.seed(0)
Pdat1 <- pcgen(r = 6, p = 0.3, data = insulate)
print(Pdat1)
set.seed(100)
Pdat2 <- pcgen(r = 260, p = 0.35, data = blood$Systolic.BP)
print(Pdat2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.