From 0aa8151284fb6df50c9236048160b03c1715be90 Mon Sep 17 00:00:00 2001 From: Dirk Schumacher Date: Sun, 17 Sep 2023 08:03:47 +0200 Subject: [PATCH] Update pkgdown docs --- docs/404.html | 117 ++-- docs/LICENSE.html | 224 ++------ docs/authors.html | 163 ++---- docs/index.html | 216 ++++---- docs/news/index.html | 227 +++----- docs/pkgdown.css | 83 +-- docs/pkgdown.js | 4 +- docs/pkgdown.yml | 6 +- docs/reference/Rplot001.png | Bin 0 -> 1011 bytes docs/reference/anthro-package.html | 101 ++++ .../anthro_api_compute_prevalence.html | 175 ++---- docs/reference/anthro_api_compute_zscore.html | 163 ++---- .../anthro_api_compute_zscore_adjusted.html | 163 ++---- .../anthro_api_standardize_oedema_var.html | 132 +---- .../anthro_api_standardize_sex_var.html | 132 +---- docs/reference/anthro_prevalence.html | 523 +++++++++--------- docs/reference/anthro_zscores.html | 349 +++++------- docs/reference/index.html | 166 +----- docs/sitemap.xml | 48 ++ 19 files changed, 1164 insertions(+), 1828 deletions(-) create mode 100644 docs/reference/Rplot001.png create mode 100644 docs/reference/anthro-package.html create mode 100644 docs/sitemap.xml diff --git a/docs/404.html b/docs/404.html index 4200579..1389e2b 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1,66 +1,27 @@ - - - - + + + + - Page not found (404) • anthro - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - -
-
- + +
+ + + - - -
+
+
-
- +
+ + - - diff --git a/docs/LICENSE.html b/docs/LICENSE.html index ab04b08..eb751a1 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -1,66 +1,12 @@ - - - - - - - -NA • anthro - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -NA • anthro + + - - - - -
-
- -
- -
+
-
- +
- - + + diff --git a/docs/authors.html b/docs/authors.html index bb8ebc8..77fac70 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,66 +1,12 @@ - - - - - - - -Authors • anthro - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Authors and Citation • anthro + + - - - - - -
-
-
- -
+
- @@ -138,22 +91,20 @@

Authors

-
- +
- - + + diff --git a/docs/index.html b/docs/index.html index 8313e21..ac4192a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -24,6 +24,8 @@ + +
- - -
+
-
-

-anthro 1.0.0 Unreleased -

-
-

-General

-
    -
  • Improved prevalence computation code, it now consumes slightly less time and is better organized. In addition test-coverage and documentation is improved.
  • +
    + +
    • Fixed the package documentation to adhere to CRAN guidelines.
    • +
    +
    + +
    +

    General

    +
    • Improved prevalence computation code, it now consumes slightly less time and is better organized. In addition test-coverage and documentation is improved.
    • Cluster/strata/sw values in anthro_prevalence now support an explicit NULL value to better control for (missing) cluster/strata/sw information.
    • New API functions are exported, mainly useful to use complicated portions of the logic in other packages, not meant for end-users.
    • -nest = TRUE is now set for the survey designs in anthro_prevalence. See the documentation of survey::svydesign for more information.
    • +nest = TRUE is now set for the survey designs in anthro_prevalence. See the documentation of survey::svydesign for more information.
    • Removed headc, armc, triskin and subskin from parameters of anthro_prevalence as they were not used for the final output.
    • _pop/unwpop values in prevalence calculation are now 0 instead of NA if no values are present for that group.
    • -
    -
    -
    -

    -Bugfix

    -
      -
    • Previously, if one level in a group only has only one observation, all stdev columns in anthro_prevalence are NA. Now only the levels with one observations yield NA, for the others the stdev is still computed.
    • -
    +
+
+

Bugfix

+
  • Previously, if one level in a group only has only one observation, all stdev columns in anthro_prevalence are NA. Now only the levels with one observations yield NA, for the others the stdev is still computed.
  • +
-
-
-

-anthro 0.9.4 2020-10-30 -

-
-

-General

-
    -
  • Handling of age information is improved and loss of information from converting from age in days to age in months or vice verse is reduced.
  • +
    + +
    +

    General

    +
    • Handling of age information is improved and loss of information from converting from age in days to age in months or vice verse is reduced.
    • Some code improvements.
    • -
    -
    -
    -

    -Bugfix

    -
      -
    • Fixed a bug where, observations where erroneously removed from prevalence computation. This happens if age in months was supplied, then values > 59.992 months were considered > 1826 days. Now anything above 60.009 months is considered > 1826 days and thus excluded.
    • -
    -
    +
+
+

Bugfix

+
  • Fixed a bug where, observations where erroneously removed from prevalence computation. This happens if age in months was supplied, then values > 59.992 months were considered > 1826 days. Now anything above 60.009 months is considered > 1826 days and thus excluded.
  • +
-
-

-anthro 0.9.3 2020-05-21 -

-
-

-General

-
    -
  • Internal code improvements.
  • -
-
-
-

-Bugfix

-
    -
  • Z-scores are now only computed for age < 60 months instead of age <= 60 months.
  • +
    + +
    +

    General

    +
    • Internal code improvements.
    • +
    +
    +

    Bugfix

    +
    • Z-scores are now only computed for age < 60 months instead of age <= 60 months.
    • Z-scores for wfl were previously also computed when age >= 60 months and <= 1856 days.
    • -
    -
    +
