Correlate two data sets

15 visualizzazioni (ultimi 30 giorni)
J Singh
J Singh il 31 Lug 2018
Modificato: jonas il 31 Lug 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 Commenti
KALYAN ACHARJYA
KALYAN ACHARJYA il 31 Lug 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 il 31 Lug 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.

Accedi per commentare.

Risposte (1)

jonas
jonas il 31 Lug 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 Commenti
J Singh
J Singh il 31 Lug 2018
The actual data (which is a lot larger) is not very linear. Is there any other way you can propose.
jonas
jonas il 31 Lug 2018
Modificato: jonas il 31 Lug 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 )

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by