knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

geoSAE

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.

Authors

Ketut Karang Pradnyadika, Ika Yuni Wulansari

Maintainer

Ketut Karang Pradnyadika 221709776@stis.ac.id

Installation

You can install the released version of geoSAE from CRAN or find my github repository Github

Example

library(geoSAE)

#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:10])
dom     <- dataUnit$area
xmean   <- cbind(1,dataArea[,2:4])
zmean   <- dataArea[,5:14]
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)
eblup_geosae$eblup

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

## eblup_geosae$eblup        #to see the result of EBLUPs with Geoadditive Small Area Model each area
## mse_geosae$mse            #to see the result of MSE with Geoadditive Small Area Model each area

References



ketutdika/geoSAE documentation built on Dec. 21, 2021, 6:35 a.m.