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

Description Usage Arguments Value Methods See Also Examples

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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.

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.

See Also

Other particle filter methods: abf(), bpfilter(), enkf(), girf(), ienkf(), igirf(), iubf()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# Create a simulation of a Brownian motion
b <- bm(U=3, N=10)

# 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=20,
                  nbhd = bm_nbhd,
                  Ninter = length(unit_names(b)))
# Get the likelihood estimate from ABFIR
logLik(abfird_bm)

spatPomp documentation built on Sept. 5, 2021, 5:35 p.m.