estep1 | R Documentation |
For a finite mixture model with density function
{\cal{M}}(\bold{y}|\bold{\Psi})=\sum_{g=1}^{G} \omega_{g} f_{\bold{Y}}(\bold{y}, \bold{\Theta}_g),
we use method of Basford et al. (1997) for Computing observed Fisher information matrix. Based on above representation for density function of a finite mixture model, we can write
\bold{Y}| {T}, W \sim N_{d}\bigl(\bold{\mu}+\bold{\lambda}{T}, {W} \Sigma\bigr), {T}| W \sim HN({0}, {W}), W \sim f_W(w| \bold{\theta}).
The required posteriors expectations are E\bigl(W^{-1}|\bold{y},\bold{\Psi}\bigr)
, E\bigl(W^{-1}T|\bold{y},\bold{\Psi}\bigr)
, and E\bigl(W^{-1}T^2|\bold{y},\bold{\Psi}\bigr)
.
estep1(Y, G, weight, mu, sigma, lambda, family, skewness, param, theta, tick, h, N, PDF)
Y |
an |
G |
the number of components. |
weight |
a vector of weight parameters (or mixing proportions). |
mu |
a list of location vectors of |
sigma |
a list of dispersion matrices of |
lambda |
a list of skewness vectors of |
family |
name of the mixing distribution. By default |
skewness |
a logical statement. By default |
param |
name of the elements of |
theta |
a list of maximum likelihood estimator for |
tick |
a binary vector whose length depends on type of family. The elements of |
h |
a positive small value for computing numerical derivative of |
N |
a large integer number for computing Monte Carlo approximation of expected value within the E-step of the EM algorithm. |
PDF |
expression for mixing density function |
The required posteriors expectations for approximating the observed Fisher information matrix for restricted finite mixture model. These include
\tau_{ig}=E\bigl( Z_{ig}=1 \vert {\bold{y}}_{i}, \hat{\bold{\Psi}} \bigr) = {\omega}_g f_{\bold{Y}}\bigl({\bold{y}}_{i}\big|{\bold{\Theta}_g}\bigr)/\bigl[ \sum_{g=1}^{G} {{\omega}}_g f_{\bold{Y}}\bigl({\bold{y}}_{i}\big|{\bold{\Theta}_g}\bigr) \bigr]
,
E\bigl( W^{-1}\big \vert {\bold{y}}_{i}, \hat{\bold{\Psi}} \bigr)
,
E\bigl( {{U}}W^{-1}\big \vert {\bold{y}}_{i}, \hat{\bold{\Psi}} \bigr)
,
E\bigl( U^2 W^{-1}\big \vert {\bold{y}}_{i}, \hat{\bold{\Psi}} \bigr)
, and
E\bigl( \partial f_W(w| {\bold{\theta)}})/\partial {\bold{\theta)}} \big \vert {\bold{y}}_{i}, \hat{{\bold{\Psi}}} \bigr)
.
Mahdi Teimouri
K. E. Basford, D. R. Greenway, G. J. McLachlan, and D. Peel, (1997). Standard errors of fitted means under normal mixture, Computational Statistics, 12, 1-17.
n <- 100
G <- 2
weight <- rep( 0.5, 2 )
mu1 <- rep(-5 , 2 )
mu2 <- rep( 5 , 2 )
sigma1 <- matrix( c( 0.4, -0.20, -0.20, 0.5 ), nrow = 2, ncol = 2 )
sigma2 <- matrix( c( 0.5, 0.20, 0.20, 0.4 ), nrow = 2, ncol = 2 )
lambda1 <- c( 5, -5 )
lambda2 <- c(-5, 5 )
theta1 <- c( 10 )
theta2 <- c( 20 )
mu <- list( mu1, mu2 )
sigma <- list( sigma1 , sigma2 )
lambda <- list( lambda1, lambda2)
theta <- list( theta1 , theta2 )
param <- c( "a" )
PDF <- quote( (a/2)^(a/2)*x^(-a/2 - 1)/gamma(a/2)*exp( -a/(2*x) ) )
tick <- rep( 1, 2 )
theta10 <- c( 10, 10 )
theta20 <- c( 20, 20 )
theta0 <- list( theta10 , theta20 )
Y <- rmix( n, G, weight, model = "restricted", mu, sigma, lambda, family = "igamma",
theta0)
estep <- estep1( Y[, 1:2], G, weight, mu, sigma, lambda, family = "igamma",
skewness = "TRUE", param, theta, tick, h = 0.001, N = 3000, PDF)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.