Predictions after SMC I have a statistical model given by
$$
y_t\sim p(y_t|x_t, \theta)\\
x_t\sim p(x_t|x_{t-1},\theta)\\
\theta\sim p(\theta)
$$
where $y$ is the only observed component. Using a sequential Monte Carlo algorithm, I can obtain
$$
\{x_{1:T}^i, \, W_T^i\}_{i=1}^N,
$$
where the target density of the SMC algorithm is $p(x_{1:T}|y_{1:T})$ (i.e. without $\theta$).
My question is: if I want draws from the predictive distribution $p(y_{T+1:T+h}|y_{1:T})$, would the following procedure be correct:


*

*Resample $x_{1:T}^i$ using multinomial sampling with probabilities $\propto W_T^i$ to obtain $\tilde{x}_{1:T}^i$

*For each $i=1, \dots, N$, generate $\theta^i \sim p(\theta|\tilde{x}_{1:T}^i, y_{1:T})$

*Generate the predictions $y_{T+1:T+h}^i\sim p(y_{T+1:T+h}|y_{1:T},\tilde{x}_{1:T}^i, \theta^i)$
The resulting array $\{y_{T+1:T+h}^i\}_{i=1}^N$ would then represent a draw from
$$
p(y_{T+1:T+h}|x_{1:T}, y_{1:T}, \theta)p(\theta|x_{1:T}, y_{1:T})p(x_{1:T}|y_{1:T})
$$
so I think it checks out. My main concern is the initial resampling, but I feel that would be necessary in order to get rid of the unequal weights. Is this the appropriate way to do it? Any other ways that might be better (in some respect)?
 A: Yes, this would be correct. One justification would be the following. Let $\hat{Z}_T$ be the standard estimator of $p(y_{1:T})$ which is generated by the particle filter. Then, the set $\left( \{x_{1:T}^i, \, W_T^i\}_{i=1}^N, \hat{Z}_T \right)$ is "properly-weighted" for $p(x_{1:T}|y_{1:T})$ in the following sense: Let $\textbf{PF}(\{x_{1:T}^i, \, W_T^i\}_{i=1}^N)$ be the joint law of your particle system at time $T$. Proper weighting is the statement that for all sufficiently nice functions $g$, it holds that
\begin{align}
\mathbf{E} \left[ \hat{Z}_T \cdot \sum_{i = 1}^N W_T^i \, g (x_{1:T}^i) \right] = p(y_{1:T}) \cdot \int p(x_{1:T} | y_{1:T} ) \, g(x_{1:T}) dx_{1:T}.
\end{align}
Proving the correctness of your approach could be established by writing down the joint distribution of your predictive scheme as
\begin{align}
\Pi \left( \{x_{1:T}^i, \, W_T^i\}_{i=1}^N, k, \theta, y_{T+1:T+h} \right) &= \textbf{PF}(\{x_{1:T}^i, \, W_T^i\}_{i=1}^N) \\
&\cdot W_T^k \cdot p(\theta|x_{1:T}^k, y_{1:T}) \\
&\cdot p(y_{T+1:T+h}|x_{1:T}^k, y_{1:T}, \theta) 
\end{align}
where $k$ is the index of the "selected particle". You can then use the proper weighting formulation to check that, under the joint law of $\Pi$, it holds for any $G$ that
\begin{align}
&\mathbf{E}_\Pi \left[ \hat{Z}_T \cdot G (x_{1:T}^k, \theta, y_{T+1:T+h}) \right] \\
= \, &p(y_{1:T}) \cdot \int p(x_{1:T}, \theta, y_{T+1:T+h} | y_{1:T} ) \, G (x_{1:T}, \theta, y_{T+1:T+h}) \, dx_{1:T} d\theta dy_{T+1:T+h},
\end{align}
i.e. that your proposed method is properly-weighted and hence appropriate for prediction purposes.
