BLE_SRS {BayesSampling} | R Documentation |
Creates the Bayes Linear Estimator for the Simple Random Sampling design (without replacement)
BLE_SRS(ys, N, m = NULL, v = NULL, sigma = NULL, n = NULL)
ys |
vector of sample observations or sample mean ( |
N |
total size of the population. |
m |
prior mean. If |
v |
prior variance of an element from the population (bigger than |
sigma |
prior estimate of variability (standard deviation) within the population. If |
n |
sample size. Necessary only if |
A list containing the following components:
est.beta
- BLE of Beta (BLE for every individual)
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
https://www150.statcan.gc.ca/n1/en/catalogue/12-001-X201400111886
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.
ys <- c(5,6,8)
N <- 5
m <- 6
v <- 5
sigma <- 1
Estimator <- BLE_SRS(ys, N, m, v, sigma)
Estimator
# Same example but informing sample mean and sample size instead of sample observations
ys <- mean(c(5,6,8))
N <- 5
n <- 3
m <- 6
v <- 5
sigma <- 1
Estimator <- BLE_SRS(ys, N, m, v, sigma, n)
Estimator