Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: smoother
See also: binlindata Rdenbest denbbwcrit

Quantlet: binweights
Description: direct computation of the autocovariances of the bincounts needed for fast computation of the kernel estimates of the integrated squared density derivatives.

Reference(s):

Usage: binw = binweights(binc)
Input:
binc m x 1 vector, corresponding to the bin counts as output from binlindata or a similar procedure
Output:
binw m x 1 vector, autocovariances of bin counts

Note:

Example:
library("smoother")
library("xplore")
n = 1000
d = 0.1
{w,mu,sigma}=normalmixselect("Marron_Wand_8")
x = normalmix(n,w,mu,sigma)
; x = round(x,1)
{bing,binc}=binlindata(x,d)
binw = binweights(binc)
bing~binc~binw
n~sum(binc)
(binw[1]+2*sum(binw[2:rows(binw)])) /(n*n)

Result:
Generates 1000 variates from a normal mixture example
density, optionally rounds them, computes a bin grid,
the corresponding bincounts and the bin weights.
The bin counts sum up to the total sample size
and, as a check, the last expression should be 1.



Author: J.-U. Scheer, 20020406 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006