-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.Rmd
60 lines (45 loc) · 1.45 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
output:
md_document:
variant: markdown_github
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
options(width = 60, digits = 3)
```
# [AGD: Analysis of Growth Data](https://stefvanbuuren.name/AGD/)
The [`AGD`](https://cran.r-project.org/package=AGD) package
implements various tools that aid in the analysis of growth data.
## Installation
The `AGD` package can be installed from CRAN as follows:
```{r eval = FALSE}
install.packages("AGD")
```
The latest version is can be installed from GitHub as follows:
```{r eval = FALSE}
install.packages("remotes")
remotes::install_github(repo = "stefvanbuuren/AGD")
```
## Minimal example
```{r minimal, fig.cap = "Standard deviation score of IOTF overweight cut-off relative to Dutch reference"}
library(AGD)
# What is the SDS of a height of 115 cm at age 5 years
# relative to Dutch references?
# Calculate for boys and girls:
y2z(y = c(115, 115), x = 5, sex = c("M", "F"))
# What are the SDS of the IOTF BMI cut-off values for
# overweight (boys 2-18) relative to Dutch references?
cutoff <- c(
18.41, 17.89, 17.55, 17.42, 17.55, 17.92, 18.44, 19.10,
19.84, 20.55, 21.22, 21.91, 22.62, 23.29, 23.90, 24.46,
25.00)
age <- 2:18
z <- y2z(y = cutoff, x = 2:18, sex = "M", ref = nl4.bmi)
plot(age, z, type = "b", xlab = "Age (years",
ylab = "SDS IOTF (on Dutch reference)")
```