denspr               package:siggenes               R Documentation

_D_e_n_s_i_t_y _E_s_t_i_m_a_t_i_o_n

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

     Estimates the density of a vector of observations by a Poisson
     regression fit to histogram counts.

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

       denspr(x, n.interval = NULL, df = 5, knots.mode = TRUE, 
           type.nclass = c("wand", "scott", "FD"))

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

       x: a numeric vector containing the observations for which the
          density should be estimated

n.interval: an integer specifying the number of cells for the
          histogram. If 'NULL', 'n.interval' is estimated by the method
          specified by 'type.nclass'

      df: integer specifying the degrees of freedom of the natural
          cubic spline used in the Poisson regression fit

knots.mode: if 'TRUE' the 'df' - 1 knots are centered around the mode
          and not the median of the density, where the mode is
          estimated by the  midpoint of the cell of the histogram that
          contains the largest number of  observations. If 'FALSE', the
          default knots are used in the function 'ns'. Thus, if 'FALSE'
          the basis matrix will be generated by 'ns(x, df = 5)'

type.nclass: character string specifying the procedure used to compute
          the number of cells of the histogram. Ignored if 'n.interval'
          is specified. By default, the method of Wand (1994) with 
          'level = 1' (see the help page of 'dpih' in the package
          'KernSmooth')) is used. For the other choices, see
          'nclass.scott'

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

     A list consisting of  

       y: a numeric vector of the same length as 'x' containing the
          estimated density for each of the observations

  center: a numeric vector specifying the midpoints of the cells of the
          histogram

  counts: a numeric vector of the same length as 'center' composed of
          the number of observations of the corresponding cells

  x.mode: the estimated mode

  ns.out: the output of 'ns'

    type: the method used to estimate the numbers of cells

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

     Holger Schwender,holger.schw@gmx.de

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

     Efron, B., and Tibshirani, R. (1996). Using specially designed
     exponential  families for density estimation. _Annals of
     Statistics_, 24, 2431-2461.

     Wand, M.P. (1997). Data-based choice of histogram bin width. 
     _American Statistician_, 51, 59-64.

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

     'cat.ebam'

