Hyper-class              package:distr              R Documentation

_C_l_a_s_s "_H_y_p_e_r"

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

     The hypergeometric distribution is used for sampling _without_
     replacement.  The density of this distribution with parameters
     'm', 'n' and 'k' (named Np, N-Np, and n, respectively in the
     reference below) is given by

       p(x) =      choose(m, x) choose(n, k-x) / choose(m+n, k)

     for x = 0, ..., k. C.f. 'rhyper'

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'Hyper(m, n, k)'. This
     object is a hypergeometric distribution.

_S_l_o_t_s:

     '_i_m_g': Object of class '"Naturals"': The space of the image of
          this distribution has got dimension 1 and the name "Natural
          Space". 

     '_p_a_r_a_m': Object of class '"HyperParameter"': the parameter of this
          distribution ('m', 'n', 'k'), declared at its instantiation 

     '_r': Object of class '"function"': generates random numbers (calls
          function 'rhyper') 

     '_d': Object of class '"function"': density function (calls
          function 'dhyper') 

     '_p': Object of class '"function"': cumulative function (calls
          function 'phyper') 

     '_q': Object of class '"function"': inverse of the cumulative
          function (calls function 'qhyper'). The alpha-quantile is
          defined as the smallest value x such that  p(x) >= alpha,
          where p is the cumulative function. 

     '_s_u_p_p_o_r_t': Object of class '"numeric"': a (sorted) vector
          containing the support of the discrete density function

_E_x_t_e_n_d_s:

     Class '"DiscreteDistribution"', directly.
      Class '"UnivariateDistribution"', by class
     '"DiscreteDistribution"'.
      Class '"Distribution"', by class '"DiscreteDistribution"'.

_M_e_t_h_o_d_s:

     _i_n_i_t_i_a_l_i_z_e 'signature(.Object = "Hyper")': initialize method 

     _m 'signature(object = "Hyper")': returns the slot 'm' of the
          parameter of the distribution 

     _m<- 'signature(object = "Hyper")': modifies the slot 'm' of the
          parameter of the distribution 

     _n 'signature(object = "Hyper")': returns the slot 'n' of the
          parameter of the distribution 

     _n<- 'signature(object = "Hyper")': modifies the slot 'n' of the
          parameter of the distribution 

     _k 'signature(object = "Hyper")': returns the slot 'k' of the
          parameter of the distribution 

     _k<- 'signature(object = "Hyper")': modifies the slot 'k' of the
          parameter of the distribution 

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

     Thomas Stabla Thomas.Stabla@uni-bayreuth.de,
      Florian Camphausen Florian.Camphausen@uni-bayreuth.de,
      Peter Ruckdeschel Peter.Ruckdeschel@uni-bayreuth.de,
      Matthias Kohl Matthias.Kohl@uni-bayreuth.de

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

     'HyperParameter-class' 'DiscreteDistribution-class'
     'Naturals-class' 'rhyper'

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

     H=Hyper(m=3,n=3,k=3) # H is a hypergeometric distribution with m=3,n=3,k=3.
     r(H)(1) # one random number generated from this distribution, e.g. 2
     d(H)(1) # Density of this distribution is  0.45 for x=1.
     p(H)(1) # Probability that x<1 is 0.5.
     q(H)(.1) # x=1 is the smallest value x such that p(H)(x)>=0.1.
     m(H) # m of this distribution is 3.
     m(H)=2 # m of this distribution is now 2.

