https://github.com/tpapp/hiddenpoisson.jl
Simulate a hidden state model in continuous time with Poisson shocks.
https://github.com/tpapp/hiddenpoisson.jl
Last synced: 4 months ago
JSON representation
Simulate a hidden state model in continuous time with Poisson shocks.
- Host: GitHub
- URL: https://github.com/tpapp/hiddenpoisson.jl
- Owner: tpapp
- License: other
- Created: 2017-04-03T14:26:00.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-12-20T09:15:24.000Z (over 5 years ago)
- Last Synced: 2026-01-20T20:04:53.824Z (5 months ago)
- Language: Julia
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# HiddenPoisson
[](http://www.repostatus.org/#wip)
[](https://travis-ci.org/tpapp/HiddenPoisson.jl)
[](https://coveralls.io/github/tpapp/HiddenPoisson.jl?branch=master)
[](http://codecov.io/github/tpapp/HiddenPoisson.jl?branch=master)
## Overview
Simulate a hidden state model in continuous time with the following setup:
1. Let `state` denote the hidden (unobserved) *state*. It can be an arbitrary Julia object, as long as the relevant methods are defined.
2. The *model* parameters are packed into the `model` object.
3. `transitions(model, state)` returns a vector of `Pair(λ, next_state)` elements. *Shocks* can happen at rates `λ` independently (competing Poisson processes), and then `next_state`, which is a function or a constant, is used to generate the next state.
4. `observation(model, state)` is another (possibly stochastic) function for returning an observation for the hidden `state`.
The user needs to define a model structure, then
```julia
import HiddenPoisson: transitions, observation
```
and then define these methods for the model structure. Then simulations are obtained using `next_observation` or `next_observations`. See the tests for examples.
## How it works
A `HiddenState` object keeps track of the time remaining until the next shock, and its value. Given a time interval `t`, new transitions are generated on demand until enough time has passed.