# BLE_Categorical: Bayes Linear Method for Categorical Data In BayesSampling: Bayes Linear Estimators for Finite Population

## Description

Creates the Bayes Linear Estimator for Categorical Data

## Usage

 `1` ```BLE_Categorical(ys, n, N, m = NULL, rho = NULL) ```

## Arguments

 `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 `NULL`, sample proportion for each strata will be used (non-informative prior). `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 `NULL`, non-informative prior will be used.

## Value

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)

## 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 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) ```

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