gg | R Documentation |
Estimates the mean vector of a primary homoscedastic sequence of independent Gaussian observations under squared error loss by leveraging side information in the form of an auxiliary homoscedastic sequence of independent Gaussians. The optimal decision rule is estimated by directly minimizing an unbiased estimate of its risk.
gg( x1, s1, x2, s2, rho = 0, K = 10, C = 5, fast = TRUE, tol = 1e-05, maxit = 100, verbose = FALSE )
x1 |
primary Gaussian sequence |
s1 |
standard deviation of primary sequence |
x2 |
auxiliary Gaussian sequence of side information |
s2 |
standard deviation of auxiliary sequence |
rho |
regularization parameter, closer to 0 means less regularization |
K |
number of grid points, in the interval [x_j1 - C s_1, x_j1 + C s1], 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 |
fast |
if TRUE, use the fast algorithm (may be numerically unstable if rho = 0) |
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 |
t1_hat |
values of tuning parameters t1 |
t2_hat |
values of tuning parameters t2 |
theta_hat |
estimated values of means of primary Gaussian sequence |
## generate data n = 250 set.seed(1) theta1 = rnorm(n) theta2 = theta1 x1 = theta1 + rnorm(n) x2 = theta2 + rnorm(n) ## loss of MLE mean((theta1 - x1)^2) ## loss of estimator incorporating side information mean((theta1 - gg(x1, 1, x2, 1)$theta_hat)^2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.