MyNixOS website logo
Description

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().

Metadata

Version

0.2.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD 13
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows