Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Computing Cross-correlation for non-linear associations

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 01-30-2018 12:14 PM
(1692 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Post sample data and what you expect as output.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Sample data added.

Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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 ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.