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.
Post sample data and what you expect as output.
Sample data added.
Thanks!
Do you have a SAS ETS license? If so, I think PROC TIMESERIES will do this for you automatically.
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.
I've moved your post to the Stat's forum and perhaps @Rick_SAS can assist when he has some time 🙂
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.