R/dataHBME.R

#' @title Sample Data for Small Area Estimation with Measurement Error using Hierarchical Bayesian Method under Normal Distribution
#' @description This data generated by simulation based on Hierarchical Bayesian Method under Normal Distribution with Measurement Error by following these steps:
#' \enumerate{
#'   \item Generate \eqn{x_{1}}{x1} ~ UNIF(0, 1), \eqn{x_{2}}{\x2} ~ UNIF(1,5), \eqn{x_{3}}{x3} ~ UNIF(10,15), and \eqn{x_{4}}{x4} ~ UNIF(10,20)
#'   \item Generate \eqn{v.x_{1}}{v.x1} ~ Gamma(1,1) and \eqn{v.x_{2}}{v.x2} ~ Gamma(2,1)
#'   \item Generate \eqn{x_{1h}}{x1h} ~ N(\eqn{x_{1}}{x1}, sqrt(\eqn{v.x_{1}}{v.x1})) and \eqn{x_{2h}}{x2h} ~ N(\eqn{x_{2}}{x2}, sqrt(\eqn{v.x_{2}}{v.x2}))
#'   \item Generate \eqn{\beta_{0}}{\beta0}, \eqn{\beta_{1}}{\beta1}, \eqn{\beta_{2}}{\beta2}, \eqn{\beta_{3}}{\beta3}, and \eqn{\beta_{4}}{\beta4}
#'   \item Generate \eqn{u}{u} ~ N(0,1) and \eqn{v}{v} ~ 1/(Gamma(1,1))
#'   \item Calculate \eqn{\mu}{\mu} = \eqn{\beta_{0} + \beta_{1}*x_{1h} + \beta_{2}*x_{2h} + \beta_{3}*x_{3} + \beta_{4}*x_{4} + u}{\beta0 + \beta1*x1h + \beta2*x2h + \beta3*x3 + \beta4*x4 + u}
#'   \item Generate \eqn{Y}{Y} ~ N(\eqn{\mu}{\mu}, sqrt(\eqn{v}{v}))
#' }
#' Direct estimation \code{Y}, auxiliary variables \code{x1 x2 x3 x4}, sampling variance \code{v}, and mean squared error of auxiliary variables \code{v.x1 v.x2} are arranged in a dataframe called \code{dataHBME}.
#' @usage data(dataHBME)
#' @format A data frame with 30 observations on the following 8 variables.
#' \describe{
#'  \item{\code{Y}}{direct estimation of Y.}
#'  \item{\code{x1}}{auxiliary variable of x1.}
#'  \item{\code{x2}}{auxiliary variable of x2.}
#'  \item{\code{x3}}{auxiliary variable of x3.}
#'  \item{\code{x4}}{auxiliary variable of x4.}
#'  \item{\code{vardir}}{sampling variances of Y.}
#'  \item{\code{v.x1}}{mean squared error of x1.}
#'  \item{\code{v.x2}}{mean squared error of x2.}
#' }
#' @name dataHBME
NULL

Try the saeHB.ME package in your browser

Any scripts or data that you put into this service are public.

saeHB.ME documentation built on Aug. 21, 2023, 9:11 a.m.