geoaddSAE2 provides functions for fitting area-level Geoadditive Small Area Estimation (SAE) models. The Geoadditive SAE model extends the classical Fay-Herriot model by incorporating nonlinear covariate effects and spatial variation.
Amalyah Rizky Khairunnisa Sutarto, Novi Hidayat Pusponegoro
Amalyah Rizky Khairunnisa Sutarto 222212489@stis.ac.id
You can install the released version of geoaddSAE2 from CRAN or find my github repository Github
install.packages("remotes")
remotes::install_github("amalyahrizky04/geoaddSAE2")The following example illustrates the basic use of geosae().
#Load the library
library(geoaddSAE2)
#Load the dataset
data(simulated_sae)
#Estimate geoadditive SAE only
fit <- geosae(
data = simulated_sae,
formula = y ~ x1 + x2,
vardir = vardir,
nonlinear = "x3",
knots = c("x3" = 10),
spatial = c("lat", "lon"),
bootstrap = TRUE,
B = 10,
seed = 1
)
#Estimate geoadditive SAE and compare with Fay-Herriot and Spatial Fay-Herriot
fit <- geosae(
data = simulated_sae,
formula = y ~ x1 + x2,
vardir = vardir,
nonlinear = "x3",
knots = c("x3" = 10),
spatial = c("lat", "lon"),
compare = TRUE,
bootstrap = TRUE,
B = 10,
seed = 1
)
print(fit)
summary(fit)