depthDensity {DepthProc} | R Documentation |
Depth weighted density estimator
Description
Experimental function used to fit depth weighted density estimator.
Usage
depthDensity(x, y, nx = 5, ny = 32, xg = NULL, yg = NULL, ...)
Arguments
x |
numeric vector |
y |
numeric vector |
nx |
the number of equally spaced points at which the density is to be estimated in x-dimension. |
ny |
the number of equally spaced points at which the density is to be estimated in x-dimension. |
xg |
vector of point at which the density is to be estimated. |
yg |
vector of point at which the density is to be estimated. |
... |
arguments passed to depthLocal. |
References
Kosiorowski D. and Zawadzki Z. (2014) Notes on optimality of predictive distribution pseudo-estimators in the CHARME models and automatic trading strategies, FindEcon2014, submitted
Examples
## Not run:
# .sampleData is special function for creating
# data for testing conditional denisty estimators
data <- DepthProc:::.sampleData(1:5, 100)
x <- data[, 1]
y <- data[, 2]
plot(x, y)
dep <- depthDensity(x, y)
plot(dep, type = "raw")
plot(dep, type = "depth")
## End(Not run)
[Package DepthProc version 2.1.5 Index]