Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add particle marginal Metropolis Hastings example #11
The next proposed pull request is for an example implementing particle marginal Metropolis-Hastings for the non-linear state space model described in Section 3.1 of Andrieu et al. (2010). This example is useful to show how to implement pseudo-marginal methods with RcppSMC, but it doesn't really demonstrate additional capabilities of the base library per se. I think one of the main benefits is showing how to do multiple runs of SMC methods with different parameters, so I am especially interested in what you think of the way I've done this (I can expand on this more before sending the pull request if you like).
I realized after implementing this a few weeks ago that the model is very similar to what's used in pfNonlinBS. The non-linear SSM used in pfNonlinBS and in Gordon, Salmond and Smith (1993) is:
So that the results are consistent with their respective papers, do you think it's okay to have two functions to simulate from almost the same model?
This will be quite a milestone -- an example application that couldn't have been implemented with the library we had at the start of the summer.
This certainly seems like a good thing to add, lots of people are using this type of algorithm at the moment and showing that it can be done easily seems like a good idea.
As you've already implemented it, my feeling is that it makes sense to submit the code you have rather than describing it in detail at this stage (unless you think there's anything that won't be clear from the code itself, of course).
The different models are an irritation, but these things happen over time. I don't see a need for two functions though; I'd just add a "cosine sequence offset" parameter with a default value of -1 and add that offset to n in the 8cos(1.2n) term, then one function can simulate data consistent with either of these models (or any others people have inadvertently introduced by using slightly different indexing...).