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

consider changing sig.test parameter #7

Open
vsimko opened this issue Nov 17, 2015 · 0 comments
Open

consider changing sig.test parameter #7

vsimko opened this issue Nov 17, 2015 · 0 comments

Comments

@vsimko
Copy link
Contributor

vsimko commented Nov 17, 2015

At the moment, the functions wt.sig, pwtc, wtc, xwt, wt use sig.test parameter.
The significance test is actually implemented inside wt.sig and the other functions only redirect the parameter at some point in their code.

There are three possible values for the sig.test parameter:

  • 0 = regular chi^2 test
  • 1 = time-average test
  • 2 = scale-average test

Then, inside wt.sig, there is a switch (originally if..elseif..else) that computes the significance depending on the parameter. The switch in R is faster than if..elseif..else and it can either use numeric index as a parameter (indexed from 1) or a string value. The problem with numeric indexes is that there is no "default" value possible inside the switch.

It seems to me that it would be beneficial to change the numeric values 0,1,2 into string values such as "regular", "time", "scale" or similar. This would also make the code more understandable.

It would, however, break the current API.
But maybe just upgrading the version solves the problem.

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