README.md

centile

Lifecycle:
experimental CRAN
status R-CMD-check

The centile package

The currently supported distributions are normal (NO), Lambda-Mu-Sigma (LMS), Box-Cox Green Cole (BCCG), Box-Cox Power Exponential (BCPE) and Box-Cox t (BCT).

Installation

You can install the development version of centile with:

remotes::install_github("growthcharts/centile")

Examples

Generate a reference table for the WHO Multicentre Growth Standard for weight of boys aged 0-5 years:

library(centile)
calculate_centile_table(x = 0:5, z = -2:2, refcode = "who_2006_wgt_male_")
#>        Z-2   Z-1    Z0    Z1    Z2
#> [1,]  2.46  2.88  3.35  3.86  4.42
#> [2,]  7.74  8.65  9.65 10.76 11.99
#> [3,]  9.67 10.84 12.15 13.62 15.28
#> [4,] 11.28 12.71 14.34 16.20 18.31
#> [5,] 12.71 14.40 16.35 18.59 21.18
#> [6,] 14.07 16.04 18.34 21.02 24.16

We obtain percentiles as follows:

library(centile)
calculate_centile_table(x = 0:5, p = c(10, 50, 90), refcode = "who_2006_wgt_male_")
#>        P10   P50   P90
#> [1,]  2.76  3.35  4.01
#> [2,]  8.38  9.65 11.09
#> [3,] 10.50 12.15 14.07
#> [4,] 12.29 14.34 16.77
#> [5,] 13.90 16.35 19.28
#> [6,] 15.45 18.34 21.86


growthcharts/yzy documentation built on Oct. 28, 2024, 10:32 a.m.