Can Matlab do Weighted Spearman Rank Correlation?
조회 수: 2 (최근 30일)
이전 댓글 표시
Very new to Matlab and looking for help. I am trying to calculate a weighted Spearman rank correlation. I am currently using the built in function in the statistics tool to calculate the normal spearman rank correlation:
[rho, pval] = corr(x, y,'type','spearman','rows','pairwise');
Where x is a matrix and y is a vector. I also have another vector W which is the weight of each observation row. Does anyone know of another function or script that incorporates the weight?
The formula would be: rho = 6 * SUM[Wi(xi-yi)]^2 / n(n^2 - 1)
Thanks!
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Smoothing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!