with respect to $\phi$ in the LGSS model with $\sigma_e=0.1$ (left) and $\sigma_e=1$ (right). The bPF (black) and faPF (red) are evaluated by $1 \thinspace 000$ MC iterations using a fixed data set with $T=100$.[]{data-label="fig:score-lgss-n-paper"}](lgss-score-npart.pdf){width="\columnwidth"}

For this model, we can compute the true values of the log-likelihood and the gradient by running an RTS smoother [@RauchTungStriebel1965]. In Figure \[fig:score-lgss-n-paper\], we present boxplots of the $L_1$-errors in the estimated log-likelihood and the gradient of the log-posterior with respect to $\phi$, evaluated at the true parameters. When $\sigma_e=0.1$, we observe that the faPF has a large advantage over the bPF for all choices of $N$. When $\sigma_e=1.0$, we get smaller difference in the error of the gradient estimates, but the log-likelihood estimates are still better for the faPF. Similar results are also obtained for the gradient with respect to $\sigma_v$.

![The log $L_1$-error in the estimates of the gradient with respect to $\phi$ in the LGSS model with $\sigma_e=0.1$ (left) and $\sigma_e=1$ (right). The bPF (black) and faPF (red) are evaluated by $1 \thinspace 000$ Monte Carlo iterations using a fixed data set with $T=100$.[]{data-label="fig:score-lgss-lag-paper"}](lgss-score-lag.pdf){width="\columnwidth"}

In Figure \[fig:score-lgss-lag-paper\], we present the error in the gradient estimates with respect to $\phi$ using a 