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 |
... |
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 |
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 ( |
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 |
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
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)