Skip to content
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

Use block bootstrap for residual autocorrelation #4

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

ncooder
Copy link
Contributor

@ncooder ncooder commented Jan 18, 2025

This PR replaces sample(res) in RSTRmodel with a block bootstrap. This helps to preserve the autocorrelation in residuals, since the current random shuffling destroys the time-series correlations. The block_bootstrap uses the optimal block length $n^{1/3}$ and maintains the same output format as previously.

Copy link
Owner

@robjhyndman robjhyndman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. But please move block_bootstrap code to avoid breaking the roxygen documentation for RSTRmodel.

@ncooder
Copy link
Contributor Author

ncooder commented Jan 19, 2025

@robjhyndman The block_bootstrap has been moved.

@robjhyndman robjhyndman merged commit 2061a50 into robjhyndman:master Jan 20, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants