Learn R Programming

networkTomography (version 0.3)

buildPrior: Construct prior from calibration model estimates

Description

Builds prior from appropriately structured output of the calibration model from Blocker & Airoldi (2011). Handles all formatting so result can be fed directly to bayesianDynamicFilter.

Usage

buildPrior(xHat, varHat, phiHat, Y, A, rho = 0.9, phiPriorDf = ncol(A)/2, backward = FALSE, lambdaMin = 1, ipfp.maxit = 1e+06, ipfp.tol = 1e-06)

Arguments

xHat
matrix (n x k) of estimates for OD flows from calibration model, one time point per row
varHat
matrix (n x k) of estimated variances for OD flows from calibration, one time point per row
phiHat
numeric vector (length n) of estimates for phi from calibration model
Y
matrix (n x l) of observed link loads, one time point per row
A
routing matrix (l x k) for network; must be of full row rank
phiPriorDf
numeric prior convolution parameter for independent inverse-gamma priors on phi_t
rho
numeric fixed autoregressive parameter for dynamics on lambda; see reference for details
backward
logical to activate construction of reversed prior (for smoothing applications)
lambdaMin
numeric value at which to floor estimated OD flows for prior construction
ipfp.maxit
integer maximum number of iterations for IPFP
ipfp.tol
numeric tolerance for convergence of IPFP iterations

Value

list containing priors for lambda and phi, consisting of:
  • 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

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: bayesianDynamicFilter; move_step