rfh: Robust Fay Herriot Model

rfhR Documentation

Robust Fay Herriot Model

Description

User interface to fit robust Fay-Herriot type models. These models are here framed as linear mixed models. The parameter estimation is robust against outliers. Available models are the standard FH model, a spatial extension, a temporal extension and a spatio-temporal extension.

Usage

rfh(formula, data, samplingVar, correlation = NULL, ...)

## S4 method for signature 'formula,data.frame,character,ANY'
rfh(formula, data,
  samplingVar, correlation, ...)

## S3 method for class 'fitrfh'
predict(object, type = "reblup", c = 1, ...)

Arguments

formula

(formula) a formula specifying the fixed effects part of the model.

data

(data.frame) a data set.

samplingVar

(character) the name of the variable in data containing the sampling variances.

correlation

an optional correlation structure, e.g. corSAR1, for the random effects part of the model. Default is no correlation, i.e. a random intercept.

...

arguments passed fitGenericModel

object

(rfh) an object of class rfh

type

(character) one or more in c("linear", "reblup", "reblupbc")

c

(numeric) scalar; a multiplyer constant used in the bias correction. Default is to make no correction for realisations of direct estimator within c = 1 times the standard deviation of direct estimator.

Details

To trigger the spatial and temporal extensions you can supply an argument correlation. When corSAR1 is used the model of Petrucci and Salvati (2006); for corAR1 the model of Rao and Yu (1994) is used; and for corSAR1AR1 the model of Marhuenda et al. (2013).

The methods introducing the robust framework underpinning this implementation can be found in Warnholz (2016). They are based on the results by Sinha and Rao (2009) and Richardson and Welsh (1995).

Value

A list with the following elements:

  • call (language) the call generating the value

  • formula (formula) the formula passed as argument

  • samplingVar (numeric) the vector of sampling variances

  • coefficients (numeric) the vector of regression coefficients

  • variance (numeric) the vector of fitted variance parameter(s)

  • iterations (list) reporting each step in the optimisation

  • tol (numeric) the tolerance level used

  • maxIter (numeric) maximum overall allowed iterations

  • maxIterParam (numeric) maximum allowed iterations for model parameters in each overall iteration

  • maxIterRe (numeric) maximum allowed iterations for fitting the random effects

  • k (numeric) tuning constant in influence function

  • K (numeric) additional tuning constant; often derived from k to scale down the residual variance

  • y (numeric) the response vector

  • x (Matrix) the design matrix

  • re (numeric) the fitted random effects. Can be c(re1, re2)

  • reblup (numeric) the robust best linear unbiased prediction under the fitted model

  • residuals (numeric) the realised sampling errors

  • fitted (numeric) the fitted values using only the fixed effects part

References

Marhuenda, Y., I. Molina and D. Morales (2013). "Small area estimation with spatio-temporal Fay-Herriot models". In: Computational Statistics and Data Analysis 58, pp. 308–325.

Pratesi, M. and N. Salvati (2008). "Small area estimation: the EBLUP estimator based on spatially correlated random area effects". In: Statistical Methods & Applications 17, pp. 113–141.

Rao, J. N. K. and M. Yu (1994). "Small-Area Estimation by Combining Time-Series and Cross-Sectional Data". In: Canadian Journal of Statistics 22.4, pp. 511–528.

Richardson, A. M. and A. H. Welsh (1995). "Robust Restricted Maximum Likelihood in Mixed Linear Models". In: Biometrics 51 (4), pp. 1429–1439.

Sinha, S. K. and J. N. K. Rao (2009). "Robust Small Area Estimation". In: The Canadian Journal of Statistics 37 (3), pp. 381–399.

Warnholz, S. (2016): "Small Area Estimaiton Using Robust Extension to Area Level Models". Dissertation. https://refubium.fu-berlin.de/handle/fub188/9706.

Examples


# Non-temporal models:
data("grapes", package = "sae")
data("grapesprox", package = "sae")

fitRFH <- rfh(
  grapehect ~ area + workdays - 1,
  data = grapes,
  samplingVar = "var"
)

fitRFH
summary(fitRFH)

plot(fitRFH)
plot(predict(fitRFH))
plot(mse(fitRFH))

## Not run: 
# And the same including a spatial structure:
fitRSFH <- rfh(
  grapehect ~ area + workdays - 1,
  data = grapes,
  samplingVar = "var",
  corSAR1(as.matrix(grapesprox))
)

# Use the same methods, e.g. plot, for all these implementations:
data("spacetime", package = "sae")
data("spacetimeprox", package = "sae")
nTime <- length(unique(spacetime$Time))

fitRTFH <- rfh(
  Y ~ X1 + X2,
  spacetime,
  "Var",
  corAR1(nTime = nTime)
)

fitRSTFH <- rfh(
  Y ~ X1 + X2,
  spacetime,
  "Var",
  corSAR1AR1(W = as.matrix(spacetimeprox), nTime = nTime)
)

## End(Not run)

saeRobust documentation built on Jan. 22, 2023, 1:38 a.m.