WRSEL: Weighted Rank Squared Error Loss

Description Usage Arguments Value References Examples

Description

Weighted Rank Squared Error Loss

Given a set of samples of an n-dimensional random variable, WRSEL returns a function which, when supplied with a weight vector, returns optimal estimates under a rank-weighted squared error loss, see references for details.

Usage

1
WRSEL(X, num_nodes = NULL)

Arguments

X

samples from the posterior, size n by N

num_nodes

the number of nodes to use on multi-core architecture (needs parallel package)

weights

the weight function, must be a vector of length 1 or length n

Value

function

References

Wright, Deanne L., Hal S. Stern, and Noel Cressie. "Loss functions for estimation of extrema with an application to disease mapping." Canadian Journal of Statistics 31.3 (2003): 251-266.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
### Simulate a three variable system, where the three variables are Gaussian with sd = 1 and means c(-1,0,1)
n <- 3
N <- 100000
X <- matrix(rnorm(n*N),n,N)
X <- X + c(-1,0,1)
### Create the WRSEL function which we can then supply with weight vectors to obtain the optimal estimates
WRSEL_fun <- WRSEL(X = X,num_nodes = NULL)
### Create a weight vector
weights <- c(1,0,0)
### Find and print the optimal estimates
lambda_hat <- WRSEL_fun(weights)
print(lambda_hat)

andrewzm/WRSEL documentation built on May 10, 2019, 11:14 a.m.