Type: Package
Title: Geoadditive Small Area Model
Version: 0.1.0
Maintainer: Ketut Karang Pradnyadika <221709776@stis.ac.id>
Description: This function is an extension of the Small Area Estimation (SAE) model. Geoadditive Small Area Model is a combination of the geoadditive model with the Small Area Estimation (SAE) model, by adding geospatial information to the SAE model. This package refers to J.N.K Rao and Isabel Molina (2015, ISBN: 978-1-118-73578-7), Bocci, C., & Petrucci, A. (2016)<doi:10.1002/9781118814963.ch13>, and Ardiansyah, M., Djuraidah, A., & Kurnia, A. (2018)<doi:10.21082/jpptp.v2n2.2018.p101-110>.
License: GPL-3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
Imports: MASS, nlme, stats
URL: https://github.com/ketutdika/geoSAE
BugReports: https://github.com/ketutdika/geoSAE/issues
Depends: R (≥ 2.10)
NeedsCompilation: no
Packaged: 2021-06-11 09:55:58 UTC; ASUS
Author: Ketut Karang Pradnyadika [aut, cre], Ika Yuni Wulansari [aut, ths]
Repository: CRAN
Date/Publication: 2021-06-14 07:30:09 UTC

Data Unit Level Mean of Rice Field Productivity

Description

This dataset is unit level data which is averaged by area.

Usage

dataArea

Format

A data frame with 15 areas on the following 15 variables:

area

domain codes

name

name of the small area

x1

mean of proportion of paddy rice harvested area to total harvested area

x2

mean of latitude

x3

mean of longitude

population

total rice harvested area

z1

mean of z1 in Unit Level

z2

mean of z2 in Unit Level

z3

mean of z3 in Unit Level

z4

mean of z4 in Unit Level

z5

mean of z5 in Unit Level

z6

mean of z6 in Unit Level

ni

the number of samples per area is small (sample size in area)

ybar_direct

mean of rice field productivity

v.ybar._direct

varians of rice field productivity


Data Unit Level of Rice Field Productivity

Description

This dataset is data on rice productivity in 15 sub-districts from 3 districts (Seruyan, East Kotawaringin, and West Kotawaringin) in Central Kalimantan obtained from the Ubinan Survey conducted routinely by BPS. This data will be implemented with the Geoadditive Small Area Model

Usage

dataUnit

Format

A data frame with 210 observations on the following 7 variables:

number

order of observation

area

domain codes

name

name of the small area

y

rice field productivity

x1

proportion of paddy rice harvested area to total harvested area

x2

latitude

x3

longitude


EBLUP's for domain means using Geoadditive Small Area Model

Description

This function calculates EBLUP's based on unit level using Geoadditive Small Area Model

Usage

eblupgeo(formula, zspline, dom, xmean, zmean, data)

Arguments

formula

the model that to be fitted

zspline

n*k matrix that used in model for random effect of spline-2 (n is the number of observations, and k is the number of knots used)

dom

a*1 vector with domain codes (a is the number of small areas)

xmean

a*p matrix of auxiliary variables means for each domains (a is the number of small areas, and p is the number of auxiliary variables)

zmean

a*k matrix of spline-2 means for each domains

data

data unit level that used as data frame that containing the variables named in formula and dom

Value

This function returns a list of the following objects:

eblup

A Vector with a list of EBLUP with Geoadditive Small Area Model

fit

A list of components of the formed Geoadditive Small Area Model that containing the following objects such as model structure of the model, coefficients of the model, method, and residuals

sigma2

Variance (sigma square) of random effect and error with Geoadditive Small Area Model

Examples

#Load the dataset for unit level
data(dataUnit)

#Load the dataset for spline-2
data(zspline)

#Load the dataset for area level
data(dataArea)

#Construct the data frame
y       <- dataUnit$y
x1      <- dataUnit$x1
x2      <- dataUnit$x2
x3      <- dataUnit$x3
formula <- y~x1+x2+x3
zspline <- as.matrix(zspline[,1:6])
dom     <- dataUnit$area
xmean   <- cbind(1,dataArea[,3:5])
zmean   <- dataArea[,7:12]
number  <- dataUnit$number
area    <- dataUnit$area
data    <- data.frame(number, area, y, x1, x2, x3)

#Estimate EBLUP
eblup_geosae <- eblupgeo(formula, zspline, dom, xmean, zmean, data)


Parametric Bootstrap Mean Squared Error of EBLUP's for domain means using Geoadditive Small Area Model

Description

This function calculates MSE of EBLUP's based on unit level using Geoadditive Small Area Model

Usage

pbmsegeo(formula, zspline, dom, xmean, zmean, data, B = 100)

Arguments

formula

the model that to be fitted

zspline

n*k matrix that used in model for random effect of spline-2 (n is the number of observations, and k is the number of knots used)

dom

a*1 vector with domain codes (a is the number of small areas)

xmean

a*p matrix of auxiliary variables means for each domains (a is the number of small areas, and p is the number of auxiliary variables)

zmean

a*k matrix of spline-2 means for each domains

data

data unit level that used as data frame that containing the variables named in formula and dom

B

the number of iteration bootstraping

Value

This function returns a list of the following objects:

est

A list containing the following objects:

mse

A vector with a list of estimated mean squared error of EBLUPs estimators

Examples


#Load the dataset for unit level
data(dataUnit)

#Load the dataset for spline-2
data(zspline)

#Load the dataset for area level
data(dataArea)

#Construct data frame
y       <- dataUnit$y
x1      <- dataUnit$x1
x2      <- dataUnit$x2
x3      <- dataUnit$x3
formula <- y~x1+x2+x3
zspline <- as.matrix(zspline[,1:6])
dom     <- dataUnit$area
xmean   <- cbind(1,dataArea[,3:5])
zmean   <- dataArea[,7:12]
number  <- dataUnit$number
area    <- dataUnit$area
data    <- data.frame(number, area, y, x1, x2, x3)

#Estimate MSE
mse_geosae <- pbmsegeo(formula,zspline,dom,xmean,zmean,data,B=100)


Z-Spline

Description

This dataset is obtained from the calculation of the optimum GCV (Generalized Cross Validation), where there are 6 knots that have the lowest GCV value.

Usage

zspline

Format

A data frame with 210 observations on the following 6 variables (number of knots used)