Learn R Programming

⚠️There's a newer version (1.5) of this package.Take me there.

Purpose

This package provides some minimal working examples for implementing the particle Metropolis-Hastings (PMH) algorithm for parameter inference in nonlinear state space models. The package accompanies a tutorial:

Dahlin, J. & Schön, T. B. "Getting started with particle Metropolis-Hastings for inference in nonlinear dynamical models." pre-print, arXiv:1511.01707, 2015.

Currently available at:

http://arxiv.org/pdf/1511.01707

Usage

The main functions of the package are the five examples connected to the paper:

  • ** example1_lgss() ** Demostrates the particle filter for estimating the

state in a linear Gaussian state space model.

  • ** example2_lgss() ** Demostrates PMH for estimating the parameters in a

linear Gaussian state space model.

  • ** example3_sv() ** Demostrates PMH for estimating the parameters in a

stochastic volatility model.

  • ** example4_sv() ** Demostrates PMH for estimating the parameters in a

stochastic volatility model using a tailored proposal distribution.

  • ** example5_sv() ** Demostrates PMH for estimating the parameters in a

stochastic volatility model using a reparameterised model.

Simple example

The examples can be executed by e.g.

example2_lgss()

which will recreate on of the plots in the aforementioned tutorial. See the reference for more background and details.

How do I get it?

The package is available through CRAN and can be installed by

install.packages("pmhtutorial")

Copy Link

Version

Install

install.packages('pmhtutorial')

Monthly Downloads

95

Version

1.0.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Johan Dahlin

Last Published

January 19th, 2016

Functions in pmhtutorial (1.0.0)

example1_lgss

State estimation in a linear Gaussian state space model
example2_lgss

Parameter estimation in a linear Gaussian state space model
example4_sv

Parameter estimation in a simple stochastic volatility model
kf

Kalman filter for state estimate in a linear Gaussian state space model
pmh

Particle Metropolis-Hastings algorithm for a linear Gaussian state space model
sm_sv

Bootstrap particle filter for state estimate in a simple stochastic volatility model
pmh_sv

Particle Metropolis-Hastings algorithm for a stochastic volatility model model
pmhtutorial-package

Minimal working examples for particle Metropolis-Hastings
pmh_sv_reparameterised

Particle Metropolis-Hastings algorithm for a stochastic volatility model model
sm

Fully-adapted particle filter for state estimate in a linear Gaussian state space model
example3_sv

Parameter estimation in a simple stochastic volatility model
generateData

Generates data from a linear Gaussian state space model
example5_sv

Parameter estimation in a simple stochastic volatility model