Initialise each particle $x_0\pIdx{i}$. Resample and propagate each particle using . Calculate the weights for each particle using . Compute $\widehat{p}_{\theta}(\mathbf{y})$ by . Compute $\widehat{\mathsf{S}}_T(\theta)$ and $\widehat{\mathsf{I}}_T(\theta)$ by and , respectively. Regularize $\widehat{\mathsf{I}}_T(\theta)$ by adding $\Delta\widehat{\mathsf{I}}_T$ computed by Replace $\widehat{\mathsf{I}}_T(\theta)$ by the inverse covariance matrix computed using the $L$ final samples of the Markov chain during the burn-in.

\[alg:SMCfull\]

Resulting SMC algorithm
-----------------------

In Algorithm \[alg:SMCfull\], we present the complete procedure that combines the APF with the FL smoother to compute the estimates needed for the PMH2 proposal . Note that the two different methods to handle non–PD estimates of the negative Hessian matrix results in the *standard* and *hybrid* PMH2 algorithm, respectively.

We end this section by briefly discussing the statistical properties of the estimates of the gradient and Hessian obtained from the FL smoother. From @OlssonCappeDoucMoulines2008, we know that the FL smoother gives biased estimates of the gradient and Hessian for any number of particles. Remember that this does not effect the invariance of the Markov chain (recall Section \[sec:PMH\]). The main advantage of the FL smoother over the APF (which gives a consistent estimate) is that the former enjoys a smaller variance than the APF, i.e. we 