Description Usage Arguments Value Author(s) Examples
View source: R/ShrinkageEstimates.R
Computes shrinkage estimates for small domain parameters using different choices for the regression weights.
1 2 | ShrinkageEstimates(Y, X, sd.resid, weights=c("cure", "cure.plugin",
"cure.multitau", "mle","bpe"), vc.est=c("mle", "reml","ure"))
|
Y |
The K x 1 vector of responses. |
X |
The K x p design matrix. |
sd.resid |
The K x 1 vector sampling standard deviations. |
weights |
The method by which to choose regression weights. |
vc.est |
When the mle method is used for regression weights, this determines which method is used to estimate the variance component. This can be either maximum likelihood estimation, restricted maximum likelihood estimation, or minimization of an unbiased risk estimate. |
A list with the following components
Nicholas Henderson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | K <- 20
X <- cbind(rep(1, K), rnorm(K))
beta.coef <- rnorm(2)
nn <- 1 + rpois(K, lambda=4)
sig.sq <- 1/nn
ran.ef <- rnorm(K)
Y <- X%*%beta.coef + ran.ef + sqrt(sig.sq)*rnorm(K)
sd.resid <- sqrt(sig.sq)
cbp.est <- ShrinkageEstimates(Y, X, sd.resid, weights="cure")
eblup.est <- ShrinkageEstimates(Y, X, sd.resid, weights="mle")
obp.est <- ShrinkageEstimates(Y, X, sd.resid, weights="bpe")
par(mfrow=c(1,2))
plot(cbp.est$shrinkage.estimate, eblup.est$shrinkage.estimate)
plot(cbp.est$shrinkage.estimate, obp.est$shrinkage.estimate)
abline(0, 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.