Monte Carlo approximation of chi-bar-square weights
Monte Carlo approximation of chi-bar-square weights
The chi-bar-square distribution χˉ2(I,C) is a mixture of chi-square distributions. The function provides a method to approximate the weights of the mixture components, when the number of components is known as well as the degrees of freedom of each chi-square distribution in the mixture, and given a vector of simulated values from the target χˉ2(I,C) distribution. Note that the estimation is based on (pseudo)-random Monte Carlo samples. For reproducible results, one should fix the seed of the (pseudo)-random number generator.
approxWeights(x, df, q)
Arguments
x: a vector of i.i.d. random realizations of the target chi-bar-square distribution
df: a vector containing the degrees of freedom of the chi-squared components
q: the empirical quantile of x used to choose the p−2 values c1,…,cp−2 (see Details)
Returns
A vector containing the estimated weights, as well as their covariance matrix.
Details
Let us assume that there are p components in the mixture, with degrees of freedom between n1 and np. By definition of a mixture distribution, we have :
P(χˉ2(I,C)≤c)=i=n1∑npwiP(χi2≤c)
Choosing p−2 values c1,…,cp−2, the function will generate a system of p−2 equations according to the above relationship, and add two additional relationships stating that the sum of all the weights is equal to 1, and that the sum of odd weights and of even weights is equal to 1/2, so that we end up with a system a p