f.kde | R Documentation |
An implementation of the f-estimator from "Nonparametric empirical Bayes and compound decision approaches to estimation of a high-dimensional vector of normal means" (Brown and Greenshtein, 2009) for estimating the mean of a homoscedastic sequence of independent Gaussian observations under squared error loss. The various small modifications and default parameters that are suggested in their paper are implemented.
f.kde(x, s, bw = s/sqrt(log(length(x))), Cn = s * sqrt(3 * log(length(x))))
x |
Gaussian sequence |
s |
standard deviation |
bw |
scalar bandwidth for Gaussian kernel density estimate |
Cn |
scalar threshold for to clip estimates in low-density areas (Inf for no thresholding) |
theta_hat |
estimated values of means of Gaussian sequence |
theta = rnorm(250) x = theta + rnorm(250) res = f.kde(x, s = 1) mean((theta - res$theta_hat)^2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.