eblup.saery: The function 'eblup.saery' calculate the eblup and mse for a...

Description Usage Arguments Value Author(s) References See Also Examples

Description

The function eblup.saery calculate the eblup and mse for a model. Is recomended that the model was previusly checked by fit.saery

Usage

1
2
3
4
5
6
eblup.saery(X, ydi, D, md, sigma2edi,
      model = c("INDEP", "AR1", "MA1"),
      plot = FALSE, type = "I", B = 100)
eblup.saery.AR1(X, ydi, D, md, sigma2edi, plot, type, B)
eblup.saery.MA1(X, ydi, D, md, sigma2edi, plot, type, B)
eblup.saery.indep(X, ydi, D, md, sigma2edi, plot)

Arguments

X

a numeric vector or data frame containing the aggregated (population) values of p auxiliary variables. A ones columns must be agregated to calculate the intercept parameter

ydi

a numeric vector with the direct estimator of the indicator of interest for area (domain)

D

a numeric vector with the number of areas (domain) of the data

md

a numeric vector with the number of periods (subdomains) for each area of the data

sigma2edi

a numeric vector with the known variance of the error term

model

Three diferents types of model must be fit. For an indepent model INDEP or an abbreviated version of it must be typed. An AR1 model can be fit using AR1 or an abbreviated version. For MA1 model, use MA1 or an abbreviated version. This function and fit.saery use the REML method to fit the model.

plot

logical specifying if a set of plot be returned. FALSE by default.

type

three types of mse can be calculated for AR1 and MA1 models. One of the with an explicit and direct function, and the orther two by a bootstrap procedure that takes more time to the system to calculate them. For the indep model, only the an explicit function are developed type = "I"

B

the number of bootstrap samples to be generated and fitted for types "I" and "II"

Value

A data frame with the eblups and its mse be returned. A set of plots be displayed if plot = TRUE

Author(s)

Maria Dolores Esteban Lefler, Domingo Morales Gonzalez, Agustin Perez Martin

References

Rao, J.N.K., Yu, M., 1994. Small area estimation by combining time series and cross sectional data. Canadian Journal of Statistics 22, 511-528.

Esteban, M.D., Morales, D., Perez, A., Santamaria, L., 2012. Small area estimation of poverty proportions under area-level time models. Computational Statistics and Data Analysis, 56 (10), pp. 2840-2855.

See Also

fit.saery

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
sigma2edi <- datos[,6]
X <- as.matrix(datos[,5])
ydi <- datos[,3]
D <- length(unique(datos[,1]))
md <- rep(length(unique(datos[,2])), D)

#For computational reasons B is too low. We recomend to increase up to 100
eblup.output.ar1 <- eblup.saery(X, ydi, D, md, sigma2edi, model = "a", plot = TRUE, B = 2)
eblup.output.ar1

#For computational reasons B is too low. We recomend to increase up to 100
eblup.output.ma1 <- eblup.saery(X, ydi, D, md, sigma2edi,
                    model = "ma", plot = FALSE, type = "II", B = 2)
eblup.output.ma1

eblup.output.indep <- eblup.saery(X, ydi, D, md, sigma2edi,
                      model = "i", plot = TRUE)
eblup.output.indep

saery documentation built on May 2, 2019, 4:17 a.m.