-
Notifications
You must be signed in to change notification settings - Fork 0
Directory Structure
├── examples
│ ├── gdp_example.jl
│ └── inflation_example.jl
├── README.md
├── README_v2.md
├── src
│ ├── particles.jl
│ ├── sequential_monte_carlo.jl
│ ├── smc_samplers.jl
│ ├── state_space_model.jl
│ └── utilities.jl
├── test
│ ├── demonstration.jl
│ ├── jump_start_test.jl
│ ├── smc_squared_unoptimized.jl
│ ├── ssm_macros.jl
│ ├── sv_demonstration.jl
│ └── ucsv_example.jl
└── visuals
├── pce_inflation_cycle_1960-2020_ucsv.svg
├── ...
└── ucsv_animation.gif
4 directories, 24 files
The main files are located in src
, and everything you need is contained within that directory. Once I officially make this module open for installation, this reference will be largely unnecessary.
The examples
folder contains two different applications of joint estimation. Only inflation_example.jl
is fully functional, but replicating experiments over different data should be trivial now that at least one implementation is done.
Similarly, the test
folder contains a bunch of working scripts which have either yet to be fully implemented, or serve as test cases to compare DGPs to the estimation from the algorithms. This will be cleaned up to actually reflect test cases to consistently benchmark the validity of the algorithms with different Julia updates.
The visuals
folder contains a set of svg
s, gif
s, and png
s which coincide with various scripts located in test
and examples
.
sequential_monte_carlo.jl
: defines the moduleSequentialMonteCarlo
, along with the packages it imports and files that associate.
particles.jl
: defines the basic structure of a particle filter, bootstrap filter, and the log likelihood called in both smc² and density tempered SMC. Furthermore, the resampling schemes and logsumexp functions are defined in this script both of which are used heavily throughout the module.
state_space_models.jl
: defines the structure and object typing of hidden Markov models (or state space models). With the heavy use of multiple dispatch, this implementation allows for the redefinition of model construction given different types of inputs; all of which should be defined and exported within this script or maybe an analogous folder.
utilities.jl
: extends the syntax of the only necessary library for this moduleDistributions.jl
. In the base module, support for static vectors is ignored so I rewrote a few of the associated routines to speed up some calculations. I also created a new type analogous toProdDist
, which instead considers a tuple of distributions as opposed to a vector; this allows distributions to be different types, thus extending support to discrete and continuous densities.
smc_samplers.jl
: defines the two main algorithms of this module: density tempered SMC and SMC². Both of which share a common object calledSMC
which contains attributes about the state particles, parameter particles, weights, summary statistics, likelihoods, priors, and model specification. Again with multiple dispatch, I can intelligently apply the same shared methods to different context in less code than I otherwise would. In this section, I also define routines for resampling aSMC
object, random walk kernels, rejuvenation steps, exchange steps, and also Base methods for theSMC
class.
In summation, this module is subject to change, but the structure will remain relatively intact with new iterations. In the future I plan on separating state space models into different files for legibility and navigation, of which is a best practice among Julia programming. I also plan on extending the support for multidimensional observations and states; as such, there may be another separation of SMC samplers.