1
有没有什么办法可以在cross filter reductio插件中实现标准错误。我会集中趋势的措施,所有的值除了{SE}使用Crossfilter reductio插件进行标准误差计算?
任何帮助appriaticated ..
var CFX = crossfilter([
\t \t { foo: 'one', bar: 1 },
\t \t { foo: 'two', bar: 2 },
\t \t { foo: 'three', bar: 3 },
\t \t { foo: 'one', bar: 4 },
\t \t { foo: 'one', bar: 5 },
\t \t { foo: 'two', bar: 6 },
\t \t ]);
var fooDim = CFX.dimension(function(k){ return k.foo; });
var fooGrp = fooDim.group();
var stdDeviation = reductio()
\t \t \t .sumOfSq(function(d) { return d.bar; })
\t \t \t .sum(function(d) { return d.bar; })
\t \t \t .avg(true)
\t \t \t .count(true)
\t \t \t .std(true)
\t \t \t // How to implement Standard error
stdDeviation(fooGrp);
console.log('Standard Deviation:-',JSON.stringify(fooGrp.top(Infinity)));
<script src="https://cdn.rawgit.com/crossfilter/reductio/0.5.4/reductio.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.12/crossfilter.min.js"></script>