Library: | cafpe |
See also: | tp/cafpe/fvllc |
Quantlet: | dencp | |
Description: |
Quantlet for multivariate density estimation using
kernel estimation using C++ routines via a DLL.
|
Usage: | dh = dencp(x,h,xest,loo,kernden) | |
Input: | ||
ATTENTION: | this quantlet requires to open locling.dll, density.dll (NT)
or locling.so, denc.so (UNIX). This can be done with the quantlet cafpeload or
directly with
garb = dlopen (" | |
x | (n x d) matrix of observations | |
h | (d x 1) vector of bandwidths | |
xest | (nest x d) matrix of points at which the density has to be computed | |
loo | scalar, parameter to control leave-one-out: 0 = no leave-one-out, 1 = leave-one-out | |
kernden | character variable for selecting kernel function: "gaussian": Gaussian kernel | |
Output: | ||
dh | (nxest x 1) estimated density at xest |
pathcafpe = "tp/cafpe/" library("xplore") func(pathcafpe + "cafpeload.xpl") cafpeload(pathcafpe) n = 100 x = normal(n,1) loo = 0 kerntype = "gaussian" h = hsilv(sqrt(var(x)),1,n,kerntype) xs = sort(x) dh = dencp(x,h,xs,loo,kerntype) plotoneline(xs~dh, "density estimate", " ", " ")
Library: | cafpe |
See also: | tp/cafpe/fvllc |