Likelihood function in the scan function (AR2 model)

You want to model something like a discrete jump diffusion process? A statespace where one latent variable has poisson innovations and the other is normal?