NMixPseudoGOF             package:mixAK             R Documentation

_P_s_e_u_d_o _g_o_o_d_n_e_s_s-_o_f-_f_i_t _t_e_s_t _f_o_r _a _n_o_r_m_a_l _m_i_x_t_u_r_e _m_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     It takes a (fitted) normal mixture, creates hyperrectangles
     according to a specified grid, computes probability masses in each
     hyperrectangle derived from the (fitted) normal mixture. From
     computed probability masses expected frequencies (using the sample
     size of supplied data) are computed and compared to frequencies
     observed in supplied data. From expected and observed frequencies,
     a Pearson chi-squared like statistic is computed and returned
     together with residuals derived from that statistic.

     Also pseudo degrees of freedom are returned which are equal to a
     number of hyperrectangles minus number of free parameters of the
     normal mixture. For a K-component mixture of dimension p, the
     number of free parameters is computed as

                     q = K-1 + K*p + K*p*(p+1)/2

     Note that computation of q does not take into account the positive
     (semi-)definiteness restriction on covariance matrices.

     WARNING: There is no statistical theory developed that would
     guarantee that computed chi-squared like statistics follows a
     chi-squared distribution with computed pseudo degrees of freedom
     under the null hypothesis that the distribution that generated the
     data is a normal mixture. This function serves purely for
     descriptive purposes!

_U_s_a_g_e:

     NMixPseudoGOF(x, ...)

     ## Default S3 method:
     NMixPseudoGOF(x, scale, w, mu, Sigma, breaks, nbreaks=10, digits=3, ...)

     ## S3 method for class 'NMixMCMC':
     NMixPseudoGOF(x, y, breaks, nbreaks=10, digits=3, ...)

_A_r_g_u_m_e_n_t_s:

       x: data object (see argument 'y' below) for
          'NMixPseudoGOF.default' function.

          An object of class 'NMixMCMC' for 'NMixPseudoGOF.NMixMCMC'
          function. 

       y: a numeric vector, matrix or data frame with the data. It is a
          numeric vector if p is one. It is a matrix or data frame with
          p columns if p > 1. 

   scale: a two component list giving the 'shift' and the 'scale'. If
          not given, shift is equal to zero and scale is equal to one. 

       w: a numeric vector with mixture weights. The length of this
          vector determines the number of mixture components. 

      mu: a matrix with mixture means in rows. That is, 'mu' has K rows
          and p columns, where K denotes the number of mixture
          components and p is dimension of the mixture distribution. 

   Sigma: a list with mixture covariance matrices. 

  breaks: a numeric vector or a list with the breaks defining the
          hyperrectangles. It is a numeric vector if p is equal to one.
          It is a list of length p of numeric vectors. Each component
          of the list determines the breaks for each margin.      

 nbreaks: a number or a numeric vector with the number of breaks for
          each margin. It is only used if the argument 'breaks' is not
          given to determine sensible break values. 

  digits: a number or a numeric vector with the number of digits to
          which the breaks should be rounded in the case they are
          created by the function. If it is a vector then different
          rounding may be used for each margin. 

     ...: optional additional arguments.

_V_a_l_u_e:

     ADD DESCRIPTION

_A_u_t_h_o_r(_s):

     Arno&#353t Kom&#225rek arnost.komarek[AT]mff.cuni.cz

_S_e_e _A_l_s_o:

     'NMixMCMC'.

