BLE_SRS: Simple Random Sample BLE

Description Usage Arguments Value Source References Examples

View source: R/sample_designs.R

Description

Creates the Bayes Linear Estimator for the Simple Random Sampling design (without replacement)

Usage

1
BLE_SRS(ys, N, 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).

N

total size of the population.

m

prior mean. If NULL, sample mean will be used (non-informative prior).

v

prior variance of an element from the population (bigger than sigma^2). If NULL, it will tend to infinity (non-informative prior).

sigma

prior estimate of variability (standard deviation) within the population. If NULL, sample variance will be used.

n

sample size. Necessary only if ys represent sample mean (will not be used otherwise).

Value

A list containing the following components:

Source

https://www150.statcan.gc.ca/n1/en/catalogue/12-001-X201400111886

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
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

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