unbiased for any number of particles, see e.g. [@PittSilvaGiordaniKohn2012] and Proposition 7.4.1 in [@DelMoral2004]. As discussed in Section \[sec:PMH\], this is exactly the property that is needed in order to obtain $p(\theta | \mathbf{y})$ as the unique stationary distribution for the Markov chain generated by the PMH algorithm.

Consequently, PMH will target the correct distribution for any number of particles $N\geq 1$. However, the variance in the likelihood estimate is connected with the acceptance rate and the mixing of the Markov chain. Therefore it is important to determine the number of particles that balances a reasonable acceptance rate with a reasonable computational cost. This problem is studied for PMH0 in @PittSilvaGiordaniKohn2012 [@DoucetPittKohn2012].

Estimation of the gradient
--------------------------

As we shall see below, the gradient of the log-posterior can be estimated by solving a smoothing problem. The APF can be used directly to address this problem, since the particles $\{x_{1:T}^{(i)}, w_T^{(i)}\}_{i=1}^N$ provide an approximation of the JSD at time $T$ according to (see also @PoyiadjisDoucetSingh2011). However, this method can give estimates with high variance due to *particle degeneracy*.

Instead, we make use of the FL smoother [@KitagawaSato2001] which has the same linear computational cost, but smaller problems with *particle degeneracy* than 