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

Incorrect Wild bootstrap overall #53

Open
FinYang opened this issue Nov 25, 2023 · 1 comment
Open

Incorrect Wild bootstrap overall #53

FinYang opened this issue Nov 25, 2023 · 1 comment
Labels

Comments

@FinYang
Copy link

FinYang commented Nov 25, 2023

Wild bootstrap should have $\hat\epsilon_t\nu_t$ where $\hat\epsilon$ is the residuals and $\nu_t$ is randomly simulated from the chosen distribution. Right now the implementation in the package all uses $\hat\epsilon_t + \nu_t$. For example,

tsDyn/tsDyn/R/VAR.sim.R

Lines 190 to 194 in 15c8679

innov <- switch(boot.scheme,
"resample"= resids[sample(seq_len(t), replace=TRUE),],
"wild1"=resids+rnorm(t),
"wild2"=resids+sample(c(-1,1), size = t, replace=TRUE),
"check"= resids)

@MatthieuStigler
Copy link
Owner

thanks, I think you spotted a mistake indeed. It has been a while so I can't remember if I had followed a paper suggesting this, or whether that was a blunt mistake of mine, but looking at a few papers right now, it seems indeed multiplying as you suggest is the right approach.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants