[question] help on MCMCDyn1Step test #120
-
Hi @krivit, This code here. Do you have documentation or a paper I could go through to understand why this test works for this purpose? (I understand the code but lack the knowledge to see why it allows the decision to stop the sampling) Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I don't think it's written up anywhere. Each TERGM step requires (in principle) an independent draw from an ERGM. The problem is that how many proposals that takes depends on network size, model complexity, and other factors. The idea of the algorithm is that at the start of the time step, the current network will be identical to the initial network, and as MCMC sampling proceeds, it will diverge more and more. Thus, there will be a trend in the Hamming distance between them, or, equivalently a prevalence of +1 increments in it after each MCMC step over the -1 increments. Then, once it reaches an equilibrium, there should be about as many +1s as -1s. Also, while the increments are not, strictly speaking, uncorrelated (as they are negatively so), they are pretty close to uncorrelated, particularly for larger networks. The algorithm then keeps track of the weighted average of these increments, exponentially weighed by how long ago they happened, as well as of its variance, which it then uses to set up a statistic. Once it can no longer detect a trend (with a very high alpha) using a one-sample z-test for mean, it concludes that the sequence has converged. Now that I think about it, a better version might be using TOST or similar to reject the null hypothesis that it hasn't. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for this detailed explanation. It makes total sense. I am playing with a bare bone implementation of ERGMs / TERGMs in C (no R API dependencies) as way to teach myself more on these algorithms and C but was stuck in this part. |
Beta Was this translation helpful? Give feedback.
I don't think it's written up anywhere.
Each TERGM step requires (in principle) an independent draw from an ERGM. The problem is that how many proposals that takes depends on network size, model complexity, and other factors.
The idea of the algorithm is that at the start of the time step, the current network will be identical to the initial network, and as MCMC sampling proceeds, it will diverge more and more. Thus, there will be a trend in the Hamming distance between them, or, equivalently a prevalence of +1 increments in it after each MCMC step over the -1 increments.
Then, once it reaches an equilibrium, there should be about as many +1s as -1s. Also, while the increments are not, st…