Implementing a particle filter in C++ using Rcpp (part 2)

In my previous blog post I showed how to implement a particle filter in C++.

In this post I will implement a backward-simulation particle smoother (see Example 3 in the code below) and a method for forecasting with the particle filter (Example 4) in C++. By using R packages Rcpp (version 0.12.11) and RcppArmadillo (version 0.7.800.2.0) it is possible to subsequently run this smoother and forecasting method in R. Continue reading Implementing a particle filter in C++ using Rcpp (part 2)

Implementing a particle filter in C++ using Rcpp (part 1)

In one of my previous blog posts I demonstrated how to implement a particle filter in R.

In this post I’m going to implement the same particle filter, but this time I’ll program the filter in C++. The R packages Rcpp (version 0.12.11) and RcppArmadillo (version 0.7.800.2.0) will make it possible to subsequently run this filter in R, since these two R packages allow us to connect C++ to R. Continue reading Implementing a particle filter in C++ using Rcpp (part 1)