ANOVA Error

Hi

I am new to KNIME and have a proble running one way ANOVA. I get the following error ERROR One-way ANOVA Execute failed: degrees of freedom (0) see stack below

Anyone get any ideas on this it would be greatly appreciated

Kind Regards

Philip

 

 

org.apache.commons.math3.exception.NotStrictlyPositiveException: degrees of freedom (0)
 at org.apache.commons.math3.distribution.FDistribution.<init>(FDistribution.java:94)
 at org.apache.commons.math3.distribution.FDistribution.<init>(FDistribution.java:68)
 at org.knime.base.node.stats.testing.levene.LeveneTestStatistics.getTTestCells(LeveneTestStatistics.java:239)
 at org.knime.base.node.stats.testing.anova.OneWayANOVANodeModel.execute(OneWayANOVANodeModel.java:120)
 at org.knime.core.node.NodeModel.execute(NodeModel.java:709)
 at org.knime.core.node.NodeModel.executeModel(NodeModel.java:556)
 at org.knime.core.node.Node.invokeNodeModelExecute(Node.java:1067)
 at org.knime.core.node.Node.execute(Node.java:922)
 at org.knime.core.node.workflow.SingleNodeContainer.performExecuteNode(SingleNodeContainer.java:1069)
 at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:98)
 at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:182)
 at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:113)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
 at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
 at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:238)

 

 

Hello, 

It may be easier to diagnose the problem if you provide an example workflow that fails with this exception. 

Regards, Aaron

Hi Aaron,

Thanks for coming back, I appreciate it as this one is baffling. Attached is an image along with

data screenshot and columns. I used a file reader and and the next node is One-way Anova

Any feedback would be much appreciated

Kind Regards

Philip

 

Your grouping and test columns are set to be the same vales, this will not work.  To get the result you are looking for, you will need a column containing some grouping information (ie. different treatment groups) and another (1 or more) numeric column(s) that you wish to use for the anova.  See the attached example comparing the pedal with's of two species of irises.

 

 

Hi Aaron,

Much appreciated for that, I have my grouping column as a string and my other columns as double. It still seems to fail with the same error. See attached screenshot

Kind Regards

Philip

 

 

If I am interpreting your table right, with the first col being the classes, and the rest being multiple observations of the same test.  Is that right?  If so, you will need to unpivot your table to make it more KNIME friendly.  Also be aware that our anova node will only work with two nominal values, so a nominal value row filter can be useful for quickly switching classes. 

Attached is an example, keep us posted on your progress.  

Regards,

Aaron Hart, KNIME.com

Really… Only two nominal values possible. If so, then it’s just an independent or paired t test.
You should be able to use unlimited classes for Anova, I think the problem with podonnells data set is that only one data column is selected meaning there are no degrees of freedom. There needs to be at least two data points per class. Surely just including the other double test columns will fix the problem.
Simon.

Of course you are right Simon, I am a bit brain dead; I was confusing this node with the TTest node. The example provided above works with any number of classes.

Aaron

Hi Aaron,

I am not sure this functionality can do I want it to do.

I can caluculate one way Anova of Sorts but for each column.

See the attached question and answer as well

Can I calculate this with the One Anova in Knime

Or should I try and get the mean for each row and then try calcualte

Which is to get one the ANOVA for one Factor Hardword Tensile Strenght with four different levels 5 10 15 20 and six different observations

Kind Regards

Philip

 

Hi Aaron,

I gave you wrong screen shot.

See attached

Kind Regards

Philip

 

Hi Philip, 

Ok, it was just a matter of unpivoting then.  Ditch the 3rd node from the original workflow. 

Aaron

Hi Aaron,

I am unsure how the unpivot functionality works can you give me a screenshot of how you configured. I appreciate your help

Kind Regards

Philip

 

Hi Aaron,

Thanks for all your help

I have worked it out.

Much appreciated

I am hooked

Philip

 

Hello,

I found myself in a very similar situation. I'll try to give as many details as possible:

I'm trying to compare the average victory percentage of different baseball teams. I need to find out whether they are significantly different or not.

My table is structured with the following columns:

Year | Team | % Victories

I have different percentages of victory divided by year and team. What I'm trying to do is to conduct the ANOVA test to discover if the average percentage of victory for each team is significantly different: in this phase of my work I'm trying to see if a big team, like the New York Yankees, who won many titles, shows a greater average for its victories, or if every team has a similar average, and the difference between capability of a team should be searched elsewhere.

I've tried to group by "Team" column and to include "% Victories" as column to test for, but what I get is the "degrees of freedom (0)" error.

I've also tried to use pivoting to split the table like this:

Year | % Victories Team 1 | % Victories Team 2 ...

then I used "Year" as grouping column and all the percentage columns in the include. Sligtly different error, as the degrees of freedom where not (0), but (-53).

What am I doing wrong?