NF: func to calc corrcoef for components and tests