  The simultaneous estimation of many parameters based on data collected from
corresponding studies is a key research problem that has received renewed
attention in the high-dimensional setting. Many practical situations involve
heterogeneous data where heterogeneity is captured by a nuisance parameter.
Effectively pooling information across samples while correctly accounting for
heterogeneity presents a significant challenge in large-scale estimation
problems. We address this issue by introducing the ``Nonparametric Empirical
Bayes Structural Tweedie" (NEST) estimator, which efficiently estimates the
unknown effect sizes and properly adjusts for heterogeneity via a generalized
version of Tweedie's formula. For the normal means problem, NEST simultaneously
handles the two main selection biases introduced by heterogeneity: one, the
selection bias in the mean, which cannot be effectively corrected without also
correcting for, two, selection bias in the variance. We develop theory to show
that NEST is asymptotically as good as the optimal Bayes rule that uniquely
minimizes a weighted squared error loss. In our simulation studies NEST
outperforms competing methods, with much efficiency gains in many settings. The
proposed method is demonstrated on estimating the batting averages of baseball
players and Sharpe ratios of mutual fund returns. Extensions to other members
of the two-parameter exponential family are discussed.
