-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow and Provide Different Estimators for Autocovariance #774
Comments
It would indeed make sense to support some simple variants like we do for covariance. The more complex variants could be supported via custom |
In MCMCChains/MCMCDiagnosticTools, we use a bit special setup, due to our application and for performance reasons, so I'm not completely sure how generally useful it is. The implementation there, and some of the algorithms, are based on Stan and https://arxiv.org/pdf/1903.08008.pdf. The We only use the initial positive sequence estimator, which also implies that generally we only need a few lags. Hence, in contrast to what is reported in literature and done in Stan, the FFT method usually is not the most performant alternative. This is also consistent with the observation in MCMCDiagnostics, and one additional reason for why it's not the default method (another one is that it requires loading additional packages). As suggested by Geyer we also don't use denominators of |
The variogram estimator always uses a denominator of |
As said, in the literature the use of |
Not sure what you want to say unfortunately. We implement exactly the version from BDA. |
I'm saying that the version from BDA uses |
Sure, but that's what's implemented in MCMCDiagnosticTools. I don't understand where the problem is. |
Stan uses the FFT approach, so any other comparison will be flawed. |
As mentioned in #273, there are many possible estimators or calculations for the autocovariance function. For example, the autocovariance can be estimated using:
n
(orn-1
with Bessel's correction) for all lags and the naive algorithmn-k
(orn-k-1
with Bessel's correction) for all lagsk
and the naive algorithmO(n*log(n))
time. (I will defer to @devmotion on this, as he implemented this in MCMCChains and knows more about it than me.)k
whereγ[k] + γ[k+1] < 0
, then setsγ[k]=0
for all largerk
values. (The idea being that negative autocovariance is rare, so negative values reflect noise; observing a negative value implies the noise is greater than the signal.)I think the complexity of autocovariance estimation warrants allowing different estimators for autocovariance (like we do for the covariance) and also providing at least a couple of these.
The text was updated successfully, but these errors were encountered: