From b6d5d31974dd3d2c96e392fed1ac37c8df51ac98 Mon Sep 17 00:00:00 2001 From: Stef van Buuren Date: Wed, 12 Jun 2024 22:43:07 +0200 Subject: [PATCH] Update site --- NEWS.md | 2 +- _pkgdown.yml | 1 + docs/404.html | 2 +- docs/LICENSE.html | 2 +- docs/articles/getting_started.html | 4 +- docs/articles/index.html | 2 +- docs/articles/scoring_GSED.html | 34 ++--- docs/authors.html | 21 +-- docs/index.html | 20 +-- docs/news/index.html | 87 ++++++------- docs/pkgdown.yml | 2 +- docs/reference/builtin_itembank.html | 2 +- docs/reference/builtin_itemtable.html | 2 +- docs/reference/builtin_keys.html | 4 +- docs/reference/builtin_references.html | 9 +- docs/reference/calculate_posterior.html | 2 +- docs/reference/count_mu.html | 120 ++++++++++++++++++ docs/reference/count_mu_dutch.html | 2 +- docs/reference/count_mu_gcdg.html | 2 +- docs/reference/count_mu_phase1.html | 2 +- .../count_mu_preliminary_standards.html | 2 +- docs/reference/daz.html | 22 ++-- docs/reference/decompose_itemnames.html | 2 +- docs/reference/dscore-package.html | 2 +- docs/reference/dscore.html | 42 +++--- docs/reference/get_age_equivalent.html | 18 +-- docs/reference/get_itemnames.html | 2 +- docs/reference/get_itemtable.html | 2 +- docs/reference/get_labels.html | 2 +- docs/reference/get_reference.html | 40 +++--- docs/reference/get_tau.html | 2 +- docs/reference/gsample.html | 2 +- docs/reference/index.html | 6 +- docs/reference/milestones.html | 2 +- docs/reference/normalize.html | 2 +- docs/reference/posterior.html | 2 +- docs/reference/rename_gcdg_gsed.html | 2 +- docs/reference/sample_hf.html | 2 +- docs/reference/sample_lf.html | 2 +- docs/reference/sample_sf.html | 2 +- docs/reference/sort_itemnames.html | 2 +- docs/sitemap.xml | 3 + 42 files changed, 297 insertions(+), 188 deletions(-) create mode 100644 docs/reference/count_mu.html diff --git a/NEWS.md b/NEWS.md index 9a71a64..a5705da 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,7 +4,7 @@ editor_options: wrap: 72 --- -# dscore 1.9.0 (June 2024) +# dscore 1.9.0 ### Overview diff --git a/_pkgdown.yml b/_pkgdown.yml index a6101d8..4d131ff 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -47,6 +47,7 @@ reference: desc: > For research purposes only. contents: + - count_mu - count_mu_dutch - count_mu_gcdg - count_mu_phase1 diff --git a/docs/404.html b/docs/404.html index 5fe7598..8372c9a 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/LICENSE.html b/docs/LICENSE.html index 0ffde82..eabe9d7 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -17,7 +17,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/articles/getting_started.html b/docs/articles/getting_started.html index 8fc5284..27f5d0a 100644 --- a/docs/articles/getting_started.html +++ b/docs/articles/getting_started.html @@ -33,7 +33,7 @@ dscore - 1.8.9 + 1.9.0 @@ -3584,7 +3584,7 @@

Summarise D-score and DAZlibrary(dplyr) r <- builtin_references |> - filter(name == "dutch") |> + filter(population == "dutch") |> select(age, SDM2, SD0, SDP2) ggplot(md, aes(x = a, y = d, group = id, color = sex)) + diff --git a/docs/articles/index.html b/docs/articles/index.html index 397d05b..ea94690 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -17,7 +17,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/articles/scoring_GSED.html b/docs/articles/scoring_GSED.html index cab818a..c83db22 100644 --- a/docs/articles/scoring_GSED.html +++ b/docs/articles/scoring_GSED.html @@ -33,7 +33,7 @@ dscore - 1.8.9 + 1.9.0 @@ -101,10 +101,10 @@

D-score and DAZ
    -
  1. Online calculator. The online Shiny app https://tnochildhealthstatistics.shinyapps.io/dcalculator/ -is a convenient option for users not familiar with R. The -app contains online documentation and instructions and will not be -further discussed here.
  2. +
  3. Online calculator. The online app D-score +calculator is a convenient option for users not familiar with +R. The app contains online documentation and instructions +and will not be further discussed here.
  4. R package dscore. The R package dscore at https://CRAN.R-project.org/package=dscore is a flexible @@ -118,8 +118,8 @@

    PreliminariesGetting -Started with R site;

  5. +consult the R for Data Science +book by Hadley Wickham and Garrett Grolemund;
  6. You need to install the R package dscore on your local machine;
  7. The child data need to be stored as a data.frame, a @@ -976,16 +976,16 @@

    Phase 1 references and DAZ
     library(dplyr, warn.conflicts = FALSE, quietly = TRUE)
     ref <- builtin_references |>
    -  filter(name == "phase1") |>
    -  select(name, age, mu, sigma, nu, tau, SDM2, SD0, SDP2)
    +  filter(population == "phase1") |>
    +  select(population, age, mu, sigma, nu, tau, SDM2, SD0, SDP2)
     head(ref)
    -
    ##     name    age    mu  sigma     nu    tau     SDM2      SD0     SDP2
    -## 1 phase1 0.0383 13.68 0.2456 1.1731 15.422 6.042690 13.68707 20.71620
    -## 2 phase1 0.0575 14.36 0.2324 1.2062 15.540 6.699401 14.36568 21.30880
    -## 3 phase1 0.0767 15.02 0.2206 1.2375 15.652 7.354450 15.02457 21.88555
    -## 4 phase1 0.0958 15.68 0.2100 1.2670 15.758 8.014796 15.68368 22.47481
    -## 5 phase1 0.1150 16.35 0.2005 1.2951 15.860 8.680976 16.35299 23.09062
    -## 6 phase1 0.1342 17.03 0.1917 1.3218 15.957 9.363085 17.03241 23.72268
    +
    ##   population    age    mu  sigma     nu    tau     SDM2      SD0     SDP2
    +## 1     phase1 0.0383 13.68 0.2456 1.1731 15.422 6.042690 13.68707 20.71620
    +## 2     phase1 0.0575 14.36 0.2324 1.2062 15.540 6.699401 14.36568 21.30880
    +## 3     phase1 0.0767 15.02 0.2206 1.2375 15.652 7.354450 15.02457 21.88555
    +## 4     phase1 0.0958 15.68 0.2100 1.2670 15.758 8.014796 15.68368 22.47481
    +## 5     phase1 0.1150 16.35 0.2005 1.2951 15.860 8.680976 16.35299 23.09062
    +## 6     phase1 0.1342 17.03 0.1917 1.3218 15.957 9.363085 17.03241 23.72268

    The columns mu, sigma, nu and tau are the age-varying parameters of a Box-Cox \(t\) (BCT) distribution.

    The script below creates a figure with -2SD, 0SD and +2SD centiles @@ -996,7 +996,7 @@

    Phase 1 references and DAZlibrary(patchwork) r <- builtin_references |> - filter(name == "phase1" & age <= 3.5) |> + filter(population == "phase1" & age <= 3.5) |> mutate(m = age * 12) lf2$ins <- "lf" diff --git a/docs/authors.html b/docs/authors.html index 472bac5..3f1c2af 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -17,7 +17,7 @@ dscore - 1.8.9 + 1.9.0 @@ -82,13 +82,18 @@

    Citation

    -

    Van Buuren S, Eekhout I, Huizing A (2024). D-score for Child Development. The dscore R package, version 1.9.0.

    -
    @Manual{dscore-package,
    -  title = {D-score for Child Development},
    -  author = {S. {van Buuren} and I. Eekhout and A. Huizing},
    -  year = {2024},
    -  note = {R package version 1.9.0},
    -  url = {https://github.com/d-score/dscore},
    +    

    van Buuren S, Eekhout I (2023). +Child Development with the D-score. +CRC Press, Boca Raton, FL. +doi:10.1201/9781003216315. +

    +
    @Book{,
    +  title = {Child Development with the D-score},
    +  author = {Stef {van Buuren} and Iris Eekhout},
    +  year = {2023},
    +  publisher = {CRC Press},
    +  address = {Boca Raton, FL},
    +  doi = {https://doi.org/10.1201/9781003216315},
     }
    diff --git a/docs/index.html b/docs/index.html index 6a90f82..6f7f09b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,7 +12,7 @@ - + -

    The D-score is a numerical score that measures generic development in children. You may use the D-score to analyze and predict development of children similar to measures like height and weight.

    +

    The D-score is a numerical score that measures generic development in children. Use the D-score to analyze and predict early development of children similar to measures like height and weight.

    The dscore package contains tools to

    • Map your item names to the GSED convention
    • @@ -104,7 +104,7 @@

      Installation

      Overview

      -

      You may estimate the D-score and the D-score age-adjusted Z-score (DAZ) from child data on developmental milestones. Four steps are needed:

      +

      You may estimate the D-score and the Development-for-Age Z-score (DAZ) from child data on developmental milestones. Four steps are needed:

      1. Identify whether the dscore package covers your measurement instrument;
      2. Map your variable names to the GSED 9-position schema;
      3. @@ -131,7 +131,7 @@

        Keys
        1. Project with dutch key, 0-2 years: van Buuren (2014)
        2. Project with gcdg key: Weber et al. (2019)
        3. -
        4. Project with gsed key: GSED team (Maureen Black, Kieran Bromley, Vanessa Cavallera (lead author), Jorge Cuartas, Tarun Dua (corresponding author), Iris Eekhout, Günther Fink, Melissa Gladstone, Katelyn Hepworth, Magdalena Janus, Patricia Kariger, Gillian Lancaster, Dana McCoy, Gareth McCray, Abbie Raikes, Marta Rubio-Codina, Stef van Buuren, Marcus Waldman, Susan Walker and Ann Weber) (2019)
        5. +
        6. Project with gsed keys: World Health Organization (WHO) (2023)
        @@ -151,8 +151,8 @@

        Shiny app

        Acknowledgement

        -

        This study was supported by the Bill & Melinda Gates Foundation. The contents are the sole responsibility of the authors and may not necessarily represent the official views of the Bill & Melinda Gates Foundation or other agencies that may have supported the primary data studies used in the present study.

        The authors wish to recognize the principal investigators and their study team members for their generous contribution of the data that made this tool possible and the members of the Ki team who directly or indirectly contributed to the study: Amina Abubakar, Claudia R. Lindgren Alves, Orazio Attanasio, Maureen M. Black, Maria Caridad Araujo, Susan M. Chang-Lopez, Gary L. Darmstadt, Bernice M. Doove, Wafaie Fawzi, Lia C.H. Fernald, Günther Fink, Emanuela Galasso, Melissa Gladstone, Sally M. Grantham-McGregor, Cristina Gutierrez de Pineres, Pamela Jervis, Jena Derakhshani Hamadani, Charlotte Hanlon, Simone M. Karam, Gillian Lancaster, Betzy Lozoff, Gareth McCray, Jeffrey R Measelle, Girmay Medhin, Ana M. B. Menezes, Lauren Pisani, Helen Pitchik, Muneera Rasheed, Lisy Ratsifandrihamanana, Sarah Reynolds, Linda Richter, Marta Rubio-Codina, Norbert Schady, Limbika Sengani, Chris Sudfeld, Marcus Waldman, Susan P. Walker, Ann M. Weber and Aisha K. Yousafzai.

        +

        This study was supported by the Bill & Melinda Gates Foundation. The contents are the sole responsibility of the authors and may not necessarily represent the official views of the Bill & Melinda Gates Foundation or other agencies that may have supported the primary data studies used in the present study.

        -
        -GSED team (Maureen Black, Kieran Bromley, Vanessa Cavallera (lead author), Jorge Cuartas, Tarun Dua (corresponding author), Iris Eekhout, Günther Fink, Melissa Gladstone, Katelyn Hepworth, Magdalena Janus, Patricia Kariger, Gillian Lancaster, Dana McCoy, Gareth McCray, Abbie Raikes, Marta Rubio-Codina, Stef van Buuren, Marcus Waldman, Susan Walker and Ann Weber). 2019. “The Global Scale for Early Development (GSED).” Early Childhood Matters. https://earlychildhoodmatters.online/2019/the-global-scale-for-early-development-gsed/. -
        Jacobusse, G., and S. van Buuren. 2007. “Computerized Adaptive Testing for Measuring Development of Young Children.” Statistics in Medicine 26 (13): 2629–38. https://stefvanbuuren.name/publication/jacobusse-2007/.
        @@ -175,6 +172,9 @@

        Literature Weber, A. M., M. Rubio-Codina, S. P. Walker, S. van Buuren, I. Eekhout, S. Grantham-McGregor, M. C. Araujo, et al. 2019. “The D-Score: A Metric for Interpreting the Early Development of Infants and Toddlers Across Global Settings.” BMJ Global Health 4: e001724. https://gh.bmj.com/content/bmjgh/4/6/e001724.full.pdf.

        +
        +World Health Organization (WHO). 2023. “Global Scales for Early Development (GSED) V1.0: Technical Report.” Geneva: World Health Organization. +
        @@ -222,7 +222,7 @@

        Dev status

      4. Lifecycle: maturing
      5. CRAN status
      6. -
      7. +

    diff --git a/docs/news/index.html b/docs/news/index.html index af39720..fb7f96c 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -17,7 +17,7 @@ dscore - 1.8.9 + 1.9.0 @@ -61,60 +61,57 @@

    Changelog

    - -
    • -

      Updates the phase1_healthy age-conditional D-score references with three changes:

      -
      1. D-score estimation uses the new model 20240601 with correct scale factor
      2. -
      3. Calculates the D-score for SF and LF separately (not combined)
      4. -
      5. Tunes the GAMSLSS model to fit the healthy subsample
      6. -

      Use population = "phase1_healthy" to calculate DAZ relative to this new reference. The new reference is based on healthy children only, and is currently experimental. The current reference "phase1" remains the default for now, but may be superseeded by "phase1_healthy" in a future version.

      -
    • -
    • Simplifies the spelling of the term “D-score” to improve consistency and readability

    • -
    • Removes dependency on tidyselect

    • -
    • Replaces magrittr pipe %>% by base pipe |>

    • -
    • Make style more consistent with styler

    • -
    -
    - -
    • BREAKING CHANGE: Adds an algorithm argument to dscore() and dscore_posterior() to select the algorithm used to calculate the D-score. The default algorithm, called "current", correctly uses a scale factor of 1 for calculation in the logistic metric. Previously, a scale factor of 1 was errroneously applied to the D-score metric. The current algorithm results in different D-score estimates and higher SEM estimates, but is preferred to the former method. For backward-compatibility to dscore 1.8.7 and earlier, use algorithm = "1.8.7".
    • -
    -
    - -
    • Adds new reference "phase1_healthy" calculated from selective subsample of the GSED Phase 1 data using the “gsed2212” key. This reference is based on the same data as the "phase1" reference, but only includes children who were developing well at the time of the assessment. This reference is intended for use in studies where the population of interest is healthy children. Note: This is a temporary name and will be deprecated.
    • -
    -
    - -
    • Adds reference "dutch_gsed2212" calculated from Dutch data using the “gsed2212” key. Note: This is a temporary name and will be deprecated.
    • -
    -
    - -
    • + +
      +

      Overview

      +

      This is a major update of the dscore package featuring: - a new default reference "preliminary_standards" - a correction of an issue with the scaling factor - a major clean-up of the itembank, references, keys, and R code - improved documentation and examples

      +
      +
      +

      Major issues

      +

      BREAKING CHANGE: On May 31, 2024 we detected a long-time error in the calculation of the D-score resulting from an incorrect scale factor that led us to believe that item characteristic curves are steeper than the actually are. The impact of the error on the result is as follows: 1) There is no effect on the difficulty estimates of the Rasch models, 2) The D-score estimates are slightly altered but changes are small, 3) The references are largely unaffected and need not to be redone, 4) The estimates of the SEMs can differ substantially, so inferences based on the SEMs should be re-evaluated, 5) When there were changes in the analyses, the results in the newer method look smoother and are preferred. The correction appeared in the development version dscore 1.8.8, and is now incorporated into release dscore 1.9.0. For backward compatibility to dscore 1.8.7 and earlier, use the argument algorithm = "1.8.7" in calls to the dscore() function.

      +

      BREAKING CHANGE: dscore_posterior() now returns a data.frame with column names that indicate the quadrature point. This was an unnamed matrix. Code that expects a matrix as the return of dscore_posterior() may need to be adapted.

      +

      NEW DEFAULT KEY: Adds a new reference "preliminary_standards" calculated from selected subsample of the GSED Phase 1 data, and makes these the default in this release. The reference is a temporary stand-in for a future norm-based standard for normal early child development. This reference replaces the temporary reference "phase1_healthy" that was introduced in dscore 1.8.7. Compared to the "phase1" reference, the "preliminary_standards" reference has the following differences: 1) D-score estimation uses the new model 20240601 with correct scale factor, 2) Calculates the D-score for SF and LF separately (not combined), 3) Tunes the GAMSLSS model to fit the healthy subsample. The "phase1_healthy" object is removed.

      +
      +
      +

      Major changes

      +
      • Adds a new age-conditional reference for population "dutch" calculated using the "gsed2212" key.
      • +
      • Defines a new key "gsed2406" to accomodate for the changed prior mean because of the adoption of the new reference "preliminary_standards" as the base population. The key "gsed2406" is identical to "gsed2212", and is the default key in this release.
      • +
      • Adds a new builtin_keys table that contains proper defaults for the base reference, transformation and quadrature points per key
      • +
      • Indexed a reference now by two fields: key and population. Previously the index was based on only population. This change allows for multiple references per key, and for references created for the same population under different keys. The key field is now mandatory in the reference table.
      • +
      • Adds a verbose option to dscore(), dscore_posterior(), get_age_equivalent(), get_reference(), get_tau(), daz() and zad() to print progress messages to the console on the values of key, population, transform, qp and algorithm. This is useful for debugging and for understanding the behavior of the functions.
      • +
      • Cleans up the R code to take advantage of the specification made in the new builtin_keys table. This makes the code more readable and maintainable.
      • +
      • Retires keys sf2206, lf2206, 294_0, gsed2206, gsed2208 and removes from the builtin_itembank.
      • +
      • dscore() and dscore_posterior() can now copy variables from the input data into the output through the prepend argument. (#46)
      • -
      • BREAKING CHANGE: dscore_posterior() now returns a data.frame with column names that indicate the quadrature point. This was an unnamed matrix. Code that expects a matrix as the return of dscore_posterior() may need to be adapted.
      • -
      -
      - -
      • Per request from CRAN (Specified C++11: please drop specification unless essential), removes a C++11 specification
      -
      - -
      • Sets the default reference in get_reference() to phase1 to remain in sync with the default key = "gsed" +
        +

        Minor changes

        +
        • Simplifies the package DESCRIPTION file
        • +
        • New internal init_key() and set_default_xxx() functions to regulate values for key, population, transform and qp arguments
        • +
        • Renames the files in data-raw/data/keys to more consistent names, adapts data-raw/R/save_builtin_itembank.R to reflect model history, and rebuilds builtin_itembank +
        • +
        • Removes the dependency on tibble and tidyselect, and replaces the dependency on stringr by the lighter stringi +
        • +
        • Rename the argument name reference to reference_table in daz() and zad() to avoid confusion with the references argument in get_reference()
        • +
        • Simplifies the spelling of the term “D-score” to improve consistency and readability
        • +
        • Replaces magrittr pipe %>% by base pipe |> +
        • +
        • Make style more consistent with styler +
        • +
        • Per request from CRAN (Specified C++11: please drop specification unless essential), removes a C++11 specification
        • Moves error evasion code into internal pBCT()
        • Document up-rounding to a D-score of 1 or higher when daz() and zad() using the BCT transformation for positive values
        • Removes the superfluous names attribute from the return value of daz() and zad()
        • -
        -
        - -
        • Evades an error produced by internal pBCT() when is.na(nu) is TRUE +
        • Evades an error produced by internal pBCT() when is.na(nu) is TRUE
        • +
        • Renames GSED HH to GSED HF
        • +
        • Change CITATION file to use the bibtex package
        • +
        • Moved all keys to the data-raw/data/keys folder and renamed them to improve readability
        -
        - -
        • Renames GSED HH to GSED HF
        • -
        +
      diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 81c4374..2a75bc5 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: getting_started: getting_started.html scoring_GSED: scoring_GSED.html -last_built: 2024-06-12T14:58Z +last_built: 2024-06-12T20:41Z urls: reference: https://d-score.github.io/dscore/reference article: https://d-score.github.io/dscore/articles diff --git a/docs/reference/builtin_itembank.html b/docs/reference/builtin_itembank.html index 5467c25..7de0000 100644 --- a/docs/reference/builtin_itembank.html +++ b/docs/reference/builtin_itembank.html @@ -20,7 +20,7 @@ dscore - 1.8.9 + 1.9.0
      diff --git a/docs/reference/builtin_itemtable.html b/docs/reference/builtin_itemtable.html index 5a00212..90a14a4 100644 --- a/docs/reference/builtin_itemtable.html +++ b/docs/reference/builtin_itemtable.html @@ -18,7 +18,7 @@ dscore - 1.8.9 + 1.9.0
      diff --git a/docs/reference/builtin_keys.html b/docs/reference/builtin_keys.html index 215565e..b78b25d 100644 --- a/docs/reference/builtin_keys.html +++ b/docs/reference/builtin_keys.html @@ -19,7 +19,7 @@ dscore - 1.8.9 + 1.9.0
    @@ -75,7 +75,7 @@

    Available keys for calculating the D-score

    Format

    -

    builtin_keys is a data.frame with variables:

    NameLabel
    keyString. Name of the key indicating the Rasch model
    default_referenceString. Name of the default reference for the key
    n_itemsNumber of items in the key
    n_instrumentsNumber of instruments in the key
    interceptIntercept to convert logit into D-score
    slopeSlope to convert logit into D-score
    fromStarting value of the quadrature points
    toStopping value of the quadrature points
    byIncrement of the quadrature points
    retiredHas the key been retired?
    +

    builtin_keys is a data.frame with variables:

    NameLabel
    keyString. Name of the key indicating the Rasch model
    base_populationString. Name of the base population for the key
    n_itemsNumber of items in the key
    n_instrumentsNumber of instruments in the key
    interceptIntercept to convert logit into D-score
    slopeSlope to convert logit into D-score
    fromStarting value of the quadrature points
    toStopping value of the quadrature points
    byIncrement of the quadrature points
    retiredHas the key been retired?

    Note

    20240609 SvB: Added builtin_keys table by diff --git a/docs/reference/builtin_references.html b/docs/reference/builtin_references.html index 5a96e49..a441e1f 100644 --- a/docs/reference/builtin_references.html +++ b/docs/reference/builtin_references.html @@ -23,7 +23,7 @@ dscore - 1.8.9 + 1.9.0

    @@ -83,10 +83,11 @@

    Collection of age-conditional reference distributions

    Format

    -

    A data.frame with the following variables:

    NameLabel
    nameName of the reference
    keyD-score key: "dutch", "gcdg" or "gsed2212"
    distributionDistribution family: "LMS" or "BCT"
    ageDecimal age in years
    muM-curve, median D-score, P50
    sigmaS-curve, spread expressed as coefficient of variation
    nuL-curve, the lambda coefficient of the LMS/BCT model for skewness
    tauKurtosis parameter in the BCT model
    P3P3 percentile
    P10P10 percentile
    P25P25 percentile
    P50P50 percentile
    P75P75 percentile
    P90P90 percentile
    P97P97 percentile
    SDM2-2SD centile
    SDM1-1SD centile
    SD00SD centile, median
    SDP1+1SD centile
    SDP2+2SD centile
    +

    A data.frame with the following variables:

    NameLabel
    populationName of the reference population
    keyD-score key, e.g., "dutch", "gcdg" or "gsed"
    distributionDistribution family: "LMS" or "BCT"
    ageDecimal age in years
    muM-curve, median D-score, P50
    sigmaS-curve, spread expressed as coefficient of variation
    nuL-curve, the lambda coefficient of the LMS/BCT model for skewness
    tauKurtosis parameter in the BCT model
    P3P3 percentile
    P10P10 percentile
    P25P25 percentile
    P50P50 percentile
    P75P75 percentile
    P90P90 percentile
    P97P97 percentile
    SDM2-2SD centile
    SDM1-1SD centile
    SD00SD centile, median
    SDP1+1SD centile
    SDP2+2SD centile

    Details

    -

    The "dutch" references were calculated from the SMOCC data, and cover +

    Here are more details on the reference population: +The "dutch" references were calculated from the SMOCC data, and cover age range 0-2.5 years (van Buuren, 2014). The "gcdg" references were calculated from the 15 cohorts of the GCDG-study, and cover age range 0-5 years (Weber, 2019). @@ -125,7 +126,7 @@

    See also

    Examples

    # get an overview of available references per key
    -table(builtin_references$name, builtin_references$key)
    +table(builtin_references$population, builtin_references$key)
     #>                        
     #>                         293_0 dutch gcdg gsed1912 gsed2212 gsed2406
     #>   dutch                     0   144    0        0      185      185
    diff --git a/docs/reference/calculate_posterior.html b/docs/reference/calculate_posterior.html
    index 031ba70..612eb15 100644
    --- a/docs/reference/calculate_posterior.html
    +++ b/docs/reference/calculate_posterior.html
    @@ -18,7 +18,7 @@
           
           
             dscore
    -        1.8.9
    +        1.9.0
           
         
    diff --git a/docs/reference/count_mu.html b/docs/reference/count_mu.html new file mode 100644 index 0000000..98099e2 --- /dev/null +++ b/docs/reference/count_mu.html @@ -0,0 +1,120 @@ + +Median D-score from the default references for the given key — count_mu • dscore + + +
    +
    + + + +
    +
    + + +
    +

    Returns the age-interpolated median of the D-score of the default +reference for a given key.

    +
    + +
    +
    count_mu(t, key)
    +
    + +
    +

    Arguments

    +
    t
    +

    Decimal age, numeric vector

    + + +
    key
    +

    Character, key of the reference population

    + +
    +
    +

    Value

    + + +

    A vector of length length(t) with the median of the default reference +population for the key.

    +
    +
    +

    Details

    +

    Do not use this function if you want the median D-score for a specific +reference.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.9.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/count_mu_dutch.html b/docs/reference/count_mu_dutch.html index bfb350c..920f296 100644 --- a/docs/reference/count_mu_dutch.html +++ b/docs/reference/count_mu_dutch.html @@ -19,7 +19,7 @@ dscore - 1.8.9 + 1.9.0
    diff --git a/docs/reference/count_mu_gcdg.html b/docs/reference/count_mu_gcdg.html index 73c24bf..eb9d2d4 100644 --- a/docs/reference/count_mu_gcdg.html +++ b/docs/reference/count_mu_gcdg.html @@ -19,7 +19,7 @@ dscore - 1.8.9 + 1.9.0
    diff --git a/docs/reference/count_mu_phase1.html b/docs/reference/count_mu_phase1.html index a530a64..ce6de1a 100644 --- a/docs/reference/count_mu_phase1.html +++ b/docs/reference/count_mu_phase1.html @@ -19,7 +19,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/count_mu_preliminary_standards.html b/docs/reference/count_mu_preliminary_standards.html index 8db17af..b529a4b 100644 --- a/docs/reference/count_mu_preliminary_standards.html +++ b/docs/reference/count_mu_preliminary_standards.html @@ -19,7 +19,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/daz.html b/docs/reference/daz.html index 1c76664..4be5b79 100644 --- a/docs/reference/daz.html +++ b/docs/reference/daz.html @@ -19,7 +19,7 @@ dscore - 1.8.9 + 1.9.0 @@ -88,7 +88,7 @@

    Arguments

    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 default_reference field in dscore::builtin_keys.

    +as specified in the base_population field in dscore::builtin_keys.

    dec
    @@ -147,8 +147,8 @@

    Examples

    # print out names of the used reference table daz(d = c(35, 50), x = c(0.5, 1.0), verbose = TRUE) -#> key: gsed2406 -#> name: preliminary_standards +#> key: gsed2406 +#> population: preliminary_standards #> [1] 0.496 0.219 # using the default reference in key gcdg @@ -157,9 +157,9 @@

    Examples

    #> [1] -0.425 0.299 # using Dutch reference in default key -reftab <- get_reference(name = "dutch", verbose = TRUE) -#> key: gsed2406 -#> name: dutch +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 @@ -168,15 +168,15 @@

    Examples

    # population median at ages 0.5, 1 and 2 years, gcdg key reftab <- get_reference(key = "gcdg", verbose = TRUE) -#> key: gcdg -#> name: gcdg +#> 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 -#> name: dutch +#> key: dutch +#> population: dutch zad(z = rep(0, 3), x = c(0.5, 1, 2), reference = reftab) #> [1] 35.27 48.91 63.77
    diff --git a/docs/reference/decompose_itemnames.html b/docs/reference/decompose_itemnames.html index bcbc161..3b6caed 100644 --- a/docs/reference/decompose_itemnames.html +++ b/docs/reference/decompose_itemnames.html @@ -18,7 +18,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/dscore-package.html b/docs/reference/dscore-package.html index 34ba3b9..abf1075 100644 --- a/docs/reference/dscore-package.html +++ b/docs/reference/dscore-package.html @@ -19,7 +19,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/dscore.html b/docs/reference/dscore.html index 27b4707..14ef2b2 100644 --- a/docs/reference/dscore.html +++ b/docs/reference/dscore.html @@ -20,7 +20,7 @@ dscore - 1.8.9 + 1.9.0 @@ -76,7 +76,7 @@

    D-score estimation

    data, items = names(data), key = NULL, - name = NULL, + population = NULL, xname = "age", xunit = c("decimal", "days", "months"), prepend = NULL, @@ -86,7 +86,6 @@

    D-score estimation

    prior_sd = NULL, transform = NULL, qp = NULL, - population = NULL, dec = c(2L, 3L), relevance = c(-Inf, Inf), algorithm = c("current", "1.8.7"), @@ -97,7 +96,7 @@

    D-score estimation

    data, items = names(data), key = NULL, - name = NULL, + population = NULL, xname = "age", xunit = c("decimal", "days", "months"), prepend = NULL, @@ -107,7 +106,6 @@

    D-score estimation

    prior_sd = NULL, transform = NULL, qp = NULL, - population = NULL, dec = c(2L, 3L), relevance = c(-Inf, Inf), algorithm = c("current", "1.8.7"), @@ -139,10 +137,10 @@

    Arguments

    of the available keys.

    -
    name
    -

    String. The name of the reference to calculate DAZ. -Use unique(builtin_references$name) to obtain the set of currently -available references.

    +
    population
    +

    String. The name of the reference population to calculate DAZ. +Use unique(builtin_references$population) to obtain the set of currently +available reference populations.

    xname
    @@ -180,7 +178,7 @@

    Arguments

    refer to a column name in data with user-supplied values of the prior mean for each observation. If a numeric scalar, it is used as the prior mean for all observations. The default (NULL) will consult the -default_reference field in builtin_keys, and use the corresponding +base_population field in builtin_keys, and use the corresponding median of that reference as prior mean for the D-score.

    @@ -205,11 +203,6 @@

    Arguments

    arguments from builtin_keys.

    -
    population
    -

    A string describing the population of the -reference distribution.

    - -
    dec

    A vector of two integers specifying the number of decimals for rounding the D-score and DAZ, respectively. @@ -261,15 +254,12 @@

    Details

    the advice is to use the default, which currently is "gsed2406".

    The default starting prior is a mean calculated from a so-called "Count model" that describes mean D-score as a function of age. The -Count models are stored as functions -count_mu_preliminary_standards() -count_mu_phase1(), -count_mu_gcdg() and -count_mu_dutch(). The spread of the starting prior -is 5 D-score points around this mean D-score, which corresponds to +The Count models are implemented in the function [count_mu()]. +By default, the spread of the starting prior +is 5 D-score points around the mean D-score, which corresponds to approximately 1.5 to 2 times the normal spread of child of a given age. The -starting prior is somewhat informative for very short test (say <5 items) -and uninformative for large number of items (say >10 items).

    +starting prior is informative for very short test (say <5 items), but has +little impact on the posterior for larger tests.

    References

    @@ -325,7 +315,7 @@

    Examples

    # third item is not part of the default key get_tau(items, verbose = TRUE) -#> key: gsed2406 +#> key: gsed2406 #> ddifmd001 ddicmm029 ddigmd053 #> 8.61 8.47 NA @@ -379,8 +369,8 @@

    Examples

    # plot P10, P50 and P90 of D-score references g <- expand.grid(age = seq(0.1, 4, 0.1), p = c(0.1, 0.5, 0.9)) d <- zad(z = qnorm(g$p), x = g$age, verbose = TRUE) -#> key: gsed2406 -#> name: preliminary_standards +#> key: gsed2406 +#> population: preliminary_standards matplot( x = matrix(g$age, ncol = 3), y = matrix(d, ncol = 3), type = "l", lty = 1, col = "blue", xlab = "Age (years)", ylab = "D-score", diff --git a/docs/reference/get_age_equivalent.html b/docs/reference/get_age_equivalent.html index fd83b68..e5cf779 100644 --- a/docs/reference/get_age_equivalent.html +++ b/docs/reference/get_age_equivalent.html @@ -18,7 +18,7 @@ dscore - 1.8.9 + 1.9.0
    @@ -72,10 +72,9 @@

    Get age equivalents of items that have a difficulty estimate

    items, pct = c(10, 50, 90), key = NULL, - name = NULL, + population = NULL, transform = NULL, itembank = dscore::builtin_itembank, - population = NULL, xunit = c("decimal", "days", "months"), verbose = FALSE ) @@ -102,10 +101,10 @@

    Arguments

    of the available keys.

    -
    name
    -

    String. The name of the reference to calculate DAZ. -Use unique(builtin_references$name) to obtain the set of currently -available references.

    +
    population
    +

    String. The name of the reference population to calculate DAZ. +Use unique(builtin_references$population) to obtain the set of currently +available reference populations.

    transform
    @@ -122,11 +121,6 @@

    Arguments

    then you should also provide the relevant transform and qp arguments.

    -
    population
    -

    A string describing the population of the -reference distribution.

    - -
    xunit

    A string specifying the unit in which age is measured (either "decimal", "days" or "months"). diff --git a/docs/reference/get_itemnames.html b/docs/reference/get_itemnames.html index 4223325..0316dba 100644 --- a/docs/reference/get_itemnames.html +++ b/docs/reference/get_itemnames.html @@ -19,7 +19,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/get_itemtable.html b/docs/reference/get_itemtable.html index 6c2caed..ea32a51 100644 --- a/docs/reference/get_itemtable.html +++ b/docs/reference/get_itemtable.html @@ -21,7 +21,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/get_labels.html b/docs/reference/get_labels.html index b2b94c8..16d0275 100644 --- a/docs/reference/get_labels.html +++ b/docs/reference/get_labels.html @@ -18,7 +18,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/get_reference.html b/docs/reference/get_reference.html index c430daf..1c1eba8 100644 --- a/docs/reference/get_reference.html +++ b/docs/reference/get_reference.html @@ -18,7 +18,7 @@ dscore - 1.8.9 + 1.9.0 @@ -69,9 +69,8 @@

    Get D-score reference

    get_reference(
    -  name = NULL,
    -  key = NULL,
       population = NULL,
    +  key = NULL,
       references = dscore::builtin_references,
       verbose = FALSE,
       ...
    @@ -80,10 +79,10 @@ 

    Get D-score reference

    Arguments

    -
    name
    -

    String. The name of the reference to calculate DAZ. -Use unique(builtin_references$name) to obtain the set of currently -available references.

    +
    population
    +

    String. The name of the reference population to calculate DAZ. +Use unique(builtin_references$population) to obtain the set of currently +available reference populations.

    key
    @@ -92,11 +91,6 @@

    Arguments

    of the available keys.

    -
    population
    -

    A string describing the population of the -reference distribution.

    - -
    references

    A data.frame with the same structure as builtin_references. The default is to use builtin_references.

    @@ -150,8 +144,8 @@

    See also

    Examples

    -
    # see key-name combinations of builtin_references
    -table(builtin_references$key, builtin_references$name)
    +    
    # see key-population combinations of builtin_references
    +table(builtin_references$key, builtin_references$population)
     #>           
     #>            dutch gcdg phase1 preliminary_standards
     #>   293_0        0    0    186                     0
    @@ -164,7 +158,7 @@ 

    Examples

    # get the default reference reftab <- get_reference() head(reftab, 2) -#> name key distribution age mu sigma nu +#> population key distribution age mu sigma nu #> 944 preliminary_standards gsed2406 BCT 0.0383 13.18 0.2090 1.4212 #> 945 preliminary_standards gsed2406 BCT 0.0575 14.04 0.2016 1.4272 #> tau P3 P10 P25 P50 P75 P90 P97 @@ -176,18 +170,18 @@

    Examples

    # get the default reference for the key "gsed2212" reftab <- get_reference(key = "gsed2212", verbose = TRUE) -#> key: gsed2212 -#> name: phase1 +#> key: gsed2212 +#> population: phase1 # get dutch reference for default key -reftab <- get_reference(name = "dutch", verbose = TRUE) -#> key: gsed2406 -#> name: dutch +reftab <- get_reference(population = "dutch", verbose = TRUE) +#> key: gsed2406 +#> population: dutch # loading a non-existing reference yields zero rows -reftab <- get_reference(name = "france", verbose = TRUE) -#> key: gsed2406 -#> name: france +reftab <- get_reference(population = "france", verbose = TRUE) +#> key: gsed2406 +#> population: france #> Warning: Reference 'france' for key 'gsed2406' not found. nrow(reftab) #> [1] 0 diff --git a/docs/reference/get_tau.html b/docs/reference/get_tau.html index a33ab68..a78001b 100644 --- a/docs/reference/get_tau.html +++ b/docs/reference/get_tau.html @@ -19,7 +19,7 @@ dscore - 1.8.9 + 1.9.0
    diff --git a/docs/reference/gsample.html b/docs/reference/gsample.html index 8b64fd3..9b5e083 100644 --- a/docs/reference/gsample.html +++ b/docs/reference/gsample.html @@ -18,7 +18,7 @@ dscore - 1.8.9 + 1.9.0
    diff --git a/docs/reference/index.html b/docs/reference/index.html index 4ce0c42..4474401 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ dscore - 1.8.9 + 1.9.0
    @@ -136,6 +136,10 @@

    Internal functions

    For research purposes only.

    +

    count_mu()

    + +

    Median D-score from the default references for the given key

    +

    count_mu_dutch()

    Median of Dutch references

    diff --git a/docs/reference/milestones.html b/docs/reference/milestones.html index 4a55759..5523337 100644 --- a/docs/reference/milestones.html +++ b/docs/reference/milestones.html @@ -18,7 +18,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/normalize.html b/docs/reference/normalize.html index 261be83..c45c8a4 100644 --- a/docs/reference/normalize.html +++ b/docs/reference/normalize.html @@ -17,7 +17,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/posterior.html b/docs/reference/posterior.html index 5f9d61a..5e18697 100644 --- a/docs/reference/posterior.html +++ b/docs/reference/posterior.html @@ -17,7 +17,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/rename_gcdg_gsed.html b/docs/reference/rename_gcdg_gsed.html index 9ada805..6868615 100644 --- a/docs/reference/rename_gcdg_gsed.html +++ b/docs/reference/rename_gcdg_gsed.html @@ -18,7 +18,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/sample_hf.html b/docs/reference/sample_hf.html index ea963f3..0cedb0a 100644 --- a/docs/reference/sample_hf.html +++ b/docs/reference/sample_hf.html @@ -18,7 +18,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/sample_lf.html b/docs/reference/sample_lf.html index 5f92145..d3b194d 100644 --- a/docs/reference/sample_lf.html +++ b/docs/reference/sample_lf.html @@ -18,7 +18,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/sample_sf.html b/docs/reference/sample_sf.html index dce2f10..ac3da23 100644 --- a/docs/reference/sample_sf.html +++ b/docs/reference/sample_sf.html @@ -18,7 +18,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/reference/sort_itemnames.html b/docs/reference/sort_itemnames.html index f6e06ff..5d2ed69 100644 --- a/docs/reference/sort_itemnames.html +++ b/docs/reference/sort_itemnames.html @@ -19,7 +19,7 @@ dscore - 1.8.9 + 1.9.0 diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 500acfa..fe7504e 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -39,6 +39,9 @@ https://d-score.github.io/dscore/reference/calculate_posterior.html + + https://d-score.github.io/dscore/reference/count_mu.html + https://d-score.github.io/dscore/reference/count_mu_dutch.html