rnorm              package:compositions              R Documentation

_N_o_r_m_a_l _d_i_s_t_r_i_b_u_t_i_o_n_s _o_n _s_p_e_c_i_a_l _s_p_a_c_e_s

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

     'rnorm.'X generates multivariate normal random variates in the
     space X.

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

     rnorm.acomp(n,mean,var)
     rnorm.rcomp(n,mean,var)
     rnorm.aplus(n,mean,var)
     rnorm.rplus(n,mean,var)
     rnorm.rmult(n,mean,var)
     dnorm.acomp(x,mean,var)
     dnorm.aplus(x,mean,var)
     dnorm.rmult(x,mean,var)
               

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

       n: number of datasets to be simulated

    mean: The mean of the dataset to be simulated

     var: The variance covariance matrix

       x: vectors in the sampling space

_D_e_t_a_i_l_s:

     The normal distributions in the variouse spaces dramatically
     differ. The normal distribution in the 'rmult' space is the
     commonly known multivariate joint normal distribution. For 'rplus'
     this distribution has to be somehow truncated at 0. This is here
     done by setting negative values to 0. 
      The normal distribution of 'rcomp' is seen as a normal
     distribution within the simplex as a geometrical portion of the
     real vector space. The variance is thus forced to be singular and
     restricted to the affine subspace generated by the simplex. The
     necessary truncation of negative values is currently done by
     setting them explicitly to zero and reclosing afterwards. 
      The '"acomp"' and '"aplus"' are itself metric vector spaces and
     thus a normal distribution is defined in them just as in the real
     space. The resulting distribution corresponds to a multivariate
     lognormal in the case of '"aplus"' and in Aitchisons normal
     distribution in the simplex in the case of '"acomp"' (TO DO: Is
     that right??). 
      For the vector spaces 'rmult', 'aplus', 'acomp' it is further
     possible to provide densities wiht repect to their Lebesgue
     measure. In the other cases this is not possible since the
     resulting distributions are not absolutly continues with respect
     to such a measure due to the truncation.

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

     a random dataset of the given class generated by a normal
     distribution with the given mean and variance in the given space.

_R_e_f_e_r_e_n_c_e_s:

     Aitchison, J. (1986) _The Statistical Analysis of Compositional
     Data_ Monographs on Statistics and Applied Probability. Chapman &
     Hall Ltd., London (UK). 416p.

     Pawlowsky-Glahn, V. and J.J. Egozcue (2001) Geometric approach to
     statistical analysis on the simplex. _SERRA_ *15*(5), 384-398

     Aitchison, J, C. Barcel'o-Vidal, J.J. Egozcue, V. Pawlowsky-Glahn
     (2002) A consise guide to the algebraic geometric structure of the
     simplex, the sample space for compositional data analysis, _Terra
     Nostra_, Schriften der Alfred Wegener-Stiftung, 03/2003

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

     'runif.acomp', 'rlnorm.rplus', 'rDirichlet.acomp'

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

     MyVar <- matrix(c(
     0.2,0.1,0.0,
     0.1,0.2,0.0,
     0.0,0.0,0.2),byrow=TRUE,nrow=3)
     MyMean <- c(1,1,2)

     plot(rnorm.acomp(100,MyMean,MyVar))
     plot(rnorm.rcomp(100,MyMean,MyVar))
     plot(rnorm.aplus(100,MyMean,MyVar))
     plot(rnorm.rplus(100,MyMean,MyVar))
     plot(rnorm.rmult(100,MyMean,MyVar))
     x <- rnorm.aplus(5,MyMean,MyVar)
     dnorm.acomp(x,MyMean,MyVar)
     dnorm.aplus(x,MyMean,MyVar)
     dnorm.rmult(x,MyMean,MyVar)

