Selection bias in clinical sciences: Difference between revisions

m
→‎{{header|Wren}}: Removed preamble following clarification in task description re Kruskal H test.
m (→‎{{header|Phix}}: added JW test explanation link for possible future reference)
m (→‎{{header|Wren}}: Removed preamble following clarification in task description re Kruskal H test.)
Line 466:
{{trans|Python}}
{{libheader|Wren-math}}
The task description specifies that the Kruskal statistic is to be used (presumably the Kruskal-Wallis H test) though, unlike Julia and Python, languages which are not normally used for statistical purposes are unlikely to have this easily available.
 
Using the Wikipedia description as a guide, I've written a function to calculate and return the H value and left it at that for now.
 
Also, it's not completely clear to me how this test can be applied to lists of boolean values (whether the subject got Covid or not). I've just converted them to numbers (false = 0, true = 1) and proceeded from there.
<syntaxhighlight lang="ecmascript">import "random" for Random
import "./math" for Nums
9,490

edits