Learn R Programming

BayesGOF (version 4.0)

gMLE.nn: Normal-Normal Parameter Estimation

Description

Computes type-II Maximum likelihood estimates \(\hat{\mu}\) and \(\hat{\tau}^2\) for Normal prior \(g\sim\)Normal\((\mu, \tau^2)\).

Usage

gMLE.nn(value, se, fixed = FALSE, method = c("DL","REML","MoM"))

Arguments

value

Vector of values.

se

Standard error for each value.

fixed

When FALSE, treats the input as if from a random effects model; otherwise, will treat it as if it a fixed effect.

method

Determines the method to find \(\tau^2\): "DL" uses Dersimonian and Lard technique, "REML" uses restricted maximum likelihood, and "MoM" uses a method of moments technique.

Value

estimate

Vector with both estimated \(\hat{\mu}\) and \(\hat{\tau}^2\).

mu.hat

Estimated \(\hat{\mu}\).

tau.sq

Estimated \(\hat{\tau}^2\).

method

User-selected method.

References

Marin-Martinez, F. and Sanchez-Meca, J., 2010. "Weighting by inverse variance or by sample size in random-effects meta-analysis," Educational and Psychological Measurement, 70(1), pp. 56-73.

Brown, L.D., 2008. "In-season prediction of batting averages: A field test of empirical Bayes and Bayes methodologies," The Annals of Applied Statistics, pp. 113-152.

Examples

Run this code
# NOT RUN {
data(ulcer)
### MLE estimate of alpha and beta
ulcer.mle <- gMLE.nn(ulcer$y, ulcer$se, method = "DL")$estimate
ulcer.mle
ulcer.reml <- gMLE.nn(ulcer$y, ulcer$se, method = "REML")$estimate
ulcer.reml
# }

Run the code above in your browser using DataLab