Learn R Programming

spatPomp (version 0.36.1)

enkf: Generalized Ensemble Kalman filter (EnKF)

Description

A function to perform filtering using the ensemble Kalman filter of Evensen, G. (1994). This function is generalized to allow for an measurement covariance matrix that varies over time. This is useful if the measurement model varies with the state.

Usage

# S4 method for spatPomp
enkf(data, Np, ..., verbose = getOption("verbose", FALSE))

Value

An object of class ‘enkfd_spatPomp’ that contains the estimate of the log likelihood (via the loglik attribute), algorithmic parameters used to run enkf(). Also included are estimated filter means, prediction means and forecasts that are generated during an enkf() run.

Arguments

data

A spatPomp object.

Np

The number of Monte Carlo particles used to approximate the filter distribution.

...

Additional arguments can be used to replace model components.

verbose

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

References

G. Evensen. Sequential data assimilation with a nonlinear quasi-geostrophic model using Monte Carlo methods to forecast error statistics. Journal of Geophysical Research: Oceans 99, 10143--10162, 1994.

G. Evensen. Data assimilation: the ensemble Kalman filter. Springer-Verlag, 2009.

J.L. Anderson. An Ensemble Adjustment Kalman Filter for Data Assimilation. Monthly Weather Review 129, 2884--2903, 2001.

See Also

ienkf(), igirf, iubf, ibpf

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

Examples

Run this code
# Complete examples are provided in the package tests
if (FALSE) {
# Create a simulation of a Brownian motion
b <- bm(U=2, N=5)

# Run EnKF
enkfd_bm <- enkf(b, Np = 20)

# Get a likelihood estimate
logLik(enkfd_bm)
}

Run the code above in your browser using DataLab