Agnostic Fay-Herriot Model for Small Area Statistics

Implements the Agnostic Fay-Herriot model, an extension of the traditional small area model. In place of normal sampling errors, the sampling error distribution is estimated with a Gaussian process to accommodate a broader class of distributions. This flexibility is most useful in the presence of bounded, multi-modal, or heavily skewed sampling errors.


agfh

Overview

Small area statistics concerns estimation techniques for sub-populations when direct estimation would be unreliable. The agfh package implements the Agnostic Fay-Herriot model (AGFH), an extension of the traditional small area model. In place of normal sampling errors, the sampling error distribution is modified by a Gaussian process to accommodate a broader class of distributions.

This flexibility is most useful in the presence of bounded, bi-modal, or heavily skewed sampling errors. Practitioners should consider the AGFH model when they have evidence of such departures from the traditional methods

Installation

Install the official version from CRAN:

install.packages('agfh')

Next, consult the accompanying paper for a thorough background (under review), or the vignette within this package for an end-to-end illustration of the package.

Getting Started

The AGFH model is implemented as a Metropolis-within-Gibbs sampler; use make_agfh_sampler() to instantiate a sampler. Doing so requires supplying the observed response (as an n-vector of univariate values), accompanying covariates (as an n \times p matrix of values), and sampling error precision (again an n-vector of univariate values). Additionally, prior hyperparameters can be supplied.

make_agfh_sampler() creates a sampler function; calling it will produce MCMC samples targeting the posterior. It requires starting values for the Gibbs components as well as the desired number of steps and thinning rate. Note, n.mcmc=100 and n.thin=10 would make 1000 MCMC steps and return every tenth.

The sampler returns a list of relevant samples and summary values. Typically, the contents of param.samples.list are most interesting; these are the posterior samples from the AGFH model. The convenience method map_from_density() may be used to get a maximum a posteriori point estimate.

Parallel analysis with the traditional Fay-Herriot model is also possible with agfh, as detailed in the vignette. In particular, make_gibbs_sampler() returns a Gibbs sampler of the traditional model that can be used in the same manner as make_agfh_sampler().

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("agfh")

0.2.1 by Marten Thompson, 3 years ago


Browse source code at https://github.com/cran/agfh


Authors: Marten Thompson [aut, cre, cph] , Snigdhansu Chatterjee [ctb, cph]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports ggplot2, goftest, ks, mvtnorm, stats

Suggests knitr, rmarkdown, testthat


See at CRAN