for $t=1$ to $T$ by repeating –.

Note that the random variables $u$ appearing in the extended target of the PMH algorithm correspond to all the random variables generated by the APF, i.e. all the particles and ancestor indices, $$\begin{aligned}
  % u= (\{x\pIdx{i}_{0}\}_{i=1}^N, \{x\pIdx{i}_{t}, a\pIdx{i}_{t}\}_{i=1}^N, t = 1,\,\dots,\,T ). \\
  u= \bigg( \Big\{x\pIdx{i}_{t}, a\pIdx{i}_{t} \Big\}_{i=1}^N, t = 1,\,\dots,\,T \bigg).\end{aligned}$$ In this article, we make use of two important special cases of the APF: the bootstrap particle filter (bPF) [@GordonSalmondSmith1993] and the fully adapted particle filter (faPF) [@PittShephard1999]. For the bPF, we select the proposal kernel $R_{\theta}(x_t|x_{1:t-1},y_t) = f_{\theta}(x_t|x_{t-1})$ and the auxiliary weights $\nu_t = w_t = g_{\theta}(y_t|x_t)$. The faPF is obtained by $R_{\theta}(x_t|x_{1:t-1},y_t) = p_{\theta}(x_t|y_t,x_{t-1})$ and $\nu_t = p_{\theta}(y_{t+1}|x_t)$, resulting in the weights $w_t \equiv 1$. Note, that the faPF can only be used in models for which these quantities are available in closed-form.

Estimation of the likelihood
----------------------------

The likelihood for the SSM in can be estimated using by inserting estimated one-step predictors $p_{\theta}(y_t|y_{1:t-1})$ obtained from the APF. The resulting likelihood estimator is given by $$\begin{aligned}
    \widehat{p}_{\theta}( \mathbf{y} | u ) 
    = \frac{1}{N^T} \sum_{i=1}^N w_{T}\pIdx{i}  \left\{ \prod_{t=1}^{T-1}
        \sum_{i=1}^N \nu_{t}\pIdx{i} \right\}.
    \label{eq:EstLikelihood}\end{aligned}$$ It is known that this likelihood estimator is 