Implementing Quasi-Bayes with adaptive covariance estimation

What is the best way to handle adaptive input in the log-likelihood specification?

I am working on a Quasi-Bayesian/Laplace-type approach to Generalized Method of Moments estimation. The basic idea is to substitute the likelihood in an MCMC procedure with a quasi-likelihood that is motivated by the CLT on the moments of a given model.

Consider a moment function m(\theta) with parameter \theta. One would specify a “quasi-likelihood” with average moments \bar{m} and weighting matrix W as

p(D|\theta) \sim exp( \bar{m}^T W \bar{m} ).

and estimate the “quasi-posterior” with a MCMC procedure.

In general, Stan is flexible enough to facilitate this approach. The only problem I have is that the weighting matrix W should be the inverse of a consistent covariance estimate of the moments at the true parameter. As this parameter is unknown, one usually relies on iterative procedures. One solution is to take a covariance estimator using the posterior mean of the preceding chain.

I would like to know, if it is feasible in Stan to have access to the preceding chain for ‘online’ covariance estimation in the ‘transformed parameters’ block. My current work around is to run repeated models with rstan, each one using a weighting matrix W derived from the previous run.

This is the way you have to do it if you need to compute mean over several iterations.