Function for inference with multilevel state-space model

Share:

Description

Particle filtering with sample-resample-move algorithm for multilevel state-space model of Blocker & Airoldi (2011). This has log-normal autoregressive dynamics on OD intensities, log-normal emission distributions, and truncated normal observation densities. This can return full (all particles) output, but it is typically better to aggregate results as you go to reduce memory consumption. It can also run forward or backward filtering for smoothing. These results are combined via a separate function for smoothing; however, this procedure typically performs poorly due to differences between the distributions of particles from forward and reverse filtering.

Usage

1
2
3
4
bayesianDynamicFilter(Y, A, prior, lambda0, sigma0, phi0, rho = 0.1,
  tau = 2, m = 1000, verbose = FALSE, Xdraws = 5 * m, Xburnin = m,
  Movedraws = 10, nThresh = 10, aggregate = FALSE, backward = FALSE,
  tStart = 1)

Arguments

Y

matrix (n x l) of observed link loads over time, one observation per row

A

routing matrix (l x k) for network; must be of full row rank

prior

list containing priors for lambda and phi; must have

  • mu, a matrix (n x k) containing the prior means for the log-change in each lambda at each time

  • sigma, a matrix (n x k) containing the prior standard deviations for the log-change in each lambda at each time

  • a list phi, containing the numeric prior df and a numeric vector scale of length n

lambda0

numeric vector (length k) of time 0 prior means for OD flows

sigma0

numeric vector (length k) of time 0 prior standard deviations for OD flows

phi0

numeric starting value for phi at time 0

rho

numeric fixed autoregressive parameter for dynamics on lambda; see reference for details

tau

numeric fixed power parameter for variance structure on truncated normal noise; see reference for details

m

integer number of particles to use

verbose

logical activates verbose diagnostic output

Xdraws

integer number of draws to perform for xsample RDA

Xburnin

integer number of burnin draws to discard for xsample proposals RDA in addition to baseline number of draws

Movedraws

integer number of iterations to run for each move step

nThresh

numeric effective number of independent particles below which redraw will be performed

aggregate

logical to activate aggregation of MCMC results; highly

backward

logical to activate reverse filtering (for smoothing

tStart

integer time index to begin iterations from

Value

list containing:

  • xList

  • lambdaList

  • phiList

  • y

  • rho

  • prior

  • n

  • l

  • k

  • A

  • A_qr

  • A1

  • A1_inv

  • A2

  • nEff

  • tStart

  • backward

  • aggregate

References

A.W. Blocker and E.M. Airoldi. Deconvolution of mixing time series on a graph. Proceedings of the Twenty-Seventh Conference Annual Conference on Uncertainty in Artificial Intelligence (UAI-11) 51-60, 2011.

See Also

Other bayesianDynamicModel: buildPrior; move_step

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.