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 "pcgen" created by function pcgen or a two-column matrix (or data.frame) with first column giving a vector of censored version of a two-component mixed normal data, and the other one indicating the censoring status associated with them (1 if not censored, otherwise zero).

...

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 p from binomial distribution at each stage. If p = 0, there will be no censoring.

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 (\hat\mu_1, \hat\sigma_1 )

muhat2, sigmahat2

component two parameter estimates (\hat\mu_2, \hat{\sigma_2}

pihat

estimation of mixture proportion \hat\pi

se.muhat1, se.sigmahat1

standard errors of \hat\mu_1 and \hat{\sigma_1}

se.muhat2, se.sigmahat2

standard errors of \hat\mu_2 and \hat\sigma_2

se.pihat

standard error of \hat\pi

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

TRUE if data has been replaced by a newly generated one

Note

Author(s)

Lida Fallah, John Hinde

Maintainer: Lida Fallah <l.fallah22@gmail.com>

See Also

pcgen, run_pcensmix

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)


[Package pcensmix version 1.2-1 Index]