gmleb | R Documentation |
Estimates mean vector of a homoscedastic sequence of independent Gaussian observations using the nonparametric maximum likelihood procedure of Jiang and Zhang (2009)
gmleb(x1, s1, init = NULL, grid = NULL, M = 300, tol = 1e-05, maxit = 1000)
x1 |
Gaussian sequence |
s1 |
standard deviation of Gaussian sequence |
init |
initial values for masses of discrete prior, default is discrete uniform over support points |
grid |
grid of support points for discrete prior, default is M equally spaced points between min(x1) and max(x1) |
M |
number of grid points |
tol |
error tolerance of convergence of log likelihood |
maxit |
maximum number of iterations |
estimated values of means of primary Gaussian sequence
## generate data n = 250 set.seed(1) theta1 = rnorm(n) x1 = theta1 + rnorm(n) ## loss of MLE mean((theta1 - x1)^2) ## loss of GMLEB mean((theta1 - gmleb(x1, 1)$theta_hat)^2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.