Differencing Functionality - #1
Open
BirgenH wants to merge 4 commits into
Open
Conversation
added 4 commits
January 16, 2017 17:31
…encing of values after the stat has been applied. This is useful for time series to avoid spurious correlations.
This commit merely deletes 2 lines of comments that were used in previous tests.
Owner
|
Hi Birgen, Very sorry to take so long to get back to you, it's been a very busy year! This point about detrending is a very important one and I think your code will be really useful. I'll take some time to check through the code and check for any conflicts. Thanks so much for taking the time to look through the code. If you have any other ideas or suggestions, please don't hesitate to let us know. Cheers, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dear Liam and Martijn,
In light of my own research using your package, I have introduced a small added extra functionality. I introduced the parameter cw_diff (I didn't call it 'diff', because I prefer to not use parameter names that are names of functions of R), which enables to apply differencing on the time series (applied on both the response variable and the dependent variable). As you know, when working with time series, spurious correlations can often occur due to trend alone. If trends are present in the response variable, the package will also often return P(c) values that indicate that the found time window correlation is likely not to be a false positive, when it is very likely to be a false positive due to trend alone. Off course, this is something the user can or should have accounted for by detrending his data already or including a Time variable in his/her baseline model. However, introducing the option in the package to perform detrending on the data, I believe gives the package an additional strength. As such, I have made this pull request, so you can consider to include it in future versions.
To the best of my knowledge, the introduced code doesn't seem to interfere with any of the other functionality. However, although I have gotten somewhat familiar with the package's code, I off course do not master everything of it. As the introduced code is limited however, I think you might be able to judge rather quickly whether or not it might interfere with any of its other functionality.
best regards,
Birgen Haest