correlation coefficients for a matrix that includes NaNs
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Heidi Hirsh
am 20 Sep. 2019
Beantwortet: David Hill
am 20 Sep. 2019
I am trying to determine correlation coefficients and p values for different parameters of timeseries data. I have a matrix of five variables (each variable is a column and rows are times). I don't have data for every parameters at every timestamp so there are NaNs during the no value periods. Is there a function that will determine correlation coefficients for a dataset that includes NaNs? Right now I am using corrcoef and it gives me matrices for the pvalues and coefficients that are all 5 by 5 and filled with all NaNs. Any ideas?
Right now I am doing this: [R, P] = corrcoef(PK6mab) using the matrix in the mat file attached
0 Kommentare
Akzeptierte Antwort
David Hill
am 20 Sep. 2019
[R,P]=corrcoef(rmmissing(PK6mab));
If you can tolerate deleting the entire rows of any missed data.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Descriptive Statistics finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!