The `daz()`

function calculated the Development-for-Age Z-score (DAZ).
The DAZ represents a child's D-score after adjusting for age by an
external age-conditional reference.

```
daz(d, x, reference_table = NULL, dec = 3, verbose = FALSE)
zad(z, x, reference_table = NULL, dec = 2, verbose = FALSE)
```

- d
Vector of D-scores

- x
Vector of ages (decimal age)

- reference_table
A

`data.frame`

with the LMS or BCT reference values. The default`NULL`

selects the default reference belonging to the`key`

, as specified in the`base_population`

field in`dscore::builtin_keys`

.- dec
The number of decimals (default

`dec = 3`

).- verbose
Print out the used reference table (default

`verbose = FALSE`

).- z
Vector of standard deviation scores (DAZ)

Unnamed numeric vector with Z-scores of length `length(d)`

.

Unnamed numeric vector with D-scores of length `length(z)`

.

The `zad()`

is the inverse of `daz()`

: Given age and
the Z-score, it finds the raw D-score.

Note 1: The Box-Cox Cole and Green (BCCG) and Box-Cox t (BCT)
distributions model only positive D-score values. To increase
robustness, the `daz()`

and `zad()`

functions will round up any
D-scores lower than 1.0 to 1.0.

Note 2: The `daz()`

and `zad()`

function call modified version of the
`pBCT()`

and `qBCT()`

functions from `gamlss`

for better handling
of `NA`

's and rounding.

Cole TJ, Green PJ (1992). Smoothing reference centile curves: The LMS method and penalized likelihood. Statistics in Medicine, 11(10), 1305-1319.

```
# using default reference and key
daz(d = c(35, 50), x = c(0.5, 1.0))
#> [1] 0.499 0.218
# print out names of the used reference table
daz(d = c(35, 50), x = c(0.5, 1.0), verbose = TRUE)
#> key: gsed2406
#> population: preliminary_standards
#> [1] 0.499 0.218
# using the default reference in key gcdg
reftab <- get_reference(key = "gcdg")
daz(d = c(35, 50), x = c(0.5, 1.0), reference_table = reftab)
#> [1] -0.425 0.299
# using Dutch reference in default key
reftab <- get_reference(population = "dutch", verbose = TRUE)
#> key: gsed2406
#> population: dutch
daz(d = c(35, 50), x = c(0.5, 1.0), reference_table = reftab)
#> [1] 1.709 0.996
# population median at ages 0.5, 1 and 2 years, default reference
zad(z = rep(0, 3), x = c(0.5, 1, 2))
#> [1] 33.39 49.29 65.33
# population median at ages 0.5, 1 and 2 years, gcdg key
reftab <- get_reference(key = "gcdg", verbose = TRUE)
#> key: gcdg
#> population: gcdg
zad(z = rep(0, 3), x = c(0.5, 1, 2), reference_table = reftab)
#> [1] 36.32 49.11 62.67
# population median at ages 0.5, 1 and 2 years, dutch key
reftab <- get_reference(key = "dutch", verbose = TRUE)
#> key: dutch
#> population: dutch
zad(z = rep(0, 3), x = c(0.5, 1, 2), reference = reftab)
#> [1] 35.27 48.91 63.77
```