Description Usage Arguments Value Source References Examples
View source: R/sample_designs.R
Creates the Bayes Linear Estimator for the Stratified Simple Random Sampling design (without replacement)
1 
ys 
vector of sample observations or sample mean for each strata ( 
h 
vector with number of observations in each strata. 
N 
vector with the total size of each strata. 
m 
vector with the prior mean of each strata. If 
v 
vector with the prior variance of an element from each strata (bigger than 
sigma 
vector with the prior estimate of variability (standard deviation) within each strata of the population. If 
A list containing the following components:
est.beta
 BLE of Beta (BLE for the individuals in each strata)
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/12001X201400111886
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, 1528.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  ys < c(2,1,1.5, 6,10, 8,8)
h < c(3,2,2)
N < c(5,5,3)
m < c(0,9,8)
v < c(3,8,1)
sigma < c(1,2,0.5)
Estimator < BLE_SSRS(ys, h, N, m, v, sigma)
Estimator
# Same example but informing sample means instead of sample observations
y1 < mean(c(2,1,1.5))
y2 < mean(c(6,10))
y3 < mean(c(8,8))
ys < c(y1, y2, y3)
h < c(3,2,2)
N < c(5,5,3)
m < c(0,9,8)
v < c(3,8,1)
sigma < c(1,2,0.5)
Estimator < BLE_SSRS(ys, h, N, m, v, sigma)
Estimator

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.