mixScale function

Continuous Scale Mixture Approach for Normal Scale Mixture Model

Continuous Scale Mixture Approach for Normal Scale Mixture Model

`mixScale' is used to estimate a two-component continuous normal scale mixture model, based on a backfitting method (Xiang et al., 2016): [REMOVE_ME]p(x;θ,f)=πf1(xμ1)+(1π)f2(xμ2),[REMOVEME2] p(x;\boldsymbol{\theta},f) = \pi f_1(x-\mu_1) + (1-\pi) f_2(x-\mu_2), [REMOVE_ME_2]

where θ=(π,μ1,μ2)\boldsymbol{\theta}=(\pi,\mu_1,\mu_2). Here, ff is assumed to be a member of F={f(x)1σϕ(x/σ)dQ(σ)}\mathcal{F} = \left\{ f(x) \big| \int\frac{1}{\sigma}\phi(x/\sigma)dQ(\sigma) \right\}, where ϕ(x)\phi(x) is the standard normal density and QQ is an unspecified probability measure on positive real numbers.

mixScale(x, ini = NULL, maxiter = 100)

Arguments

  • x: a vector of observations.
  • ini: initial values for the parameters. Default is NULL, which obtains the initial values using the mixnorm function. If specified, it can be a list with the form of list(pi, mu, sigma), where pi is a vector of 2 mixing proportions, mu is a vector of 2 component means, and sigma is a vector of 2 component (common) standard deviations.
  • maxiter: maximum number of iterations for the EM algorithm. Default is 100.

Returns

A list containing the following elements: - mu: estimated component means.

  • pi: estimated mixing proportions.

  • suppQ: support of Q.

  • weightQ: weight of Q corresponding to initial standard deviations.

  • loglik: final log-likelihood.

  • run: number of iterations after convergence.

Description

`mixScale' is used to estimate a two-component continuous normal scale mixture model, based on a backfitting method (Xiang et al., 2016):

p(x;θ,f)=πf1(xμ1)+(1π)f2(xμ2), p(x;\boldsymbol{\theta},f) = \pi f_1(x-\mu_1) + (1-\pi) f_2(x-\mu_2),

where θ=(π,μ1,μ2)\boldsymbol{\theta}=(\pi,\mu_1,\mu_2). Here, ff is assumed to be a member of F={f(x)1σϕ(x/σ)dQ(σ)}\mathcal{F} = \left\{ f(x) \big| \int\frac{1}{\sigma}\phi(x/\sigma)dQ(\sigma) \right\}, where ϕ(x)\phi(x) is the standard normal density and QQ is an unspecified probability measure on positive real numbers.

Examples

require(quadprog) #-----------------------------------------------------------------------------------------# # Example 1: simulation #-----------------------------------------------------------------------------------------# n = 10 mu = c(-2.5, 0) sd = c(0.8, 0.6) pi = c(0.3, 0.7) set.seed(2023) n1 = rbinom(n, 1, pi[1]) x = c(rnorm(sum(n1), mu[1], sd[1]), rnorm(n - sum(n1), mu[2], sd[2])) ini = list(pi = pi, mu = mu, sigma = sd) out = mixScale(x, ini) #-----------------------------------------------------------------------------------------# # Example 2: elbow data #-----------------------------------------------------------------------------------------# ini = mixnorm(elbow) res = mixScale(elbow, ini)

References

Xiang, S., Yao, W., and Seo, B. (2016). Semiparametric mixture: Continuous scale mixture approach. Computational Statistics & Data Analysis, 103, 413-425.

See Also

mixnorm for initial value calculation.

  • Maintainer: Suyeon Kang
  • License: GPL (>= 2)
  • Last published: 2023-09-20

Useful links