Description Usage Arguments Value Source References Examples
Creates the Bayes Linear Estimator for Categorical Data
1 | BLE_Categorical(ys, n, N, m = NULL, rho = NULL)
|
ys |
k-vector of sample proportion for each category. |
n |
sample size. |
N |
total size of the population. |
m |
k-vector with the prior proportion of each strata. If |
rho |
matrix with the prior correlation coefficients between two different units within categories. It must be a symmetric square matrix of dimension k (or k-1). If |
A list containing the following components:
est.prop
- BLE for the sample proportion of each category
Vest.prop
- Variance associated with the above
Vs.Matrix
- Vs matrix, as defined by the BLE method (should be a positive-definite matrix)
R.Matrix
- R matrix, as defined by the BLE method (should be a positive-definite matrix)
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # 2 categories
ys <- c(0.2614, 0.7386)
n <- 153
N <- 15288
m <- c(0.7, 0.3)
rho <- matrix(0.1, 1)
Estimator <- BLE_Categorical(ys,n,N,m,rho)
Estimator
ys <- c(0.2614, 0.7386)
n <- 153
N <- 15288
m <- c(0.7, 0.3)
rho <- matrix(0.5, 1)
Estimator <- BLE_Categorical(ys,n,N,m,rho)
Estimator
# 3 categories
ys <- c(0.2, 0.5, 0.3)
n <- 100
N <- 10000
m <- c(0.4, 0.1, 0.5)
mat <- c(0.4, 0.1, 0.1, 0.1, 0.2, 0.1, 0.1, 0.1, 0.6)
rho <- matrix(mat, 3, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.