BLE_Ratio: Ratio BLE In BayesSampling: Bayes Linear Estimators for Finite Population

Description

Creates the Bayes Linear Estimator for the Ratio "estimator"

Usage

 `1` ```BLE_Ratio(ys, xs, x_nots, m = NULL, v = NULL, sigma = NULL, n = NULL) ```

Arguments

 `ys` vector of sample observations or sample mean (`sigma` and `n` parameters will be required in this case). `xs` vector with values for the auxiliary variable of the elements in the sample or sample mean. `x_nots` vector with values for the auxiliary variable of the elements not in the sample. `m` prior mean for the ratio between Y and X. If `NULL`, `mean(ys)/mean(xs)` will be used (non-informative prior). `v` prior variance of the ratio between Y and X (bigger than `sigma^2`). If `NULL`, it will tend to infinity (non-informative prior). `sigma` prior estimate of variability (standard deviation) of the ratio within the population. If `NULL`, sample variance of the ratio will be used. `n` sample size. Necessary only if `ys` and `xs` represent sample means (will not be used otherwise).

Value

A list containing the following components:

• `est.beta` - BLE of Beta

• `Vest.beta` - Variance associated with the above

• `est.mean` - BLE for each individual not in the sample

• `Vest.mean` - Covariance matrix associated with the above

• `est.tot` - BLE for the total

• `Vest.tot` - Variance associated with the above

References

GonÃ§alves, K.C.M, Moura, F.A.S and Migon, H.S.(2014). Bayes Linear Estimation for Finite Population with emphasis on categorical data. Survey Methodology, 40, 15-28.

Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22``` ```ys <- c(10,8,6) xs <- c(5,4,3.1) x_nots <- c(1,20,13,15,-5) m <- 2.5 v <- 10 sigma <- 2 Estimator <- BLE_Ratio(ys, xs, x_nots, m, v, sigma) Estimator # Same example but informing sample means and sample size instead of sample observations ys <- mean(c(10,8,6)) xs <- mean(c(5,4,3.1)) n <- 3 x_nots <- c(1,20,13,15,-5) m <- 2.5 v <- 10 sigma <- 2 Estimator <- BLE_Ratio(ys, xs, x_nots, m, v, sigma, n) Estimator ```

BayesSampling documentation built on May 2, 2021, 1:06 a.m.