fix(growth): typespec and doc for centile calc
This commit is contained in:
parent
4234b2e917
commit
c175c3edfd
@ -23,11 +23,13 @@ defmodule Growth.Calc.Centile do
|
|||||||
|
|
||||||
alias Growth.Calc.ZScore
|
alias Growth.Calc.ZScore
|
||||||
|
|
||||||
@spec compute(number(), number(), number(), number()) :: number()
|
@spec compute(number(), number(), number(), number()) :: number() | :na
|
||||||
@doc """
|
@doc """
|
||||||
Compute the centile for a given measurement (`y`) and the Box-Cox values: power (`l`), median (`m`), and
|
Compute the centile for a given measurement (`y`) and the Box-Cox values: power (`l`), median (`m`), and
|
||||||
coefficient of variation (`s`).
|
coefficient of variation (`s`).
|
||||||
|
|
||||||
|
Returns the centile based on the z-score when -3 <= z-score <= 3; otherwise, returns `:na.`
|
||||||
|
|
||||||
## Examples:
|
## Examples:
|
||||||
|
|
||||||
iex> Growth.Calc.Centile.compute(19, -1.6318, 16.049, 0.10038)
|
iex> Growth.Calc.Centile.compute(19, -1.6318, 16.049, 0.10038)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user