Profile Likelihood Method for Normal Mixture with Unequal Variance
Profile Likelihood Method for Normal Mixture with Unequal Variance
`mixpf' is used to estimate the following C-component univariate normal mixture model, using the profile likelihood method (Yao, 2010), with the assumption that the ratio of the smallest variance to the largest variance is k: [REMOVE_ME]f(x;θ)=∑j=1Cπjϕ(x;μj,σj2),[REMOVEME2]
where θ=(π1,μ1,σ1,..,πC,μC,σC)⊤
is the parameter to estimate, ϕ(⋅;μ,σ2) is the normal density with a mean of μ and a standard deviation of σ, and π's are mixing proportions that sum up to 1. Once the results are obtained, one can also find the maximum likelihood estimate (MLE) of k by plotting the likelihood vs. k for different k values and finding the maximum interior mode in the likelihood. See examples below.
mixpf(x, k =0.5, C =2, nstart =20)
Arguments
x: a vector of observations.
k: ratio of the smallest variance to the largest variance. Default is 0.5.
C: number of mixture components. Default is 2.
nstart: number of initializations to try. Default is 20.
Returns
A list containing the following elements: - mu: vector of estimated component means.
sigma: vector of estimated component standard deviations.
pi: vector of estimated mixing proportions.
lik: final likelihood.
Description
`mixpf' is used to estimate the following C-component univariate normal mixture model, using the profile likelihood method (Yao, 2010), with the assumption that the ratio of the smallest variance to the largest variance is k:
f(x;θ)=j=1∑Cπjϕ(x;μj,σj2),
where θ=(π1,μ1,σ1,..,πC,μC,σC)⊤
is the parameter to estimate, ϕ(⋅;μ,σ2) is the normal density with a mean of μ and a standard deviation of σ, and π's are mixing proportions that sum up to 1. Once the results are obtained, one can also find the maximum likelihood estimate (MLE) of k by plotting the likelihood vs. k for different k values and finding the maximum interior mode in the likelihood. See examples below.
Examples
set.seed(4)n =100u = runif(n,0,1)x2 =(u <=0.3)* rnorm(n,0,0.5)+(u >0.3)* rnorm(n,1.5,1)# please set ngrid to 200 to get a smooth likelihood curvengrid =5grid = seq(from =0.01, to =1, length = ngrid)likelihood = numeric()for(i in1:ngrid){ k = grid[i] est = mixpf(x2, k) lh = est$lik
likelihood[i]= lh
}# visualize likelihood to find the best kplot(grid, likelihood, type ="l", lty =2, xlab ="k", ylab ="profile log-likelihood")
References
Yao, W. (2010). A profile likelihood method for normal mixture with unequal variance. Journal of Statistical Planning and Inference, 140(7), 2089-2098.