Package 'saePseudo'

Title: Small Area Estimation using Averaging Pseudo Area Level Model
Description: Provides function for small area estimation at area level using averaging pseudo area level model for variables of interest. A dataset produced by data generation is also provided. This package estimates small areas at the village level and then aggregates them to the sub-district, region, and provincial levels.
Authors: Darin Huwaida [aut, cre], Azka Ubaidillah [aut]
Maintainer: Darin Huwaida <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-11-25 06:26:09 UTC
Source: https://github.com/darinhuwaidaa/saepseudo

Help Index


Small Area Estimation using Averaging Pseudo Area Level Model

Description

Provides function for small area estimation at area level using averaging pseudo area level model for variables of interest. A dataset produced by data generation are also provided. This package estimates small areas at the village level and then aggregates them to the sub-district, region, and provincial levels.

Usage

avgPseudo(prov, reg, sub, vill, y, x, var, N, method = "REML")

Arguments

prov

Vector containing information of province

reg

Vector containing information of region

sub

Vector containing information of subdistrict

vill

Vector containing information of village

y

Direct estimation for each area

x

Auxiliary variable for each area

var

Sampling variances of direct estimators for each domain

N

Number of population in each area

method

Method used to fit the Fay-Herriot model, which can be either "ML", "REML" or "FH" methods. Default is "REML" method

Value

This function returns a list of the following objects:

Est_Area3

A dataframe with the values of Small Area Estimation with averaging pseudo area level model for sub-district level

Est_Area2

A dataframe with the values of Small Area Estimation with averaging pseudo area level model for region level

Est_Area1

A dataframe with the values of Small Area Estimation with averaging pseudo area level model for provincial level

Examples

# Load Dataset
data(dataVill)
saeAVG.Pseudo <- avgPseudo(prov = dataVill$Area1, reg = dataVill$Area2, sub = dataVill$Area3,
                 vill = dataVill$Area4, y = dataVill$ydir_area4, x = dataVill$X1,
                 var = dataVill$vardir_area4, N = dataVill$N, method="REML")

# Result
saeAVG.Pseudo$Est_Area3
saeAVG.Pseudo$Est_Area2
saeAVG.Pseudo$Est_Area1

Sample Data for Small Area Estimation using Averaging Pseudo Area Level Model

Description

Dataset to simulate Small Area Estimation using Averaging Pseudo Area Level Model This data is generated by these following steps:

  1. Generate population data consisting Area1 (province), Area2 (region), Area3 (sub-district), Area4 (village), and Unit. The auxiliary variabels are generated by Uniform distribution with (x1 U(40,100))(x1 ~ U(40, 100)) and Normal distribution with (x2 N(70,5))(x2 ~ N(70, 5)). The coefficient parameters are set as β0=0.5\beta_{0} = 0.5, β1=0.2\beta_{1} = 0.2, and β2=0.2\beta_{2} = 0.2

  2. Calculate yk=β0+β1x1k+β2x2ky_{k} = \beta_{0}+\beta_{1}*x1_{k}+\beta_{2}*x_2{k}

  3. Generate number of sample with simple random sampling with replacement

  4. Calculate ydirarea4=Σyknydir_area4 = \frac{\Sigma{y_{k}}}{n}, vardirarea4=Σ(ykΣykn)2n1vardir_area4 = \frac{\Sigma{(y_{k}-\frac{\Sigma{y_{k}}}{n})^2}}{n-1}, and auxiliary variable X1=Σx1knX1 = \frac{\Sigma{x1_{k}}}{n}

  5. Calculate N (number of population) based on the initial population generated for each Area4 selected as a sample

  6. Area1, Area2, Area3, Area4, ydir_area4, vardir_area4, X1, and N are combined in a dataframe called dataVill.

Usage

dataVill

Format

A data frame with 83 observations on the following 8 variables:

Area1

Province

Area2

Region

Area3

Sub-district

Area4

Village

ydir_area4

Direct Estimation of y

vardir_area4

Sampling variance of y

X1

Auxiliary variable

N

Number of population in area4