triple_goal: Shen and Louis (1998) Triple Goal Estimators

Description Usage Arguments Details Value Author(s) References Examples

Description

triple_goal implements the “Triple Goal” estimates of Shen and Louis (1998) for a vector of parameters given a sample from the posterior distribution of those parameters. Also computes “constrained Bayes” estimators of Ghosh (1992).

Usage

1
triple_goal(s, stop.if.ties = FALSE, quantile.type = 7)

Arguments

s

A (n x K) matrix of n samples of K group parameters with no missing values.

stop.if.ties

logical; if TRUE, function stops if any units have identical posterior mean ranks; otherwise breaks ties at random.

quantile.type

type argument to quantile function for different methods of computing quantiles.

Details

In typical applications, the matrix s will be a sample of size n from the joint posterior distribution of a vector of K group-specific parameters. Both the triple goal and constrained Bayes estimators are designed to mitigate problems arising from underdispersion of posterior means; see references.

Value

A dataframe with K rows with fields:

theta_pm

Posterior mean estimates of group parameters.

theta_psd

Posterior standard deviation estimates of group parameters.

theta_cb

“Constrained Bayes” estimates of group parameters using formula in Shen and Louis (1998).

theta_gr

“Triple Goal” estimates of group parameters using algorithm defined in Shen and Louis (1998).

rbar

Posterior means of ranks of group parameters (1=lowest).

rhat

Integer ranks of group parameters (=rank(rbar)).

Author(s)

J.R. Lockwood jrlockwood@ets.org

References

Shen W. and Louis T.A. (1998). “Triple-goal estimates in two-stage hierarchical models,” Journal of the Royal Statistical Society, Series B 60(2):455-471.

Ghosh M. (1992). “Constrained Bayes estimation with applications,” Journal of the American Statistical Association 87(418):533-540.

Examples

1
2
3
4
5
6
7
8
9
set.seed(1001)
.K <- 50
.nsamp <- 500
.theta_true <- rnorm(.K)
.s <- matrix(.theta_true, ncol=.K, nrow=.nsamp, byrow=TRUE) +
      matrix(rnorm(.K*.nsamp, sd=0.4), ncol=.K, nrow=.nsamp)
.e <- triple_goal(.s)
str(.e)
head(.e)

HETOP documentation built on June 28, 2019, 5:03 p.m.

Related to triple_goal in HETOP...