Call R from JAVA to get Chi-squared statistic and p-value

前端 未结 6 815
滥情空心
滥情空心 2020-12-19 23:49

I have two 4*4 matrices in JAVA, where one matrix holds observed counts and the other expected counts.

I need an automated way to calculate the p-value from the chi

6条回答
  •  囚心锁ツ
    2020-12-20 00:39

    I recommend to simply use a Java library that does a ChiSquare test for you. There are enough of them:

    • Apache commons math: http://commons.apache.org/proper/commons-math/
    • JSC: http://www.jsc.nildram.co.uk/
    • JDistlib: http://jdistlib.sourceforge.net/

    This is not a complete list, but what I found in 5 minutes searching.

提交回复
热议问题