pbmsegeo {geoSAE}R Documentation

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)


[Package geoSAE version 0.1.0 Index]