Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add particle marginal Metropolis Hastings example #11

Closed
LeahPrice opened this issue Aug 2, 2017 · 1 comment
Closed

Add particle marginal Metropolis Hastings example #11

LeahPrice opened this issue Aug 2, 2017 · 1 comment

Comments

@LeahPrice
Copy link
Collaborator

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:
X_n = 0.5X_{n-1} + 25X_{n-1}/(1+X_{n-1}^2) + 8cos(1.2(n-1)) + V_n
and in Andrieu, Doucet and Holenstein (2010) it is:
X_n = 0.5X_{n-1} + 25X_{n-1}/(1+X_{n-1}^2) + 8cos(1.2n) + V_n

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?

@adamjohansen
Copy link
Collaborator

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...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants