Giter VIP home page Giter VIP logo

kalmanfiltertools.jl's Introduction

KalmanFilterTools.jl

WORK IN PROGRESS

KalmanFilterTools provides efficient code to perform various computations pertaining to state space models and the Kalman Filter, such as the Kalman filter proper, the Kalman smoother or computing the log likelihood for the model.

Because such operations are very often computed in an iterative manner, all operations are computed /in place/. One function allocate the necessary workspace and another function performs the computations.

Installation

julia> using Pkg
julia> Pkg.add("KalmanFilterTools")

Julia version

KalmanFilterTools requires Julia version >= 1.4

State Space model

KalmanFilterTools handles state space models of the following form:

  y_t = Z a_t + \epsilon_t
  a_{t+1} = Ta_t + R\eta_t

  \epsilon_t \sim N(0,H)
  \eta_t \sim N(0,Q)

y_t: observation vector ny x 1 a_t: state vector ns x 1 \epsilon_t: measurement error vector ny x 1 \eta_t: shocks vector np x 1 Z: ny x ns matrix T: ns x ns matrix R: ns x np matrix H: ny x ny covariance matrix Q: ns x ns covariance matrix

Example

Computing the log likelihood

 using KalmanFilterTools

 data = ....
 Z = ...
 T = ...
 R = ...
 Q = ...
 a = ...
 P = ...
 
 ny, ns = size(Z)
 np = size(R, 2)
 nobs = size(data,2)
 first_obs = 1
 last_obs = nobs
 presample = 0
 
 kalman_ws = KalmanLikelihoodWs{Float64, Integer}(ny, ns, np, nobs)

 llk = kalman_likelihood(data, Z, H, T, R, Q, a, P, first_obs, last_obs, presample, kalman_ws)

kalmanfiltertools.jl's People

Contributors

micheljuillard avatar svillemot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.