Description Usage Arguments Details Value Note Author(s) References See Also Examples
internal use only
1 | dbgpd_region(x, y, z, quant = c(0.95, 0.9, 0.75), ...)
|
x |
|
y |
|
z |
|
quant |
|
... |
internal use only
internal use only
internal use only
P. Rakonczai
internal use only
internal use only
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, y, z, quant = c(0.95, 0.9, 0.75), ...)
{
prec = 1000
sq = (x[2] - x[1]) * (y[2] - y[1])
one = sum(z) * sq
level = seq(quantile(z, 0.4, na.rm = TRUE), quantile(z, 0.9995,
na.rm = TRUE), length.out = prec)
numint = rep(0, prec)
levelf = function(l) sum(z[z > l]) * sq
numint = sapply(level, levelf)/one
nq = rep(0, length(quant))
for (i in 1:length(quant)) nq[i] = level[numint <= quant[i]][1]
out = list(one, quant, nq, x, y, z)
names(out) = c("one", "prob", "q", "x", "y", "z")
out
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.