Description Usage Arguments Value Author(s) References See Also Examples
The function eblup.saery
calculate the eblup and mse for a model. Is recomended that the model was previusly checked by fit.saery
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)
|
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 |
plot |
logical specifying if a set of plot be returned. |
type |
three types of mse can be calculated for |
B |
the number of bootstrap samples to be generated and fitted for types |
A data frame with the eblups and its mse be returned. A set of plots be displayed if plot = TRUE
Maria Dolores Esteban Lefler, Domingo Morales Gonzalez, Agustin Perez Martin
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.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.