evaluator {cepp} | R Documentation |
Function to evaluate spatial quantiles
Description
This provides an objective function whose minimization yields the spatial quantiles.
Usage
evaluator(n, p)
Arguments
n |
The number of rows in the data |
p |
The number of columns in the data |
Details
Returns another function suitable for passing to an optimizer like nlm
or trust
.
Value
A function that should be passed to an optimizer.
Author(s)
Mohit Dayal
References
P. Chaudhuri. "On a geometric notion of quantiles for multivariate data." Journal of the American Statistical Association, 91(434):862-872, 1996.
Examples
x <- rnorm(500)
dim(x) <- c(250,2)
ev <- evaluator(250,2)
##The Spatial Median
trust(ev, parinit=c(median(x[1,]), median(x[2,])), u=c(0,0),
rinit=0.5, rmax=2e5, samp = x)
##Quantile for vector (0.2,0.3)
trust(ev, parinit=c(median(x[1,]), median(x[2,])), u=c(0.2,0.3),
rinit=0.5, rmax=2e5, samp = x)
[Package cepp version 1.7 Index]