pcensmixR {pcensmix}R Documentation

Fitting a Normal Mixture Model to a Real Progressive Type-II Censored Mixture Data Using EM Algorithm

Description

This function uses a two-layer EM algorithm to fit a mixture model to progressive Type-II censored mixture data by estimating the latent mixture components and the censored data.

Usage

pcensmixR(Pdat, ...)

## S3 method for class 'pcgen'
pcensmixR(Pdat, start, iteration = 1e+05, INERiter = 20,
  warn = FALSE, ...)

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.

start

a numeric vector; used as starting values for the EM algorithm.

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.

warn

logical. shows warning messages if TRUE, if there is any– default is FALSE.

Details

This function fits a two-component normal mixture model to a given progressive Type-II censored data.

It uses a two-layer EM algorithm for fitting the model. Generally speaking, the first layer estimates the mixture component latent variables, in the E-step, by finding their conditional expected values given the current parameter estimates and the data; and the second layer consists of another EM algorithm to estimate the missing censored data and eventually the parameters of interest. The layers are repeated until convergence achieved.

Value

pcensmixR 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

Note

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

pcgen, pcensmixSim

Examples

## Example 1: fit a mixture model to 'insulate' data
set.seed(107)
Pdat<- pcgen(r = 15, p = 0.6, data = insulate)
pcensmixR(Pdat, start = c(5, 3, 35, 20, 0.6))

## Not run: 
## Example 2: fit a mixture model to 'Systolic blood pressure' data
set.seed(1010)
pcensmixR(Pdat = pcgen(360, 0.35, blood$Systolic.BP),
               start = c(120, 15, 150, 20, 0.6))
## End(Not run)


[Package pcensmix version 1.2-1 Index]