nclass               package:graphics               R Documentation

_C_o_m_p_u_t_e _t_h_e _N_u_m_b_e_r _o_f _C_l_a_s_s_e_s _f_o_r _a _H_i_s_t_o_g_r_a_m

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

     Compute the number of classes for a histogram, for use internally
     in 'hist'.

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

     nclass.Sturges(x)
     nclass.scott(x)
     nclass.FD(x)

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

       x: A data vector. 

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

     'nclass.Sturges' uses Sturges' formula, implicitly basing bin
     sizes on the range of the data.

     'nclass.scott' uses Scott's choice for a normal distribution based
     on the estimate of the standard error.

     'nclass.FD' uses the Freedman-Diaconis choice based on the
     inter-quartile range.

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

     The suggested number of classes.

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

     Venables, W. N. and Ripley, B. D. (2002) _Modern Applied
     Statistics with S-PLUS._ Springer, page 112.

     Freedman, D. and Diaconis, P. (1981) On the histogram as a density
     estimator: L_2 theory. _Zeitschrift fr Wahrscheinlichkeitstheorie
     und verwandte Gebiete_ *57*, 453-476.

     Scott, D. W. (1979) On optimal and data-based histograms.
     _Biometrika_ *66*, 605-610.

     Scott, D. W. (1992) _Multivariate Density Estimation. Theory,
     Practice, and Visualization_. Wiley.

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

     'hist'

