pcensmixSim: Fitting a Normal Mixture Model to a Simulated Progressive...

Description Usage Arguments Details Value Note Author(s) See Also Examples

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

1
2
3
4
5
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

π (1/ σ_1) φ[ (z - μ_1) / σ_1] + (1 - π) (1/ σ_2) φ[ (z - μ_2) / σ_2]

where φ 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{μ_1}, \hat{σ_1} )

muhat2,sigmahat2

component two parameter estimates (\hat{μ_2}, \hat{σ_2} )

pihat

estimation of mixture proportion \hat{π}

se.muhat1,se.sigmahat1

standard errors of \hat{μ_1} and \hat{σ_1}

se.muhat2,se.sigmahat2

standard errors of \hat{μ_2} and \hat{σ_2}

se.pihat

standard error of \hat{π}

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

1
2
3
4
5
6
7
## 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)

pcensmix documentation built on May 2, 2019, 1:10 p.m.