-
-

-anthro 0.9.2 2020-01-08 -

-
    -
  • Age in days is now rounded half to even (e.g. 730.5 days = 731) before joining the data with the reference values. This is in line with previous implementations and in particularly relevant for data points with age exactly 24 months. Previously the example above was converted to 730 days and with this release it is converted to 731 days (#17).
  • -
  • The cleaned measure and sex variables are now part of the output data.frame of anthro_zscores (#20, #24).
  • +
    + +
    • Age in days is now rounded half to even (e.g. 730.5 days = 731) before joining the data with the reference values. This is in line with previous implementations and in particularly relevant for data points with age exactly 24 months. Previously the example above was converted to 730 days and with this release it is converted to 731 days (#17).
    • +
    • The cleaned measure and sex variables are now part of the output data.frame of anthro_zscores (#20, #24).
    • Removed covr from suggests dependencies.
    • -
    • Fixed a typo in the docs (#15).
    • -
    -
    -
    -

    -anthro 0.9.1 2019-03-23 -

    -
      -
    • Initial release of the package.
    • -
    -
    +
  • Fixed a typo in the docs (#15).
  • +
+
+ +
  • Initial release of the package.
  • +
+
-
- +
- - + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css index 1273238..80ea5b8 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -56,8 +56,10 @@ img.icon { float: right; } -img { +/* Ensure in-page images don't run outside their container */ +.contents img { max-width: 100%; + height: auto; } /* Fix bug in bootstrap (only seen in firefox) */ @@ -78,11 +80,10 @@ dd { /* Section anchors ---------------------------------*/ a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; + display: none; + margin-left: 5px; + width: 20px; + height: 20px; background-image: url(./link.svg); background-repeat: no-repeat; @@ -90,17 +91,15 @@ a.anchor { background-position: center center; } -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-block; } - /* Fixes for fixed navbar --------------------------*/ .contents h1, .contents h2, .contents h3, .contents h4 { @@ -264,31 +263,26 @@ table { /* Syntax highlighting ---------------------------------------------------- */ -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { +pre, code, pre code { background-color: #f8f8f8; color: #333; } +pre, pre code { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; +} -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; +pre { + border: 1px solid #eee; } -pre .img { +pre .img, pre .r-plt { margin: 5px 0; } -pre .img img { +pre .img img, pre .r-plt img { background-color: #fff; - display: block; - height: auto; } code a, pre a { @@ -305,9 +299,8 @@ a.sourceLine:hover { .kw {color: #264D66;} /* keyword */ .co {color: #888888;} /* comment */ -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} +.error {font-weight: bolder;} +.warning {font-weight: bolder;} /* Clipboard --------------------------*/ @@ -365,3 +358,27 @@ mark { content: ""; } } + +/* Section anchors --------------------------------- + Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 +*/ + +div.csl-bib-body { } +div.csl-entry { + clear: both; +} +.hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; +} +div.csl-left-margin { + min-width:2em; + float:left; +} +div.csl-right-inline { + margin-left:2em; + padding-left:1em; +} +div.csl-indent { + margin-left: 2em; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 7e7048f..6f0eee4 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -80,7 +80,7 @@ $(document).ready(function() { var copyButton = ""; - $(".examples, div.sourceCode").addClass("hasCopyButton"); + $("div.sourceCode").addClass("hasCopyButton"); // Insert copy buttons: $(copyButton).prependTo(".hasCopyButton"); @@ -91,7 +91,7 @@ // Initialize clipboard: var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { text: function(trigger) { - return trigger.parentNode.textContent; + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); } }); diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index ff427f9..2c9ab67 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,6 +1,6 @@ -pandoc: 2.14.0.3 -pkgdown: 1.6.1 +pandoc: '2.18' +pkgdown: 2.0.7 pkgdown_sha: ~ articles: {} -last_built: 2021-11-18T16:28Z +last_built: 2023-09-17T06:02Z diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png new file mode 100644 index 0000000000000000000000000000000000000000..17a358060aed2a86950757bbd25c6f92c08c458f GIT binary patch literal 1011 zcmeAS@N?(olHy`uVBq!ia0y~yV0-|=9Be?5+AI5}0x7m6Z+90U4Fo@(ch>_c&H|6f zVg?3oArNM~bhqvg0|WD9PZ!6KiaBo&GBN^{G%5UFpXcEKVvd5*5Eu=C0SJK)8A6*F U7`aXvEC5;V>FVdQ&MBb@00SN#Z2$lO literal 0 HcmV?d00001 diff --git a/docs/reference/anthro-package.html b/docs/reference/anthro-package.html new file mode 100644 index 0000000..5232e9d --- /dev/null +++ b/docs/reference/anthro-package.html @@ -0,0 +1,101 @@ + +Compute the WHO Child Growth Standards — anthro-package • anthro + + +
+
+ + + +
+
+ + +
+

Provides WHO Child Growth Standards (z-scores) with +confidence intervals and standard errors around the +prevalence estimates, taking into account complex sample designs. +More information on the methods is available online: +<https://www.who.int/tools/child-growth-standards>.

+
+ + + +
+

Author

+

Maintainer: Dirk Schumacher mail@dirk-schumacher.net

+

Other contributors:

+ +
+ +
+ + +
+ +
+

Site built with pkgdown 2.0.7.

+
+ +
+ + + + + + + + diff --git a/docs/reference/anthro_api_compute_prevalence.html b/docs/reference/anthro_api_compute_prevalence.html index 257d60a..f6e7799 100644 --- a/docs/reference/anthro_api_compute_prevalence.html +++ b/docs/reference/anthro_api_compute_prevalence.html @@ -1,67 +1,12 @@ - - - - - - - -Compute prevalence of zscores — anthro_api_compute_prevalence • anthro - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Compute prevalence of zscores — anthro_api_compute_prevalence • anthro - - - - + + -
-
- -
- -
+
@@ -120,70 +52,75 @@

Compute prevalence of zscores

Compute prevalence of zscores

-
anthro_api_compute_prevalence(data, zscores_to_compute, survey_subsets)
- -

Arguments

- - - - - - - - - - - - - - -
data

a data frame containing the underlying data

zscores_to_compute

a list of zscore indicators that should be computed. -The list needs to have 4 named values:

-
name

The name or abbreviation of the indicator. +

+
anthro_api_compute_prevalence(data, zscores_to_compute, survey_subsets)
+
+ +
+

Arguments

+
data
+

a data frame containing the underlying data

+ + +
zscores_to_compute
+

a list of zscore indicators that should be computed. +The list needs to have 4 named values:

name
+

The name or abbreviation of the indicator. This will appear in the column names of the output.

-
column

The column name without the 'z' of the zscore that shall be + +

column
+

The column name without the 'z' of the zscore that shall be used.

-
with_cutoffs

TRUE iff cutoffs for the indicator shall be computed.

-
with_auxiliary_zscore_column

TRUE iff z-score should be set to + +

with_cutoffs
+

TRUE iff cutoffs for the indicator shall be computed.

+ +
with_auxiliary_zscore_column
+

TRUE iff z-score should be set to -3.1 if oedema = "y" for prevalence estimates.

-
auxiliary_zscore_condition

optional function to define a special + +

auxiliary_zscore_condition
+

optional function to define a special condition when the z-score should be set to -3.1

-
survey_subsets

subsets for which the prevalence values should be -computed. It is a named list of characters, where the values correspond -to columns and the names to labels in the output.

-

Note

+ + +
survey_subsets
+

subsets for which the prevalence values should be +computed. It is a named list of characters, where the values correspond +to columns and the names to labels in the output.

+ +
+
+

Note

This function is meant to be used by other anthro related packages. It is not advised to use this in you own packages or analysis. If you must use it, prepare for potential breaking changes in the future.

+
+
-
- +
- - + + diff --git a/docs/reference/anthro_api_compute_zscore.html b/docs/reference/anthro_api_compute_zscore.html index 94f56b3..9461090 100644 --- a/docs/reference/anthro_api_compute_zscore.html +++ b/docs/reference/anthro_api_compute_zscore.html @@ -1,67 +1,12 @@ - - - - - - - -Helper function to compute zscores — anthro_api_compute_zscore • anthro - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Helper function to compute zscores — anthro_api_compute_zscore • anthro - - + + - - -
-
- -
- -
+
@@ -120,63 +52,60 @@

Helper function to compute zscores

Helper function to compute zscores

-
anthro_api_compute_zscore(y, m, l, s)
- -

Arguments

- - - - - - - - - - - - - - - - - - -
y

a numeric vector

m

a numeric vector

l

a numeric vector

s

a numeric vector

- -

Note

+
+
anthro_api_compute_zscore(y, m, l, s)
+
+ +
+

Arguments

+
y
+

a numeric vector

+ +
m
+

a numeric vector

+ + +
l
+

a numeric vector

+ + +
s
+

a numeric vector

+ +
+
+

Note

This function is meant to be used by other anthro related packages. It is not advised to use this in you own packages or analysis. If you must use it, prepare for potential breaking changes in the future.

-

References

- +
+
+

References

http://www.who.int/childgrowth/standards/Chap_7.pdf

+
+
-
- +
- - + + diff --git a/docs/reference/anthro_api_compute_zscore_adjusted.html b/docs/reference/anthro_api_compute_zscore_adjusted.html index a689acf..688a6cf 100644 --- a/docs/reference/anthro_api_compute_zscore_adjusted.html +++ b/docs/reference/anthro_api_compute_zscore_adjusted.html @@ -1,67 +1,12 @@ - - - - - - - -Helper function to compute the adjusted zscore — anthro_api_compute_zscore_adjusted • anthro - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Helper function to compute the adjusted zscore — anthro_api_compute_zscore_adjusted • anthro - - + + - - -
-
- -
- -
+
@@ -120,63 +52,60 @@

Helper function to compute the adjusted zscore

Helper function to compute the adjusted zscore

-
anthro_api_compute_zscore_adjusted(y, m, l, s)
- -

Arguments

- - - - - - - - - - - - - - - - - - -
y

a numeric vector

m

a numeric vector

l

a numeric vector

s

a numeric vector

- -

Note

+
+
anthro_api_compute_zscore_adjusted(y, m, l, s)
+
+ +
+

Arguments

+
y
+

a numeric vector

+ +
m
+

a numeric vector

+ + +
l
+

a numeric vector

+ + +
s
+

a numeric vector

+ +
+
+

Note

This function is meant to be used by other anthro related packages. It is not advised to use this in you own packages or analysis. If you must use it, prepare for potential breaking changes in the future.

-

References

- +
+
+

References

http://www.who.int/childgrowth/standards/Chap_7.pdf

+
+
-
- +
- - + + diff --git a/docs/reference/anthro_api_standardize_oedema_var.html b/docs/reference/anthro_api_standardize_oedema_var.html index fee6b36..4edbdd7 100644 --- a/docs/reference/anthro_api_standardize_oedema_var.html +++ b/docs/reference/anthro_api_standardize_oedema_var.html @@ -1,67 +1,12 @@ - - - - - - - -Standardize the Oedema input values — anthro_api_standardize_oedema_var • anthro - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Standardize the Oedema input values — anthro_api_standardize_oedema_var • anthro - - + + - - -
-
- -
- -
+
@@ -120,48 +52,44 @@

Standardize the Oedema input values

Standardize the Oedema input values

-
anthro_api_standardize_oedema_var(oedema)
- -

Arguments

- - - - - - -
oedema

a vector of values

+
+
anthro_api_standardize_oedema_var(oedema)
+
-

Note

+
+

Arguments

+
oedema
+

a vector of values

+
+
+

Note

This function is meant to be used by other anthro related packages. It is not advised to use this in you own packages or analysis. If you must use it, prepare for potential breaking changes in the future.

+
+
-
- +
- - + + diff --git a/docs/reference/anthro_api_standardize_sex_var.html b/docs/reference/anthro_api_standardize_sex_var.html index cade74f..fbacbbf 100644 --- a/docs/reference/anthro_api_standardize_sex_var.html +++ b/docs/reference/anthro_api_standardize_sex_var.html @@ -1,67 +1,12 @@ - - - - - - - -Standardize the Sex input values — anthro_api_standardize_sex_var • anthro - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Standardize the Sex input values — anthro_api_standardize_sex_var • anthro - - + + - - -
-
- -
- -
+
@@ -120,48 +52,44 @@

Standardize the Sex input values

Standardize the Sex input values

-
anthro_api_standardize_sex_var(sex)
- -

Arguments

- - - - - - -
sex

a vector of values

+
+
anthro_api_standardize_sex_var(sex)
+
-

Note

+
+

Arguments

+
sex
+

a vector of values

+
+
+

Note

This function is meant to be used by other anthro related packages. It is not advised to use this in you own packages or analysis. If you must use it, prepare for potential breaking changes in the future.

+
+
-
- +
- - + + diff --git a/docs/reference/anthro_prevalence.html b/docs/reference/anthro_prevalence.html index a5225fa..1fe0eba 100644 --- a/docs/reference/anthro_prevalence.html +++ b/docs/reference/anthro_prevalence.html @@ -1,46 +1,5 @@ - - - - - - - -Compute prevalence estimates — anthro_prevalence • anthro - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Compute prevalence estimates — anthro_prevalence • anthro - - - - - - - - - - - + + - - -
-
- -
- -
+
@@ -136,60 +68,60 @@

Compute prevalence estimates

which data are available).

-
anthro_prevalence(
-  sex,
-  age = NA_real_,
-  is_age_in_month = FALSE,
-  weight = NA_real_,
-  lenhei = NA_real_,
-  measure = NA_character_,
-  oedema = "n",
-  sw = NULL,
-  cluster = NULL,
-  strata = NULL,
-  typeres = NA_character_,
-  gregion = NA_character_,
-  wealthq = NA_character_,
-  mothered = NA_character_,
-  othergr = NA_character_
-)
- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sex

A numeric or text variable containing gender information. +

+
anthro_prevalence(
+  sex,
+  age = NA_real_,
+  is_age_in_month = FALSE,
+  weight = NA_real_,
+  lenhei = NA_real_,
+  measure = NA_character_,
+  oedema = "n",
+  sw = NULL,
+  cluster = NULL,
+  strata = NULL,
+  typeres = NA_character_,
+  gregion = NA_character_,
+  wealthq = NA_character_,
+  mothered = NA_character_,
+  othergr = NA_character_
+)
+
+ +
+

Arguments

+
sex
+

A numeric or text variable containing gender information. If it is numeric, its values must be: 1 for males and 2 for females. If it is character, it must be "m" or "M" for males and "f" or "F" for females. No z-scores will be calculated -if sex is missing.

age

A numeric variable containing age information; age can be +if sex is missing.

+ + +
age
+

A numeric variable containing age information; age can be in either days or months (if optional argument is_age_in_month is set to TRUE). An exact age in days is expected and should not be rounded if age is in months. Age-related z-scores will -NOT be calculated if age is missing (NA).

is_age_in_month

A logical flag; if TRUE, variable age unit will be +NOT be calculated if age is missing (NA).

+ + +
is_age_in_month
+

A logical flag; if TRUE, variable age unit will be treated as months. The function converts it to days by dividing age by 30.4375 and rounding it to integer so that reference tables can be used. When unspecified, the default value FALSE -is used and age unit is treated as days.

weight

A numeric variable containing body weight information, which +is used and age unit is treated as days.

+ + +
weight
+

A numeric variable containing body weight information, which must be in kilograms. Weight-related z-scores are not -calculated if body weight is missing.

lenhei

A numeric variable containing length (recumbent length) or +calculated if body weight is missing.

+ + +
lenhei
+

A numeric variable containing length (recumbent length) or height (standing height) information, which must be in centimeters. Length/height-related z-scores will not be calculated if lenhei is missing. For children with age @@ -202,11 +134,11 @@

Arg length-based for children below 24 months, and height-based otherwise. This converted length/height according to age is assigned to the variable clenhei in -the resulting data.frame.

measure

A character variable indicating whether recumbent length +the resulting data.frame.

+ + +
measure
+

A character variable indicating whether recumbent length or standing height was measured for each observation. The values of this variable must be "L" or "l" for recumbent length, and "H" or "h" for standing height. @@ -216,18 +148,17 @@

Arg specifying this variable. If unspecified, the default vector with all missing values is used. The function imputes the missing values according to the -following algorithm:

    -
  • If age is not missing, then it is recumbent length +following algorithm:

    • If age is not missing, then it is recumbent length if age below 24 months (731 days), and standing height if age equal and above 24 months.

    • If age is missing, then it is recumbent length if measurement < 87 cm and standing height if measurement >= 87 cm.

    • -

oedema

The values of this character variable must be "n", "N" or "2" + + + +

oedema
+

The values of this character variable must be "n", "N" or "2" for non-oedema, and "y", "Y", "1" for oedema. Although it is highly recommended that this variable is provided by the survey, it is possible to run @@ -238,64 +169,67 @@

Arg (zwei, zwfl and zbmi) are NOT calculated (set to missing), BUT they are treated as being < -3 SD in the weight-related indicator prevalence (anthro_prevalence) -estimation.

sw

An optional numeric vector containing the sampling weights. -If NULL, no sampling weights are used.

cluster

An optional integer vector representing clusters. If the value +estimation.

+ + +
sw
+

An optional numeric vector containing the sampling weights. +If NULL, no sampling weights are used.

+ + +
cluster
+

An optional integer vector representing clusters. If the value is NULL this is treated as a survey without a cluster. This is also the case -if all values are equal, then we assume there is also no cluster.

strata

An optional integer vector representing strata. Pass NULL to -indicate that there are no strata.

typeres

An optional integer or character vector representing a type of +if all values are equal, then we assume there is also no cluster.

+ + +
strata
+

An optional integer vector representing strata. Pass NULL to +indicate that there are no strata.

+ + +
typeres
+

An optional integer or character vector representing a type of residence. Any values are accepted, however, “Rural” or “Urban” are preferable -for outputs purposes.

gregion

An optional integer or character vector representing a -geographical region.

wealthq

An optional integer or character vector representing wealth +for outputs purposes.

+ + +
gregion
+

An optional integer or character vector representing a +geographical region.

+ + +
wealthq
+

An optional integer or character vector representing wealth quintiles where (1=poorest; 2,3,4,5=richest). -All values can either be NA, or 1, 2, 3, 4, 5 or Q1, Q2, Q3, Q4, Q5.

mothered

An optional integer or character vector representing the +All values can either be NA, or 1, 2, 3, 4, 5 or Q1, Q2, Q3, Q4, Q5.

+ + +
mothered
+

An optional integer or character vector representing the education of the mother. Any number of categories is accepted for the analysis, provided sample sizes are sufficient in all categories. However, the common, standard recommended categories are no education, primary school, and secondary school or higher (“None”, “Primary” and “Secondary”). Note: Mother education refers to the highest level of schooling -attained by the mother

othergr

An optional integer or character vector that is of interest -for stratified analysis.

- -

Value

- -

Returns a data.frame with prevalence estimates for the various +attained by the mother

+ + +
othergr
+

An optional integer or character vector that is of interest +for stratified analysis.

+ +
+
+

Value

+ + +

Returns a data.frame with prevalence estimates for the various groups.

+ +

The output data frame includes prevalence estimates with corresponding standard errors and confidence intervals, and z-score summary statistics (mean and standard deviation) with most @@ -305,57 +239,115 @@

Value

geographical regions, wealth quintiles, mother education and one additional factor the user is interested in and for which data are available).

+ +

The resulting columns are coded with a prefix, a prevalence indicator and a suffix:

-

Prefix:

-
HA

Height-for-age

-
WA

Weight-for-age

-
WA_2

Underweight

-
BMI

Body-mass-index-for-age

-
WH

Weight-for-height

-
HA_WH

Height-for-age and weight-for-height combined

- -
- -

Prevalence indicator:

-
_3

Prevalence corresponding to < -3 SD

-
_2

Prevalence corresponding to < -2 SD

-
_1

Prevalence corresponding to < -1 SD

-
1

Prevalence corresponding to > +1 SD

-
2

Prevalence corresponding to > +2 SD

-
3

Prevalence corresponding to > +3 SD

- -
- -

Suffix:

-
_pop

Weighted sample size

-
_unwpop

Unweighted sample size

-
_r

Mean/prevalence

-
_ll

lower 95% confidence interval limit

-
_ul

upper 95% confidence interval limit

-
_stdev

Standard Deviation

-
_se

Standard error

- -
- - -

For example:

-
WHZ_pop

Weight-for-height weighted sample size

-
HA_r

Height-for-age z-score mean

-
WA_stdev

Weight-for-age z-score Standard Deviation

-
WH2_r

Prevalence of weight-for-height >+2 SD (overweight )

-
WH_r

Mean weight-for-height z-score

-
BMI_2_se

Prevalence of BMI-for-age <-2 SD standard error

-
BMI_3_ll

Prevalence of BMI-for-age <-3 SD lower 95% confidence + + +

Prefix:

+ + +
HA
+

Height-for-age

+ +
WA
+

Weight-for-age

+ +
WA_2
+

Underweight

+ +
BMI
+

Body-mass-index-for-age

+ +
WH
+

Weight-for-height

+ +
HA_WH
+

Height-for-age and weight-for-height combined

+ + +

Prevalence indicator:

+ + +
_3
+

Prevalence corresponding to < -3 SD

+ +
_2
+

Prevalence corresponding to < -2 SD

+ +
_1
+

Prevalence corresponding to < -1 SD

+ +
1
+

Prevalence corresponding to > +1 SD

+ +
2
+

Prevalence corresponding to > +2 SD

+ +
3
+

Prevalence corresponding to > +3 SD

+ + +

Suffix:

+ + +
_pop
+

Weighted sample size

+ +
_unwpop
+

Unweighted sample size

+ +
_r
+

Mean/prevalence

+ +
_ll
+

lower 95% confidence interval limit

+ +
_ul
+

upper 95% confidence interval limit

+ +
_stdev
+

Standard Deviation

+ +
_se
+

Standard error

+ + +

For example:

+ + +
WHZ_pop
+

Weight-for-height weighted sample size

+ +
HA_r
+

Height-for-age z-score mean

+ +
WA_stdev
+

Weight-for-age z-score Standard Deviation

+ +
WH2_r
+

Prevalence of weight-for-height >+2 SD (overweight )

+ +
WH_r
+

Mean weight-for-height z-score

+ +
BMI_2_se
+

Prevalence of BMI-for-age <-2 SD standard error

+ +
BMI_3_ll
+

Prevalence of BMI-for-age <-3 SD lower 95% confidence interval limit

-
HA_2_WH_2_ul

Prevalence of children Height-for-age and + +

HA_2_WH_2_ul
+

Prevalence of children Height-for-age and weight-for-height combined (stunted & wasted) lower 95% confidence interval limit

-
- -

Details

+
+
+

Details

In this function, all available (non-missing and non-flagged) z-score values are used for each indicator-specific prevalence estimation (standard analysis).

@@ -366,59 +358,58 @@

Details

If not all parameter values have equal length, parameter values will be repeated to match the maximum length of all arguments except is_age_in_month using rep_len. This happens without warnings.

+

-

Examples

-
if (FALSE) {
-# because it takes too long for CRAN checks
-library(anthro)
-
-# compute the prevalence estimates for 100 random children
-# with weight around 15kg and height around 100cm
-res <- anthro_prevalence(
-  sex = c(1, 2),
-  age = 1000, # days
-  weight = rnorm(100, 15, 1),
-  lenhei = rnorm(100, 100, 10)
-)
-
-# Height-for-age
-# We extract prevalence estimates for <-3SD, <-2SD (Stunting)
-# and the z-score mean
-col_names <- c("Group", "HAZ_unwpop", "HA_3_r", "HA_2_r", "HA_r")
-res <- res[, col_names]
-
-# rename the columns
-colnames(res) <- c("Group", "Unweighted N", "-3SD", "-2SD", "z-score mean ")
-
-# note that we only generated data for one age group
-res
-}
-
+
+

Examples

+
if (FALSE) {
+# because it takes too long for CRAN checks
+library(anthro)
+
+# compute the prevalence estimates for 100 random children
+# with weight around 15kg and height around 100cm
+res <- anthro_prevalence(
+  sex = c(1, 2),
+  age = 1000, # days
+  weight = rnorm(100, 15, 1),
+  lenhei = rnorm(100, 100, 10)
+)
+
+# Height-for-age
+# We extract prevalence estimates for <-3SD, <-2SD (Stunting)
+# and the z-score mean
+col_names <- c("Group", "HAZ_unwpop", "HA_3_r", "HA_2_r", "HA_r")
+res <- res[, col_names]
+
+# rename the columns
+colnames(res) <- c("Group", "Unweighted N", "-3SD", "-2SD", "z-score mean ")
+
+# note that we only generated data for one age group
+res
+}
+
+
+
-
- +
- - + + diff --git a/docs/reference/anthro_zscores.html b/docs/reference/anthro_zscores.html index 464967d..26d161a 100644 --- a/docs/reference/anthro_zscores.html +++ b/docs/reference/anthro_zscores.html @@ -1,71 +1,16 @@ - - - - - - - -Calculate z-scores for the eight anthropometric indicators — anthro_zscores • anthro - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calculate z-scores for the eight anthropometric indicators — anthro_zscores • anthro - - - - - - - - - - + + - - - -
-
- -
- -
+
@@ -128,56 +60,56 @@

Calculate z-scores for the eight anthropometric indicators

skinfold-for-age based on the WHO Child Growth Standards.

-
anthro_zscores(
-  sex,
-  age = NA_real_,
-  is_age_in_month = FALSE,
-  weight = NA_real_,
-  lenhei = NA_real_,
-  measure = NA_character_,
-  headc = NA_real_,
-  armc = NA_real_,
-  triskin = NA_real_,
-  subskin = NA_real_,
-  oedema = "n"
-)
- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sex

A numeric or text variable containing gender information. +

+
anthro_zscores(
+  sex,
+  age = NA_real_,
+  is_age_in_month = FALSE,
+  weight = NA_real_,
+  lenhei = NA_real_,
+  measure = NA_character_,
+  headc = NA_real_,
+  armc = NA_real_,
+  triskin = NA_real_,
+  subskin = NA_real_,
+  oedema = "n"
+)
+
+ +
+

Arguments

+
sex
+

A numeric or text variable containing gender information. If it is numeric, its values must be: 1 for males and 2 for females. If it is character, it must be "m" or "M" for males and "f" or "F" for females. No z-scores will be calculated -if sex is missing.

age

A numeric variable containing age information; age can be +if sex is missing.

+ + +
age
+

A numeric variable containing age information; age can be in either days or months (if optional argument is_age_in_month is set to TRUE). An exact age in days is expected and should not be rounded if age is in months. Age-related z-scores will -NOT be calculated if age is missing (NA).

is_age_in_month

A logical flag; if TRUE, variable age unit will be +NOT be calculated if age is missing (NA).

+ + +
is_age_in_month
+

A logical flag; if TRUE, variable age unit will be treated as months. The function converts it to days by dividing age by 30.4375 and rounding it to integer so that reference tables can be used. When unspecified, the default value FALSE -is used and age unit is treated as days.

weight

A numeric variable containing body weight information, which +is used and age unit is treated as days.

+ + +
weight
+

A numeric variable containing body weight information, which must be in kilograms. Weight-related z-scores are not -calculated if body weight is missing.

lenhei

A numeric variable containing length (recumbent length) or +calculated if body weight is missing.

+ + +
lenhei
+

A numeric variable containing length (recumbent length) or height (standing height) information, which must be in centimeters. Length/height-related z-scores will not be calculated if lenhei is missing. For children with age @@ -190,11 +122,11 @@

Arg length-based for children below 24 months, and height-based otherwise. This converted length/height according to age is assigned to the variable clenhei in -the resulting data.frame.

measure

A character variable indicating whether recumbent length +the resulting data.frame.

+ + +
measure
+

A character variable indicating whether recumbent length or standing height was measured for each observation. The values of this variable must be "L" or "l" for recumbent length, and "H" or "h" for standing height. @@ -204,42 +136,41 @@

Arg specifying this variable. If unspecified, the default vector with all missing values is used. The function imputes the missing values according to the -following algorithm:

    -
  • If age is not missing, then it is recumbent length +following algorithm:

    • If age is not missing, then it is recumbent length if age below 24 months (731 days), and standing height if age equal and above 24 months.

    • If age is missing, then it is recumbent length if measurement < 87 cm and standing height if measurement >= 87 cm.

    • -

headc

A numeric variable containing head circumference information, + + + +

headc
+

A numeric variable containing head circumference information, which must be in centimeters. Head circumference-for-age -z-scores are not calculated if head circumference is missing.

armc

A numeric variable containing arm circumference information, +z-scores are not calculated if head circumference is missing.

+ + +
armc
+

A numeric variable containing arm circumference information, which must be in centimeters. Arm circumference-for-age z-scores -are not calculated if arm circumference is missing.

triskin

A numeric variable containing triceps skinfold information, +are not calculated if arm circumference is missing.

+ + +
triskin
+

A numeric variable containing triceps skinfold information, which must be in millimeters. Triceps skinfold-for-age z-scores -are not calculated if triceps skinfold is missing.

subskin

A numeric variable containing subscapular skinfold information, +are not calculated if triceps skinfold is missing.

+ + +
subskin
+

A numeric variable containing subscapular skinfold information, which must be in millimeters. Subscapular skinfold-for-age z-scores -are not calculated if subscapular skinfold is missing.

oedema

The values of this character variable must be "n", "N" or "2" +are not calculated if subscapular skinfold is missing.

+ + +
oedema
+

The values of this character variable must be "n", "N" or "2" for non-oedema, and "y", "Y", "1" for oedema. Although it is highly recommended that this variable is provided by the survey, it is possible to run @@ -249,21 +180,23 @@

Arg treated as non-oedema. For oedema, weight related z-scores (zwei, zwfl and zbmi) are NOT calculated (set to missing), BUT they are treated as being < -3 SD in the weight-related -indicator prevalence (anthro_prevalence) -estimation.

+indicator prevalence (anthro_prevalence) +estimation.

-

Value

+
+
+

Value

+ -

A data.frame with three types of columns. Columns starting with a +

A data.frame with three types of columns. Columns starting with a "c" are cleaned versions of the input arguments. Columns beginning with a "z" are the respective z-scores and columns prefixed by a "f" indicate if these z-scores are flagged (integers). The number of rows is given by the length of the input arguments.

-

The following columns are returned:

    -
  • clenhei converted length/height for deriving z-score

  • + + +

    The following columns are returned:

    • clenhei converted length/height for deriving z-score

    • cbmi BMI value based on length/height given by clenhei

    • zlen Length/Height-for-age z-score

    • flen 1, if abs(zlen) > 6

    • @@ -281,75 +214,75 @@

      Value

    • fts 1, if abs(zts) > 5

    • zss Subscapular skinfold-for-age z-score

    • fss 1, if abs(zss) > 5

    • -
    - -

    If not all parameter values have equal length, parameter values will be +

If not all parameter values have equal length, parameter values will be repeated to match the maximum length of all arguments except is_age_in_month using rep_len. This happens without warnings.

-

Z-scores are only computed for children younger than 60 months (age in months < 60)

-

References

+ +

Z-scores are only computed for children younger than 60 months (age in months < 60)

+
+
+

References

WHO Multicentre Growth Reference Study Group (2006). WHO Child Growth Standards: Length/height-for-age, weight-for-age, weight-for-length, weight-for-height and body mass index-for-age: Methods and development. Geneva: World Health Organization; pp 312. (web site: http://www.who.int/childgrowth/publications/en/ )

WHO Multicentre Growth Reference Study Group (2007). WHO Child Growth Standards: Head circumference-for-age, arm circumference-for-age, triceps skinfold-for-age and subscapular skinfold-for-age: Methods and development. Geneva: World Health Organization; pp 217. (web site: http://www.who.int/childgrowth/publications/en/ )

+
-

Examples

-
# you can either use the function to compute zscores for specific values
-anthro_zscores(sex = "f", age = 10, is_age_in_month = TRUE, weight = 10)
-#>   clenhei cbmi cmeasure csex zlen flen zwei fwei zwfl fwfl zbmi fbmi zhc fhc
-#> 1      NA   NA     <NA>    2   NA   NA 1.33    0   NA   NA   NA   NA  NA  NA
-#>   zac fac zts fts zss fss
-#> 1  NA  NA  NA  NA  NA  NA
-
-# values will be recycled so not all input values need to be of the same length
-anthro_zscores(sex = "f", age = c(10, 20, 30), weight = 10)
-#>   clenhei cbmi cmeasure csex zlen flen  zwei fwei zwfl fwfl zbmi fbmi zhc fhc
-#> 1      NA   NA     <NA>    2   NA   NA 10.46    1   NA   NA   NA   NA  NA  NA
-#> 2      NA   NA     <NA>    2   NA   NA  9.14    1   NA   NA   NA   NA  NA  NA
-#> 3      NA   NA     <NA>    2   NA   NA  8.01    1   NA   NA   NA   NA  NA  NA
-#>   zac fac zts fts zss fss
-#> 1  NA  NA  NA  NA  NA  NA
-#> 2  NA  NA  NA  NA  NA  NA
-#> 3  NA  NA  NA  NA  NA  NA
-
-# or use it with a compute dataset
-if (FALSE) {
-your_data_set <- read.csv("<your survey>.csv")
-with(
-  your_data_set,
-  anthro_zscores(
-    sex = sex, age = age_in_days,
-    weight = weight, lenhei = lenhei
-  )
-)
-}
-
+
+

Examples

+
# you can either use the function to compute zscores for specific values
+anthro_zscores(sex = "f", age = 10, is_age_in_month = TRUE, weight = 10)
+#>   clenhei cbmi cmeasure csex zlen flen zwei fwei zwfl fwfl zbmi fbmi zhc fhc
+#> 1      NA   NA     <NA>    2   NA   NA 1.33    0   NA   NA   NA   NA  NA  NA
+#>   zac fac zts fts zss fss
+#> 1  NA  NA  NA  NA  NA  NA
+
+# values will be recycled so not all input values need to be of the same length
+anthro_zscores(sex = "f", age = c(10, 20, 30), weight = 10)
+#>   clenhei cbmi cmeasure csex zlen flen  zwei fwei zwfl fwfl zbmi fbmi zhc fhc
+#> 1      NA   NA     <NA>    2   NA   NA 10.46    1   NA   NA   NA   NA  NA  NA
+#> 2      NA   NA     <NA>    2   NA   NA  9.14    1   NA   NA   NA   NA  NA  NA
+#> 3      NA   NA     <NA>    2   NA   NA  8.01    1   NA   NA   NA   NA  NA  NA
+#>   zac fac zts fts zss fss
+#> 1  NA  NA  NA  NA  NA  NA
+#> 2  NA  NA  NA  NA  NA  NA
+#> 3  NA  NA  NA  NA  NA  NA
+
+# or use it with a compute dataset
+if (FALSE) {
+your_data_set <- read.csv("<your survey>.csv")
+with(
+  your_data_set,
+  anthro_zscores(
+    sex = sex, age = age_in_days,
+    weight = weight, lenhei = lenhei
+  )
+)
+}
+
+
+
-
- +
- - + + diff --git a/docs/reference/index.html b/docs/reference/index.html index ea8263f..fcf20ed 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,66 +1,12 @@ - - - - - - - -Function reference • anthro - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function reference • anthro - - + + - - -
-
- -
- -
+
- - - - - - - - - - -
-

All functions

+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+

All functions

-

anthro

+
+

anthro anthro-package

Compute the WHO Child Growth Standards

+

anthro_api_compute_prevalence()

Compute prevalence of zscores

+

anthro_api_compute_zscore()

Helper function to compute zscores

+

anthro_api_compute_zscore_adjusted()

Helper function to compute the adjusted zscore

+

anthro_api_standardize_oedema_var()

Standardize the Oedema input values

+

anthro_api_standardize_sex_var()

Standardize the Sex input values

+

anthro_prevalence()

Compute prevalence estimates

+

anthro_zscores()

Calculate z-scores for the eight anthropometric indicators

- +
+
-
- +
- - + + diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000..8a9ac31 --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,48 @@ + + + + /404.html + + + /LICENSE.html + + + /authors.html + + + /index.html + + + /news/index.html + + + /reference/anthro-package.html + + + /reference/anthro.html + + + /reference/anthro_api_compute_prevalence.html + + + /reference/anthro_api_compute_zscore.html + + + /reference/anthro_api_compute_zscore_adjusted.html + + + /reference/anthro_api_standardize_oedema_var.html + + + /reference/anthro_api_standardize_sex_var.html + + + /reference/anthro_prevalence.html + + + /reference/anthro_zscores.html + + + /reference/index.html + +