Correlate two data sets

15 visualizaciones (últimos 30 días)
J Singh
J Singh el 31 de Jul. de 2018
Editada: jonas el 31 de Jul. de 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 comentarios
KALYAN ACHARJYA
KALYAN ACHARJYA el 31 de Jul. de 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 el 31 de Jul. de 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.

Iniciar sesión para comentar.

Respuestas (1)

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

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by