abfir: Adapted Bagged Filter with Intermediate Resampling (ABF-IR)

abfirR Documentation

Adapted Bagged Filter with Intermediate Resampling (ABF-IR)

Description

An algorithm for estimating the filter distribution and likelihood of a spatiotemporal partially-observed Markov process model. Running abfir causes the algorithm to run Monte Carlo replicated jobs which each carry out an adapted simulation using intermediate resampling. Adapted simulation is an easier task than filtering, since particles in each replicate remain close to each other. Intermediate resampling further assists against the curse of dimensionality (COD) problem for importance sampling. The adapted simulations are then weighted in a way that mitigates COD by making a weak coupling assumption to get an approximate filter distribution. As a by-product, we also get an approximation to the likelihood of the data.

Usage

## S4 method for signature 'spatPomp'
abfir(
  object,
  Np,
  Nrep,
  nbhd,
  Ninter,
  tol = (1e-300),
  ...,
  verbose = getOption("verbose", FALSE)
)

## S4 method for signature 'abfird_spatPomp'
abfir(object, Np, Nrep, nbhd, Ninter, tol, ...)

Arguments

object

A spatPomp object.

Np

The number of particles used within each replicate for the adapted simulations.

Nrep

The number of bootstrap replicates for the adapted simulations.

nbhd

A neighborhood function with three arguments: object, time and unit. The function should return a list of two-element vectors that represent space-time neighbors of (u,n), which is represented by c(unit,time). See example below for more details.

Ninter

the number of intermediate resampling time points. By default, this is set equal to the number of units.

tol

If the resampling weight for a particle is zero due to floating-point precision issues, it is set to the value of tol since resampling has to be done.

...

If a params argument is specified, abf will estimate the likelihood at that parameter set instead of at coef(object).

verbose

logical; if TRUE, messages updating the user on progress will be printed to the console.

Value

Upon successful completion, abfir() returns an object of class ‘abfird_spatPomp’ containing the algorithmic parameters used to run abfir() and the estimated likelihood.

Methods

The following methods are available for such an object:

logLik

yields a biased estimate of the log-likelihood of the data under the model.

Author(s)

Kidus Asfaw

References

\ionides

2021

See Also

likelihood maximization algorithms: ienkf(), igirf(), iubf(), ibpf()

Other likelihood evaluation algorithms: abf(), bpfilter(), enkf(), girf()

Examples

# Complete examples are provided in the package tests
## Not run: 
# Create a simulation of a Brownian motion
b <- bm(U=2, N=5)

# Create a neighborhood function mapping a point in space-time
# to a list of ``neighboring points" in space-time
bm_nbhd <- function(object, time, unit) {
  nbhd_list = list()
  if(time > 1 && unit > 1){
    nbhd_list = c(nbhd_list, list(c(unit-1, time-1)))
  }
  return(nbhd_list)
}
# Run ABFIR with specified number of Monte Carlo replicates and particles
# per replicate
abfird_bm <- abfir(b,
                  Nrep = 2,
                  Np=10,
                  nbhd = bm_nbhd,
                  Ninter = length(unit_names(b)))
# Get the likelihood estimate from ABFIR
logLik(abfird_bm)

## End(Not run)

spatPomp documentation built on Aug. 10, 2023, 1:10 a.m.