Automated shifting correlation test

In summary, Austin wants to test correlation between two data sets, but is having trouble finding an R/SAS function for the task. He finds a guide online that helps him get started.
  • #1
austinboston
2
0
Hello everyone I'm new here:

So I was about to write some SAS or R to do the following, but now I'm getting old enough to realize most things I think of were thought of before (usually by people way smarter than me). I've done some googling, but I haven't found the golden answer yet.

I'd like to test correlation between two data sets but I want to test a ton of "shifts" between the two sets. I want to automatically play with the lead and lag of the two sets and look at some sort of clever graphical representation of the relationships.

If anyone out there can point me to some R/SAS functions that is great, but even better would be the 10,000 foot guide of the basics for this type of question. The high level type guidance is usually what I have trouble googling up, instead I usually get too specialized information.

Thanks,
Austin
 
Physics news on Phys.org
  • #2
austinboston said:
Hello everyone I'm new here:

So I was about to write some SAS or R to do the following, but now I'm getting old enough to realize most things I think of were thought of before (usually by people way smarter than me). I've done some googling, but I haven't found the golden answer yet.

I'd like to test correlation between two data sets but I want to test a ton of "shifts" between the two sets. I want to automatically play with the lead and lag of the two sets and look at some sort of clever graphical representation of the relationships.

If anyone out there can point me to some R/SAS functions that is great, but even better would be the 10,000 foot guide of the basics for this type of question. The high level type guidance is usually what I have trouble googling up, instead I usually get too specialized information.

Thanks,
Austin

Hi Austin,

Yeah, you're right, I think most of us have been in the situation "Oh! My God! I just invented the wheel!" :smile:

What you describe is called cross correlations in time series and the function for this in R is named ccf

About the guide, just search for 'cross correlation time series' and you will find tons.

PS: Just guessing, but If you intend you get rich with this in the stock market just save your money and thank me later :tongue:
 
  • #3
viraltux said:
Hi Austin,

Yeah, you're right, I think most of us have been in the situation "Oh! My God! I just invented the wheel!" :smile:

What you describe is called cross correlations in time series and the function for this in R is named ccf

About the guide, just search for 'cross correlation time series' and you will find tons.

PS: Just guessing, but If you intend you get rich with this in the stock market just save your money and thank me later :tongue:

That was what I needed, thanks. I had some fun playing with sin & cos cross correlation in R to get my feet wet. Ha, this idea did come to me while in a conversation about the stock market, but I think I have a problem at work I can use this for as well. Thanks again.
 

1. What is an Automated Shifting Correlation Test?

An Automated Shifting Correlation Test is a statistical method used to analyze the relationship between two variables, typically in a time series format. It involves shifting one of the variables over time and calculating the correlation coefficient between the two variables at each shift. This allows for the detection of any potential lagged relationships between the variables.

2. How is an Automated Shifting Correlation Test performed?

To perform an Automated Shifting Correlation Test, the researcher must first choose the two variables of interest and determine the time period over which the analysis will be conducted. Then, one of the variables is shifted over time, usually in increments of one time unit, and the correlation coefficient is calculated at each shift. The results are then plotted on a graph to visualize the relationship between the variables over time.

3. What are the advantages of using an Automated Shifting Correlation Test?

One advantage of using an Automated Shifting Correlation Test is that it allows for the detection of lagged relationships between variables, which may not be apparent when using traditional correlation methods. It also provides a visual representation of the relationship between the variables over time, which can aid in understanding any patterns or trends.

4. When is an Automated Shifting Correlation Test useful?

An Automated Shifting Correlation Test is useful in situations where there may be a time delay or lag between two variables. It can also be helpful in identifying any cyclical or recurring patterns between the variables over time. This method is commonly used in fields such as economics, finance, and environmental science.

5. Are there any limitations to using an Automated Shifting Correlation Test?

Like any statistical method, an Automated Shifting Correlation Test has its limitations. It assumes a linear relationship between the variables and may not capture more complex nonlinear relationships. It is also important to note that correlation does not imply causation, so further analysis is needed to determine the true nature of the relationship between the variables.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
5K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
21
Views
3K
  • Mechanical Engineering
Replies
0
Views
401
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Quantum Interpretations and Foundations
2
Replies
54
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
Replies
5
Views
1K
Back
Top