

   SShheeaatthheerr--JJoonneess ccrriitteerriioonn ffoorr nnoonnppaarraammeettrriicc ddeennssiittyy eessttiimmaa--
   ttiioonn

        sj(x, h)

   AArrgguummeennttss::

          x: a vector of data.

          h: a value of smoothing parameter.

   DDeessccrriippttiioonn::

        This function computes a criterion associated with the
        Sheather-Jones plug-in method of selecting a smoothing
        parameter in nonparametric density estimation.  The
        selected smoothing parameter is identified by the point
        at which this criterion takes the value 0.

   DDeettaaiillss::

        see Section 2.4.4 of the reference below.  The function
        is called automatically by `hsj' and does not usually
        need to be called independently.

   VVaalluuee::

        The value of the Sheather-Jones criterion.

   SSiiddee EEffffeeccttss::

        none.

   RReeffeerreenncceess::

        Bowman, A.W. and Azzalini, A. (1997). Applied Smoothing
        Techniques for Data Analysis: the Kernel Approach with
        S-Plus Illustrations.  Oxford University Press, Oxford.

   SSeeee AAllssoo::

        `cv', `hcv', `hsj', `hnorm'

   EExxaammpplleess::

        x      <- rnorm(50)
        hgrid  <- seq(0.1, 1, length = 10)
        sjgrid <- vector("numeric", length = length(hgrid))
        for (i in 1:10) sjgrid[i] <- sj(x, hgrid[i])
        plot(hgrid, sjgrid, type="l")
        abline(0, 0, lty=2)

