NMixPlugDensMarg            package:mixAK            R Documentation

_M_a_r_g_i_n_a_l (_u_n_i_v_a_r_i_a_t_e) _d_e_n_s_i_t_i_e_s: _p_l_u_g-_i_n _e_s_t_i_m_a_t_e

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

     This function serves as an inference tool for the MCMC output
     obtained using the function 'NMixMCMC'. It computes marginal
     (univariate) plug-in densities obtained by using posterior summary
     statistics (e.g., posterior means) of mixture weights, means and
     variances.

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

     NMixPlugDensMarg(x, ...)

     ## Default S3 method:
     NMixPlugDensMarg(x, scale, w, mu, Sigma, ...)

     ## S3 method for class 'NMixMCMC':
     NMixPlugDensMarg(x, grid, lgrid=50, scaled=FALSE, ...)

     ## S3 method for class 'GLMM_MCMC':
     NMixPlugDensMarg(x, grid, lgrid=50, scaled=FALSE, ...)

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

       x: a list with the grid values (see below) for
          'NMixPlugDensMarg.default' function.

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

          An object of class 'GLMM_MCMC' for
          'NMixPlugDensMarg.GLMM_MCMC' function.     

   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 posterior summary statistics for the
          mixture weights. The length of this vector determines the
          number of mixture components. 

      mu: a matrix with posterior summary statistics for 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 posterior summary statistics for mixture
          covariance matrices. 

    grid: a list with the grid values for each margin in which the
          density should be evaluated.

          If 'grid' is not specified, it is created automatically using
          the information from the posterior summary statistics stored
          in 'x'. 

   lgrid: a length of the grid used to create the 'grid' if that is not
          specified. 

  scaled: if 'TRUE', the density of shifted and scaled data is
          summarized. The shift and scale vector are taken from the
          'scale' component of the object 'x'. 

     ...: optional additional arguments.

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

     An object of class 'NMixPlugDensMarg' which has the following
     components:   

       x: a list with the grid values for each margin. The components
          of the list are named 'x1', ... or take names from 'grid'
          argument.

    dens: a list with the computed densities for each margin. The
          components of the list are named '1', ..., i.e.,
          'dens[[1]]'='dens[["1"]]' is the predictive density for
          margin 1 etc.

     There is also a 'plot' method implemented for the resulting
     object.

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

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

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

     'plot.NMixPlugDensMarg', 'NMixMCMC', 'GLMM_MCMC',
     'NMixPredDensMarg'.

