I am encountering an error in the “Linear Correlation” Node. When I compare two variables and try to get the p-value with this node, I am getting “0.0” as p-value which is not correct because I am getting positive correlation value. So, the p-value should not be zero. This is happening for few of my input files with similar data. However, I tested the same files with other tools like Excel and I am getting right p-values for them and not zero. So could you please help me with this?
Hi @Shivahari and welcome to the forum.
Is it possible that you have a very low p-value which is close to, but not actually zero?
Take this example of two sets of almost perfectly correlated values (n=10). If the renderer in KNIME is set to “standard double”, I will see a p-value of zero:
But if I then change the renderer to full precision I will see a very small non-zero p-value:
If this doesn’t solve your issue, please post a small sample dataset that recreates the problem.
The issue is still not resolved. I have included an Excel file for your reference “[KNIME Error.xlsx|”. In that file, I have added two table: “Error in KNIME” and “No Error in KNIME” that includes the sample data where I face error for one tab and no error for another tab while using the “Linear Correlation” node in KNIME.
Please help me on this!
Shivahari KNIME Error.xlsx (149.2 KB)
I took your data and calculated the the coefficient and p-value in both Excel and KNIME. I get identical results in both cases, so I’m not sure why you’re seeing a difference. In particular, I get a p-value of 0.0 in both Excel and KNIME for the second data set.
In that case, in my manual Excel calculation, I have:
correlation coefficient = 0.730917
n = 3000
t-statistic = 58.6411
df = 2998
p-value = 0
So in any case, I can’t reproduce the problem.
The scatter plots seems to be consistent with the interpretation, too. Higher x values are correlated with higher y values, and we can be fairly certain of that:
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.