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

Issue adjusting minw #28

Closed
sebas-slau opened this issue May 20, 2024 · 1 comment
Closed

Issue adjusting minw #28

sebas-slau opened this issue May 20, 2024 · 1 comment

Comments

@sebas-slau
Copy link

Hi,

Thanks for developing this test - it is useful to my work and I'm still exploring it/ going thru the documentation.

However, I can't seem to adjust the minimum window parameter. Whether I specify a value higher or lower than the default, I get the same error message. In particular, the radf() function seems ok but not when I run the results e.g. diagnostics().

Grateful for any advice/help on this, pls.

# This works fine
# (minw=17 is the default given my sample size; I'm including it here just for illustration)
> radf_test <-radf(data, minw = 17)
Using `date` as index variable.
> diagnostics(radf_test)
Using `radf_crit` for `cv`.

── Diagnostics (option = gsadf) ───────────────── Monte Carlo ──

x1:   Rejects H0 at the 5% significance level
x2:   Cannot reject H0 
x3:   Rejects H0 at the 5% significance level
x4:   Rejects H0 at the 5% significance level

# Becomes problematic when I change minw
> radf_test <-radf(data, minw = 18)
Using `date` as index variable.
> diagnostics(radf_test)
Using `radf_crit` for `cv`.
Error: minimum window does not match

> radf_test <-radf(data, minw = 16)
Using `date` as index variable.
> diagnostics(radf_test)
Using `radf_crit` for `cv`.
Error: minimum window does not match
@sebas-slau
Copy link
Author

Silly me- I did not realise I'd have to adjust the other values consistently if I deviate from the default values at the start.

All good now!

# So this is not good:
> radf_test <-radf(data, minw = 18)
> summary(radf_test)                                                                                             
Using `radf_crit` for `cv`.
Error: minimum window does not match

# But this is fine:
> radf_test <-radf(data, minw = 18)
> radf_cv <- radf_mc_cv(n = nrow(data), minw = 18)     # probably good to create new variable
> summary(radf_test, cv = radf_cv)

Thanks again for developing this set of codes :)

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

No branches or pull requests

1 participant