Description Usage Arguments Details Value Author(s) References See Also Examples
Fits a spatio-temporal Fay-Herriot model with area effects following a SAR(1) process and with either uncorrelated or AR(1) time effects.
1 2 3 4 5 |
formula |
an object of class |
D |
total number of domains. |
T |
total number of time instants (constant for all domains). |
vardir |
vector containing the |
proxmat |
|
model |
type of model to be chosen between |
MAXITER |
maximum number of iterations allowed for the Fisher-scoring algorithm. Default value is |
PRECISION |
convergence tolerance limit for the Fisher-scoring algorithm. Default value is |
theta_iter |
If |
sigma21_start |
Starting value of the area effects variance in the fitting algorithm. Default value is |
rho1_start |
Starting value of the area effects spatial autocorrelation parameter in the fitting algorithm. Default value is |
sigma22_start |
Starting value of the area-time effects variance in the fitting algorithm. Default value is |
rho2_start |
Starting value of the time autocorrelation parameter of the area-time effects in the fitting algorithm. Default value is |
data |
optional data frame containing the variables named in |
A typical model has the form response ~ terms where response is the (numeric) response vector and terms is a series of terms which specifies a linear predictor for response. A terms specification of the form first + second indicates all the terms in first together with all the terms in second with duplicates removed.
A formula has an implied intercept term. To remove this use either y ~ x - 1 or y ~ 0 + x. See formula
for more details of allowed formulae.
The function returns a list with the following objects:
eblup |
a column vector with length |
fit |
a list containing the following objects:
|
In case that formula
, vardir
or proxmat
contain NA values a message is printed and no action is done.
Yolanda Marhuenda, Isabel Molina and Domingo Morales.
- Small Area Methods for Poverty and Living Conditions Estimates (SAMPLE), funded by European Commission, Collaborative Project 217565, Call identifier FP7-SSH-2007-1.
- Marhuenda, Y., Molina, I. and Morales, D. (2013). Small area estimation with spatio-temporal Fay-Herriot models. Computational Statistics and Data Analysis 58, 308-325.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(spacetime) # Load data set
data(spacetimeprox) # Load proximity matrix
D <- nrow(spacetimeprox) # number of domains
T <- length(unique(spacetime$Time)) # number of time instant
# Fit model S with uncorrelated time effects for each domain
resultS <- eblupSTFH(Y ~ X1 + X2, D, T, Var, spacetimeprox, "S",
theta_iter=TRUE, data=spacetime)
rowsT <- seq(T, T*D, by=T)
data.frame(Domain=spacetime$Area[rowsT], EBLUP_S=resultS$eblup[rowsT])
resultS$fit
# Fit model ST with AR(1) time effects for each domain
resultST <- eblupSTFH(Y ~ X1 + X2, D, T, Var, spacetimeprox,
theta_iter=TRUE, data=spacetime)
data.frame(Domain=spacetime$Area[rowsT], EBLUP_ST=resultS$eblup[rowsT])
resultST$fit
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.