[WIP] Implement growth assessment using WHO indicators #80
@ -17,7 +17,7 @@ defmodule Growth.Calc.Centile do
|
||||
...> [-1.2, -1.6318, 16.049, 0.10038]
|
||||
...> ]
|
||||
iex> Enum.map(measures, &apply(Growth.Calc.Centile, :compute, &1))
|
||||
[:na, :na, 19.0]
|
||||
[13.05127032828574, 27.884359024082663, 14.37765739914362]
|
||||
|
||||
"""
|
||||
|
||||
@ -32,7 +32,7 @@ defmodule Growth.Calc.Centile do
|
||||
## Examples:
|
||||
|
||||
iex> Growth.Calc.Centile.compute(0.0, -1.6318, 16.049, 0.10038)
|
||||
19.0
|
||||
16.049
|
||||
|
||||
"""
|
||||
def compute(z_score, l, m, s) when -3 <= z_score and z_score <= 3 do
|
||||
|
@ -7,7 +7,7 @@ defmodule Growth.Calc.Percentile do
|
||||
## Examples
|
||||
|
||||
iex> z_scores = [-1.0, 0.0, 1.0]
|
||||
iex> Enum.map(z_scores, &apply(Growth.Calc.Percentile, :compute, :&1))
|
||||
iex> Enum.map(z_scores, &apply(Growth.Calc.Percentile, :compute, [&1]))
|
||||
[0.15865525393145707, 0.5, 0.8413447460685429]
|
||||
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user