Correlate two data sets

12 Ansichten (letzte 30 Tage)
J Singh
J Singh am 31 Jul. 2018
Bearbeitet: jonas am 31 Jul. 2018
I've two sets of data, which I would like to correlate. The number of elements in both the data sets are different and have different respective dates. What would be the best way to do this?
  2 Kommentare
KALYAN ACHARJYA
KALYAN ACHARJYA am 31 Jul. 2018
You can try to by considering all dates, in both data sets by color variation in the value of both datasets
J Singh
J Singh am 31 Jul. 2018
I've a lot of different data sets and wanted to get a coefficient of correlation between each set. The above is just an example of the issue that I am facing.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

jonas
jonas am 31 Jul. 2018
Obviously there is a linear increase over time in the longer vector. You can simply interpolate the values in the longer vector to match the exact dates of the shorter vector and then check the correlation by corr.
  2 Kommentare
J Singh
J Singh am 31 Jul. 2018
The actual data (which is a lot larger) is not very linear. Is there any other way you can propose.
jonas
jonas am 31 Jul. 2018
Bearbeitet: jonas am 31 Jul. 2018
From what I know, correlation is calculated pair-wise, so without somehow pairing the samples I don't know how you can calculate a correlation coefficient.
You may be interested in cross-correlation though ( link )

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by