pcensmixSim {pcensmix} | R Documentation |
Fitting a Normal Mixture Model to a Simulated Progressive Type-II Censored Data Using EM Algorithm
Description
This function fits a normal mixture model to progressive Type-II censored mixture data by dealing with the two aspects of missing data, latent mixture components and the censored data, using a maximum likelihood estimation through a constrained two-layer EM algorithm.
Usage
pcensmixSim(Pdat, ...)
## S3 method for class 'pcgen'
pcensmixSim(Pdat, r, p, param, iteration = 1e+05,
INERiter = 20, ...)
Arguments
Pdat |
an object of class |
... |
additinal arguments to pass by. |
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 |
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. |
iteration |
the maximum number of required iteration for the EM algorithm until convergence– default value is 1e+05. |
INERiter |
the maximum number of required iteration for the second EM algorithm– default is 20. |
Details
This function fits a two-component normal mixture model to simulated progressive Type-II censored data with density function
\pi
(\frac{1}{\sigma_1})\, \phi\!\! \left[\frac{(z - \mu_1)}{\sigma_1}\right]
+ (1 - \pi) (\frac{1}{\sigma_2})\, \phi\!\! \left[\frac{(z -
\mu_2)}{\sigma_2}\right]
where \phi
is the standard normal density.
It uses a constrained two-layer EM algorithm to deal with the two forms of missing data: the censored survival times and the mixture component labels. Given the EM algorithm is at a particular iteration: (i) first, in the E-step it obtains the mixture component indicator estimates given the current parameter estimates and the observed data. (ii) Next, for re-estimation of the unknown parameters, a new EM algorithm is nested in the M-step of the initial EM algorithm to deal with the estimation of the missing censored survival times and consequently building the maximum likelihood equations. These steps are repeated until the model converges.
Value
pcensmixSim
gives an object of class data.frame
containing the following components:
muhat1 , sigmahat1 |
component one
parameter estimates ( |
muhat2 , sigmahat2 |
component two
parameter estimates ( |
pihat |
estimation of mixture
proportion |
se.muhat1 , se.sigmahat1 |
standard
errors of |
se.muhat2 , se.sigmahat2 |
standard errors of
|
se.pihat |
standard error of |
no.fails.comp1 , no.fails.comp2 |
number of failures from each mixture component |
no.cens.comp1 , no.cens.comp2 |
number of censored observations from each mixture component |
ll |
log-likelihood value |
datachange_flag |
|
Note
In fitting the model, to overcome the problem of singularity and model non-identifiability that might happen in some cases depending on the true means and standard deviations of the components, we use the constraint proposed by Hathaway (1985). Based on this, the ratios of the standard deviations are considered to be greater than a pre-fixed constant. We consider the constraints
\sigma_1/\sigma_2>0.1
and\sigma_2/\sigma_1>0.1
which lead to obtain a parameter space with no singularities. In case this conditions doesn't hold, the data will be replaced by a new simulated one anddatachange_flag
will appear asTRUE
in the output.See
pcgen
for the definition of censored version of data.
Author(s)
Lida Fallah, John Hinde
Maintainer: Lida Fallah <l.fallah22@gmail.com>
See Also
Examples
## Not run:
set.seed(100)
Pdat<- pcgen(r = 60, p = 0.3, data = mixgen(N = 100, dist1 = 'norm',
dist2 = 'norm', control = list(12, 2, 14, 5, 0.35)))
pcensmixSim(Pdat, r = 60, p = 0.3, param=c(12, 2, 14, 5, 0.35))
## End(Not run)