How to choose matrices in an univariate dynamic probit model for online inference (Assumed Density Filter)

Goodmorning everyone,

I’m working with a specific state space model (Non Linear Non Gaussian) which is the univariate probit model (one binary observation at each time with a Gaussian latent process.

\theta_t = G\theta_{t-1} + \varepsilon_t, \qquad \varepsilon_t \sim \mathcal{N}(0, W) \\ y_t \sim \mathrm{Bernoulli}( \Phi( x_t^T θ_t ) ) \\ which \ is\quad p(y_t \mid \theta_t)=\Phi((2y_t-1)x_t^T \theta_t) \\ \theta_0 \sim \mathcal{N}(a_0,P_0)

I need to write a Python code to simulate data from this model. My problem is that I don’t know in general how to choose G, W and P0. a0 is set =0.

How could I do it? THANK YOU FOR EVERY ANSWER

P_0 you are free to chose, as it merely represents your prior uncertainty about the initial state of the system – usually a diagonal covariance (independent priors) is used unless you have some reason to think otherwise.

G and W are modeling choices and typically come from discretizing a white noise driven stochastic differential equation or dynamical system (see Ch 4 of http://users.aalto.fi/~ssarkka/pub/bfs_book_2023_online.pdf). The simplest form of these is typically a random walk.

Also, I think as you have stated it your problem is linear just not Gaussian.

1 Like

Thank you so much. Yes, you’re right, the state process is actually linear. Can I ask you if you know some packages on R that are capable of simulating data from a linear, non gaussian state space model ? My goal is to test an implementation of the Assumed Density Filter by applying it to synthetic data generated from such a model. I could also generate such a model with a simple function I think.. @js592

Being able to simulate synthetic data from a model is an important step on the way to fully understanding it, so I would encourage taking a shot at that.

Otherwise, from a quick look around there is some older documentation about some specific implementations in Stan here ( State Space Models in Stan ) – see also Ch 5 for reference to other R packages.

@js592 Thank you for your availability and advises. :)