g: Gaussian mean estimation

View source: R/g.R

gR Documentation

Gaussian mean estimation

Description

Estimates the mean vector of a primary homoscedastic sequence of independent Gaussian observations under squared error loss. The optimal decision rule is estimated by directly minimizing an unbiased estimate of its risk.

Usage

g(x, s, rho = 0, K = 10, C = 5, tol = 1e-05, maxit = 100, verbose = FALSE)

Arguments

x

Gaussian sequence

s

standard deviation

rho

regularization parameter, closer to 0 means less regularization

K

number of grid points, in the interval [x_j - C s, x_j + C s], over which to search for the jth tuning parameter, where C is define below

C

the value of the constant C in the interval above

tol

error tolerance for convergence of the unbiased risk estimate

maxit

maximum number of allowable iterations

verbose

should the value of SURE be reported at each iteration

Value

t_hat

values of tuning parameters t

theta_hat

estimated values of means of Gaussian sequence

Examples


## generate data
n = 250
set.seed(1)
theta = rnorm(n)
x = theta + rnorm(n)
## loss of MLE
mean((theta - x)^2)
## loss of estimator incorporating side information
mean((theta - g(x, 1)$theta_hat)^2)



sdzhao/cole documentation built on May 2, 2022, 9:42 a.m.