Description Usage Arguments Value Author(s) See Also Examples
This function implements an algorithm using the
mixgen, pcgen and
pcensmixSim functions to generate data and fit a model
using EM algorithm with a specified number of iterations.
1  | run_pcensmix(N, r, p, param, repetition = 100)
 | 
N | 
 population size.  | 
r | 
 required number of failures to observe.  | 
p | 
 a parameter controlling the amount of censoring. The action of
censoring individuals after each failure occurs with probabilty   | 
param | 
 a numeric vector; used as starting values for the EM and simulating a new data to replace in case of happening singularity in the likelihood.  | 
repetition | 
 the required number of repetition of the algorithm– default is 100.  | 
It returns the parameter estimates given by
pcensmixSim with the desired number of repetitions.
In each repetition it generates a new normal mixture progressive Type-II
censored dataset from the same true parameter values and fits a model.
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 18 19  | ## Not run: 
## Example 1: with very well separated mixture components
set.seed(3)
f1 <- run_pcensmix(N = 160, r = 120, p = 0.3, param = c(10, 2, 25, 4, 0.3), repetition = 100)
colMeans(f1)
## Example 2.
set.seed(150)
f2 <- run_pcensmix(N = 160, r = 130, p = 0.35, param = c(10, 2, 17, 4, 0.3), repetition = 100)
colMeans(f2)
## Example 3.
set.seed(20)
f3 <- run_pcensmix(N = 160, r = 130, p = 0.3, param = c(20, 6, 22, 12, 0.6), repetition = 100)
colMeans(f3)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.