mean-vcov-methods            package:ghyp            R Documentation

_E_x_p_e_c_t_e_d _v_a_l_u_e _a_n_d _v_a_r_i_a_n_c_e-_c_o_v_a_r_i_a_n_c_e _o_f _g_e_n_e_r_a_l_i_z_e_d _h_y_p_e_r_b_o_l_i_c _d_i_s_t_r_i_b_u_t_i_o_n_s

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

     The function 'mean' returns the expected value. The function
     'vcov' returns the variance in the univariate case and the
     variance-covariance matrix in the multivariate case.

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

     ## S4 method for signature 'ghyp':
     mean(x)

     ## S4 method for signature 'ghyp':
     vcov(object)

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

x, object: An object inheriting from class  'ghyp'.

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

     Either the expected value or the variance.

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

     David Lthi

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

     'ghyp', 'ghyp-class', 'Egig' to  compute the expected value and
     the variance of the generalized inverse gaussian  mixing
     distribution distributed and its special cases.

_E_x_a_m_p_l_e_s:

       ## Univariate: Parametric 
       vg.dist <- VG(lambda = 1.1, mu = 10, sigma = 10, gamma = 2)
       mean(vg.dist)
       vcov(vg.dist)
       
       ## Univariate: Empirical                                                 
       vg.sim <- rghyp(10000, vg.dist)
       mean(vg.sim)
       var(vg.sim)

       ## Multivariate: Parametric 
       vg.dist <- VG(lambda = 0.1, mu = c(55, 33), sigma = diag(c(22, 888)), gamma = 1:2)
       mean(vg.dist)
       vcov(vg.dist)
       
       ## Multivariate: Empirical                                                 
       vg.sim <- rghyp(50000, vg.dist)
       colMeans(vg.sim)
       var(vg.sim)  

