qesuite 1.0.68 → 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -8090,11 +8090,15 @@ var NonparametricTesting = {
8090
8090
  let H = 12 * Sum(avgRanks.map((Rj, j) => {
8091
8091
  return data[j].length * Math.pow(Rj - avgOverallRank, 2);
8092
8092
  })) / (N * (N + 1));
8093
+ H = 12 / (N * (N + 1)) * Sum(ranks.map((r) => {
8094
+ return Math.pow(Sum(r), 2) / r.length;
8095
+ })) - 3 * (N + 1);
8093
8096
  let H_not = 0 + H;
8094
8097
  if (adjustH) {
8095
- H = 12 / (N * (N + 1)) * Sum(ranks.map((r) => {
8096
- return Math.pow(Sum(r), 2) / r.length;
8097
- })) - 3 * (N + 1);
8098
+ let T = 1 - 1 / (Math.pow(N, 3) - N) * Sum(tieSets.map((t) => {
8099
+ return Math.pow(t.length, 3) - t.length;
8100
+ }));
8101
+ H = H / T;
8098
8102
  }
8099
8103
  return {
8100
8104
  DescriptiveStatistics: data.map((group, i) => {
package/dist/index.mjs CHANGED
@@ -7964,11 +7964,15 @@ var NonparametricTesting = {
7964
7964
  let H = 12 * Sum(avgRanks.map((Rj, j) => {
7965
7965
  return data[j].length * Math.pow(Rj - avgOverallRank, 2);
7966
7966
  })) / (N * (N + 1));
7967
+ H = 12 / (N * (N + 1)) * Sum(ranks.map((r) => {
7968
+ return Math.pow(Sum(r), 2) / r.length;
7969
+ })) - 3 * (N + 1);
7967
7970
  let H_not = 0 + H;
7968
7971
  if (adjustH) {
7969
- H = 12 / (N * (N + 1)) * Sum(ranks.map((r) => {
7970
- return Math.pow(Sum(r), 2) / r.length;
7971
- })) - 3 * (N + 1);
7972
+ let T = 1 - 1 / (Math.pow(N, 3) - N) * Sum(tieSets.map((t) => {
7973
+ return Math.pow(t.length, 3) - t.length;
7974
+ }));
7975
+ H = H / T;
7972
7976
  }
7973
7977
  return {
7974
7978
  DescriptiveStatistics: data.map((group, i) => {
package/index.ts CHANGED
@@ -8493,12 +8493,13 @@ export const NonparametricTesting = {
8493
8493
 
8494
8494
  let tieSets = CompileTies(combinedData)
8495
8495
  let adjustH = tieSets.length > 0
8496
- let H = 12 * Sum(avgRanks.map((Rj, j) => {return data[j].length * Math.pow(Rj - avgOverallRank, 2)}))/(N *(N + 1));
8496
+ let H = 12 * Sum(avgRanks.map((Rj, j) => {return data[j].length * Math.pow(Rj - avgOverallRank, 2)}))/(N *(N + 1));
8497
+ H = (12 / (N * (N + 1))) * (Sum(ranks.map(r => {return Math.pow(Sum(r),2)/r.length}))) - 3 *(N + 1);
8497
8498
  let H_not = 0 + H;
8498
8499
 
8499
8500
  if(adjustH){
8500
- // H = H/(1 - Sum(tieSets.map((t: any) => {return Math.pow(t.length, 3) - t.length}))/(Math.pow(N,3) - N));
8501
- H = (12 / (N * (N + 1))) * (Sum(ranks.map(r => {return Math.pow(Sum(r),2)/r.length}))) - 3 *(N + 1);
8501
+ let T = 1 - 1 / (Math.pow(N, 3) - N) * Sum(tieSets.map(t => {return Math.pow(t.length, 3) - t.length}))
8502
+ H = H / T
8502
8503
  }
8503
8504
 
8504
8505
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qesuite",
3
- "version": "1.0.68",
3
+ "version": "1.0.69",
4
4
  "description": "Performs advanced statistical analysis of data. Specifically designed for engineering statistical analysis",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -0,0 +1 @@
1
+ Updated KruskalWallis Adjusted for Ties formula