I have a dataset that collects daily data based on transactions between two entities. I wish to find the strength, direction, and kind of relationship between two continuous variables i.e. Number of transactions (No_of_transactions) and Error counts (Error_Counts) over the period of approximately two years. Error counts are of degree 10²-10⁵ and the number of transactions in 10¹-10³. I'm pretty sure the relationship is nonlinear because when I draw the scatterplot it is more towards inverse relationship (rightly so) and I believe a simple corr() function won't help much.

  • $\begingroup$ Maybe detrend the data and fit a VAR model? If you're feeling adventurous. $\endgroup$ May 29 '20 at 12:48
  • $\begingroup$ Does that help even the plot between the two shows scatter points all over the place. $\endgroup$ May 29 '20 at 22:48

You could look at the cross-correlation between the two series for different lags. In short, you would look at the values from one series and see how they correlate with previous (or lagged) values from the other series. Auto-correlation is a special case of cross-correlation where you correlate a series with itself (or its lagged values).

To capture non-linear relationships you could see if you can use one of the series to predict the other. You could phrase it as a forecasting problem and see if adding the other variable improves forecasting accuracy.

For more details, check out this chapter.

  • $\begingroup$ is there any guide on how to do that ? . Also how does the lag value tell me how strongly/weakly are two variables related? $\endgroup$ Jun 11 '20 at 23:10
  • $\begingroup$ I've added some more details, let me know if that helps. $\endgroup$
    – mloning
    Jun 12 '20 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.