BookmarkSubscribeRSS Feed
Obsidian | Level 7

Computing Cross-correlation for non-linear associations

Hello,

I have a problem that has several dimensions and would like to get to know possible solutions/approaches to solving the problem. I have some experience in using SAS procedures but when it comes to macros, I am pretty much a amateur.

1. I have around 10 pairs of variables (each variable has ~30 datapoints) for which I need to compute non-linear correlation (likely quadratic  or monotonic) for each pair.

2. In addition, I need to compute/assess if any non-linear cross-correlation exists for the pairs. The CROSSCORR functionality allows for, if my understanding is correct, computation of linear association with lags.

3. The variables/data being studied are temporal in nature. Any serial correlation is compensated for and the non-linear correlation is between the residuals (post serial correlation removal).

I am looking for a solution that:

1. computes cross-correlation to assess non-linear relationship, if such a thing even exists. Absent that, would regression work in such a scenario, with the R-squared being used in lieu of a correlation/cross-correlation measure?

2. is scalable (I have 30 entities for each of which I need to compute the cross-correlation for 10 pairs of 30 datapoints each).

I hope I have provided as much information as ipossible. If there's any more information required, I am happy to provide.

Thanks in advance.

Addendum: Have added sample data and the expected output. Hope that helps. The attached spreadsheet has 2 tabs: 1 for data and the other for the computed cross-correlation (based on linear association). The cross-correlation was computed using PROC ARIMA. The expectation now is to compute non-linear cross-correlation (monotonic/quadratic), if such a thing is possible.

7 REPLIES 7
Super User

Re: Computing Cross-correlation for non-linear associations

Post sample data and what you expect as output.

Obsidian | Level 7

Re: Computing Cross-correlation for non-linear associations

Sample data added.

Thanks!

Super User

Re: Computing Cross-correlation for non-linear associations

Do you have a SAS ETS license? If so, I think PROC TIMESERIES will do this for you automatically.

http://documentation.sas.com/?docsetId=etsug&docsetTarget=etsug_timeseries_syntax06.htm&docsetVersio...

Obsidian | Level 7

Re: Computing Cross-correlation for non-linear associations

I am using the Online SAS version for academics, which I believe does provide access to ETS procedures.Having said that, could the cross-correlation computation be rigged to say, compute cross-correlations assuming a monotonic relationship between X and Y based on Spearman's Rho? Or am I understanding this incorrectly ?
Super User

Re: Computing Cross-correlation for non-linear associations

TBH I don't understand what that means, but the link above includes what it can calculate for cross correlation, if its not in there then you're likely stuck with writing a custom calculation.

Obsidian | Level 7

Re: Computing Cross-correlation for non-linear associations

Thanks @Reeza. It does seem like probably I may have to do custom calculations/macro programming.

Super User

Re: Computing Cross-correlation for non-linear associations

I've moved your post to the Stat's forum and perhaps @Rick_SAS can assist when he has some time 🙂

Discussion stats
• 7 replies
• 1693 views
• 0 likes
• 2 in conversation