Skip to content

Instantly share code, notes, and snippets.

@mobeets
Last active August 29, 2015 14:07
Show Gist options
  • Save mobeets/8463efed64ecd9e98b6b to your computer and use it in GitHub Desktop.
Save mobeets/8463efed64ecd9e98b6b to your computer and use it in GitHub Desktop.
Using Gibbs to fit state-space model with point process observations

Paper: Markov Chain Monte Carlo Methods for State-Space Models with Point Process Observations

Model

  • P(Y_k | X_k, mu, beta) ~ Poisson(lambda_k)
  • lambda_k = exp(mu + beta*X_k)
  • x_k = px_{k-1} + alphaI_k + e_k

where e_k normally distributed with zero mean and known variance; also, I, alpha, and beta are known.

Gibbs steps

Parameters to fit: X, p, mu, alpha

  • X | Y, p, mu, alpha = FFBS (?)
  • (p, alpha) | Y, X, mu = lin reg
  • lambda | Y, X, p, alpha ≈ P(Y | lambda)*P(lambda)
  • mu | Y, X, p, alpha = ?

Conditionals

[lambda | ...]

Choose P(lambda) as Gamma, the conjugate prior of Poisson.

Given gamma prior on lambda, and poisson likelihood, P(lambda | Y) ≈ P(Y | lambda)*P(lambda) = gamma.

This means I can draw a full lambda given Y by drawing from this lambda I think?

[mu | lambda, ...]

log(lambda_k) = mu + betaX_k => mu = log(lambda_k) - betaX_k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment