density2d             package:fMultivar             R Documentation

_B_i_v_a_r_i_a_t_e _D_e_n_s_i_t_y _T_o_o_l_s

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

     Grid generator, kernel density estimator,  histogram counter, and
     integrator for  bivariate distributions

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

     grid2d(x = (0:10)/10, y = x)
     density2d(x, y = NULL, n = 20, h = NULL, limits = c(range(x), range(y))) 
     hist2d(x, y = NULL, n = c(20, 20))
     integrate2d(fun, error = 1.0e-5, ...)

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

   error: the error bound to be achieved by the integration formula. A
          numeric value. 

     fun: the function to be integrated. The first argument requests
          the x values, the second the y values, and the remaining are
          reserved for additional parameters. The integration is  over
          the unit square "[0,1]\^2". 

       h: a vector of bandwidths for 'x' and 'y' directions.  Defaults
          to normal reference bandwidth.  

  limits: the limits of the rectangle covered by the grid.    

       n: n - an integer specifying the number of grid points in each 
          direction. The default value is 20.
           [hist2D] - 
           In this case 'n' may be a scalar or a two element vector. 
          The default value is 20.
           [rnorm2d] - 
           the number of random deviates to be generated, an integer
          value. 

    x, y: two numeric vectors defining the x and y coordinates. 
           [density2D][hist2D] - 
           two vectors of coordinates of data. If 'y' is NULL then 'x'
          is assumed to be a two column matrix, where the first  column
          contains the 'x' data, and the second column the  'y' data.  

     ...: parameters passed to the function to be integrated.      

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

     'grid2d'  
      returns a list with two vectors named '$x' and '$y' spanning  the
     grid defined by the coordinate vectors 'x' and 'y'.

     'density2d'
      'hist2d' 
      returns a list with three elements '$x', '$y', and  '$z'. 'x' and
     'y' are vectors spanning the two  dimensional grid and 'z' the
     corresponding matrix. The  output can directly serve as input to
     the plotting functions  'image', 'contour' and 'persp'.

     'integrate2d' 
      returns a list with the '$value' of the integral over the unit
     square [0,1]\^2, an '$error' estimate and the number  of grid
     '$points' used by the integration function.

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

     W.N. Venables and B.D. Ripley for the underlying kde2d function, 
      Gregory R. Warnes for the underlying hist2d function, 
      Diethelm Wuertz for the Rmetrics R-port.

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

     Azzalini A., (2004); _The sn Package_; R Reference Guide available
     from www.r-project.org.

     Venables W.N., Ripley B.D., (2002);  _Modern Applied Statistics
     with S_, Fourth Edition, Springer.

     Warnes G.R., (2004); _The gregmisc Package_; R Reference Guide
     available from www.r-project.org.

