diff --git a/.Rbuildignore b/.Rbuildignore index a46fd5ec..fb3f65c4 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -14,3 +14,6 @@ ^cran-comments\.Rmd$ ^CRAN-RELEASE$ ^CRAN-SUBMISSION$ +^.github$ +^\.vscode$ +^[.]?air[.]toml$ diff --git a/.github/workflows/rhub.yaml b/.github/workflows/rhub.yaml new file mode 100644 index 00000000..74ec7b05 --- /dev/null +++ b/.github/workflows/rhub.yaml @@ -0,0 +1,95 @@ +# R-hub's generic GitHub Actions workflow file. It's canonical location is at +# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml +# You can update this file to a newer version using the rhub2 package: +# +# rhub::rhub_setup() +# +# It is unlikely that you need to modify this file manually. + +name: R-hub +run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}" + +on: + workflow_dispatch: + inputs: + config: + description: 'A comma separated list of R-hub platforms to use.' + type: string + default: 'linux,windows,macos' + name: + description: 'Run name. You can leave this empty now.' + type: string + id: + description: 'Unique ID. You can leave this empty now.' + type: string + +jobs: + + setup: + runs-on: ubuntu-latest + outputs: + containers: ${{ steps.rhub-setup.outputs.containers }} + platforms: ${{ steps.rhub-setup.outputs.platforms }} + + steps: + # NO NEED TO CHECKOUT HERE + - uses: r-hub/actions/setup@v1 + with: + config: ${{ github.event.inputs.config }} + id: rhub-setup + + linux-containers: + needs: setup + if: ${{ needs.setup.outputs.containers != '[]' }} + runs-on: ubuntu-latest + name: ${{ matrix.config.label }} + strategy: + fail-fast: false + matrix: + config: ${{ fromJson(needs.setup.outputs.containers) }} + container: + image: ${{ matrix.config.container }} + + steps: + - uses: r-hub/actions/checkout@v1 + - uses: r-hub/actions/platform-info@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/setup-deps@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/run-check@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + + other-platforms: + needs: setup + if: ${{ needs.setup.outputs.platforms != '[]' }} + runs-on: ${{ matrix.config.os }} + name: ${{ matrix.config.label }} + strategy: + fail-fast: false + matrix: + config: ${{ fromJson(needs.setup.outputs.platforms) }} + + steps: + - uses: r-hub/actions/checkout@v1 + - uses: r-hub/actions/setup-r@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} + - uses: r-hub/actions/platform-info@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/setup-deps@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} + - uses: r-hub/actions/run-check@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 00000000..0ba82305 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,43 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: '.' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index a76de355..2f892cb2 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ doc .Rdata .httr-oauth .DS_Store + +/.quarto/ diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..344f76eb --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "Posit.air-vscode" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..a0ce726e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "[r]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "Posit.air-vscode" + }, + "[quarto]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "quarto.quarto" + } +} \ No newline at end of file diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index 7475cf45..18aab520 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ -Version: 1.8.0 -Date: 2023-01-20 09:19:22 UTC -SHA: bc2651de37613b4351adf40dc2b17f7e87827287 +Version: 2.0.0 +Date: 2025-10-02 16:31:06 UTC +SHA: f23b8b90b688ac77270b5052454329888875d542 diff --git a/DESCRIPTION b/DESCRIPTION index 57decee6..4ca7eae8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,46 +1,46 @@ Package: dscore Type: Package Title: D-Score for Child Development -Version: 1.8.7 +Version: 2.0.5 Authors@R: c(person("Stef", "van Buuren", email = "stef.vanbuuren@tno.nl", role = c("cre", "aut")), person("Iris", "Eekhout", email = "iris.eekhout@tno.nl", role = "aut"), - person("Arjan", "Huizing", email = "arjan.huizing@tno.nl", role = "aut")) -Description: The D-score is a quantitative measure of child development. - The D-score follows the Rasch model. See Jacobusse, van Buuren and - Verkerk (2006) . The user can convert - milestone scores from many assessment instruments into the D-score - and the DAZ (D-score adjusted for age). Several tools assist in - mapping milestone names into the 9-position Global Scale of Early - Development (GSED) convention. Supports calculation of the D-score - using 'dutch' , - 'gcdg' and 'gsed' conversion keys. - The user can calculate DAZ using 'phase1' (default), 'gcdg' and 'dutch' - age-conditional references. + person("Arjan", "Huizing", email = "arjan.huizing@tno.nl", role = "aut"), + person("Jonathan", "Seiden", email = "jseiden@g.harvard.edu", role = "aut")) +Description: + The D-score summarizes a child's performance on developmental milestones + into a single number. Its key feature is its generic nature. The method + does not depend on a specific measurement instrument. The statistical + method underlying the D-score is described in van Buuren et al. (2025) + . This package implements model keys to + convert milestone scores to D-scores; maps instrument-specific item names + to a generic 9-position naming convention; computes D-scores and their + precision from a child's milestone scores; and converts D-scores to + Development-for-Age Z-scores (DAZ) using age-conditional reference + standards. Depends: - R (>= 3.5) + R (>= 4.1.0) Imports: dplyr (>= 1.0.0), Rcpp, stats, - stringr, - tidyr (>= 1.0.0), - tidyselect (>= 1.0.0) + stringi, + tidyr (>= 1.0.0) LinkingTo: Rcpp, RcppArmadillo Suggests: ggplot2, kableExtra, knitr, lme4, + Matrix, patchwork, rmarkdown, testthat Encoding: UTF-8 -License: AGPL-3 +License: Apache License (>= 2) LazyData: TRUE VignetteBuilder: knitr NeedsCompilation: yes URL: https://github.com/d-score/dscore, https://d-score.org/dscore/, https://d-score.org/dbook1/ BugReports: https://github.com/d-score/dscore/issues -Copyright: Stef van Buuren, Iris Eekhout, Arjan Huizing Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.3 diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index fab6548e..00000000 --- a/LICENSE.md +++ /dev/null @@ -1,659 +0,0 @@ -GNU Affero General Public License -================================= - -_Version 3, 19 November 2007_ -_Copyright (C) 2007 Free Software Foundation, Inc. <>_ - -Everyone is permitted to copy and distribute verbatim copies of this -license document, but changing it is not allowed. - -## Preamble - -The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - -The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains -free software for all its users. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - -Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - -A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - -The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - -An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing -under this license. - -The precise terms and conditions for copying, distribution and -modification follow. - -## TERMS AND CONDITIONS - -### 0. Definitions. - -"This License" refers to version 3 of the GNU Affero General Public -License. - -"Copyright" also means copyright-like laws that apply to other kinds -of works, such as semiconductor masks. - -"The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - -To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of -an exact copy. The resulting work is called a "modified version" of -the earlier work or a work "based on" the earlier work. - -A "covered work" means either the unmodified Program or a work based -on the Program. - -To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - -To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user -through a computer network, with no transfer of a copy, is not -conveying. - -An interactive user interface displays "Appropriate Legal Notices" to -the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - -### 1. Source Code. - -The "source code" for a work means the preferred form of the work for -making modifications to it. "Object code" means any non-source form of -a work. - -A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - -The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - -The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - -The Corresponding Source need not include anything that users can -regenerate automatically from other parts of the Corresponding Source. - -The Corresponding Source for a work in source code form is that same -work. - -### 2. Basic Permissions. - -All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - -You may make, run and propagate covered works that you do not convey, -without conditions so long as your license otherwise remains in force. -You may convey covered works to others for the sole purpose of having -them make modifications exclusively for you, or provide you with -facilities for running those works, provided that you comply with the -terms of this License in conveying all material for which you do not -control copyright. Those thus making or running the covered works for -you must do so exclusively on your behalf, under your direction and -control, on terms that prohibit them from making any copies of your -copyrighted material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the -conditions stated below. Sublicensing is not allowed; section 10 makes -it unnecessary. - -### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - -No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - -When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such -circumvention is effected by exercising rights under this License with -respect to the covered work, and you disclaim any intention to limit -operation or modification of the work as a means of enforcing, against -the work's users, your or third parties' legal rights to forbid -circumvention of technological measures. - -### 4. Conveying Verbatim Copies. - -You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - -### 5. Conveying Modified Source Versions. - -You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these -conditions: - -- a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. -- b) The work must carry prominent notices stating that it is - released under this License and any conditions added under - section 7. This requirement modifies the requirement in section 4 - to "keep intact all notices". -- c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. -- d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - -A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - -### 6. Conveying Non-Source Forms. - -You may convey a covered work in object code form under the terms of -sections 4 and 5, provided that you also convey the machine-readable -Corresponding Source under the terms of this License, in one of these -ways: - -- a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. -- b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the Corresponding - Source from a network server at no charge. -- c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. -- d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. -- e) Convey the object code using peer-to-peer transmission, - provided you inform other peers where the object code and - Corresponding Source of the work are being offered to the general - public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - -A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, -family, or household purposes, or (2) anything designed or sold for -incorporation into a dwelling. In determining whether a product is a -consumer product, doubtful cases shall be resolved in favor of -coverage. For a particular product received by a particular user, -"normally used" refers to a typical or common use of that class of -product, regardless of the status of the particular user or of the way -in which the particular user actually uses, or expects or is expected -to use, the product. A product is a consumer product regardless of -whether the product has substantial commercial, industrial or -non-consumer uses, unless such uses represent the only significant -mode of use of the product. - -"Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to -install and execute modified versions of a covered work in that User -Product from a modified version of its Corresponding Source. The -information must suffice to ensure that the continued functioning of -the modified object code is in no case prevented or interfered with -solely because modification has been made. - -If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - -The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or -updates for a work that has been modified or installed by the -recipient, or for the User Product in which it has been modified or -installed. Access to a network may be denied when the modification -itself materially and adversely affects the operation of the network -or violates the rules and protocols for communication across the -network. - -Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - -### 7. Additional Terms. - -"Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - -Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders -of that material) supplement the terms of this License with terms: - -- a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or -- b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or -- c) Prohibiting misrepresentation of the origin of that material, - or requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or -- d) Limiting the use for publicity purposes of names of licensors - or authors of the material; or -- e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or -- f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions - of it) with contractual assumptions of liability to the recipient, - for any liability that these contractual assumptions directly - impose on those licensors and authors. - -All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; the -above requirements apply either way. - -### 8. Termination. - -You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - -However, if you cease all violation of this License, then your license -from a particular copyright holder is reinstated (a) provisionally, -unless and until the copyright holder explicitly and finally -terminates your license, and (b) permanently, if the copyright holder -fails to notify you of the violation by some reasonable means prior to -60 days after the cessation. - -Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - -Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - -### 9. Acceptance Not Required for Having Copies. - -You are not required to accept this License in order to receive or run -a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - -### 10. Automatic Licensing of Downstream Recipients. - -Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - -An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - -### 11. Patents. - -A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - -A contributor's "essential patent claims" are all patent claims owned -or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - -In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - -If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - -A patent license is "discriminatory" if it does not include within the -scope of its coverage, prohibits the exercise of, or is conditioned on -the non-exercise of one or more of the rights that are specifically -granted under this License. You may not convey a covered work if you -are a party to an arrangement with a third party that is in the -business of distributing software, under which you make payment to the -third party based on the extent of your activity of conveying the -work, and under which the third party grants, to any of the parties -who would receive the covered work from you, a discriminatory patent -license (a) in connection with copies of the covered work conveyed by -you (or copies made from those copies), or (b) primarily for and in -connection with specific products or compilations that contain the -covered work, unless you entered into that arrangement, or that patent -license was granted, prior to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - -### 12. No Surrender of Others' Freedom. - -If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under -this License and any other pertinent obligations, then as a -consequence you may not convey it at all. For example, if you agree to -terms that obligate you to collect a royalty for further conveying -from those to whom you convey the Program, the only way you could -satisfy both those terms and this License would be to refrain entirely -from conveying the Program. - -### 13. Remote Network Interaction; Use with the GNU General Public License. - -Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your -version supports such interaction) an opportunity to receive the -Corresponding Source of your version by providing access to the -Corresponding Source from a network server at no charge, through some -standard or customary means of facilitating copying of software. This -Corresponding Source shall include the Corresponding Source for any -work covered by version 3 of the GNU General Public License that is -incorporated pursuant to the following paragraph. - -Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - -### 14. Revised Versions of this License. - -The Free Software Foundation may publish revised and/or new versions -of the GNU Affero General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever -published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions -of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - -Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - -### 15. Disclaimer of Warranty. - -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND -PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE -DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR -CORRECTION. - -### 16. Limitation of Liability. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR -CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES -ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT -NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR -LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM -TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER -PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -### 17. Interpretation of Sections 15 and 16. - -If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - -END OF TERMS AND CONDITIONS - -## How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these -terms. - -To do so, attach the following notices to the program. It is safest to -attach them to the start of each source file to most effectively state -the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper -mail. - -If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for -the specific requirements. - -You should also get your employer (if you work as a programmer) or -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. For more information on this, and how to apply and follow -the GNU AGPL, see . diff --git a/NAMESPACE b/NAMESPACE index db2baec4..a3936dcf 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,6 @@ # Generated by roxygen2: do not edit by hand +export(count_mu) export(daz) export(decompose_itemnames) export(dscore) @@ -8,15 +9,17 @@ export(get_age_equivalent) export(get_itemnames) export(get_itemtable) export(get_labels) +export(get_mu) export(get_reference) export(get_tau) export(order_itemnames) export(rename_gcdg_gsed) +export(rename_vector) export(sort_itemnames) export(zad) importFrom(Rcpp,sourceCpp) -importFrom(dplyr,"%>%") importFrom(dplyr,.data) +importFrom(dplyr,all_of) importFrom(dplyr,arrange) importFrom(dplyr,bind_cols) importFrom(dplyr,filter) @@ -25,11 +28,11 @@ importFrom(dplyr,intersect) importFrom(dplyr,left_join) importFrom(dplyr,mutate) importFrom(dplyr,n) +importFrom(dplyr,pull) importFrom(dplyr,recode) importFrom(dplyr,select) importFrom(dplyr,slice) importFrom(dplyr,summarise) -importFrom(dplyr,tibble) importFrom(dplyr,ungroup) importFrom(stats,approx) importFrom(stats,dnorm) @@ -40,7 +43,6 @@ importFrom(stats,qlogis) importFrom(stats,qnorm) importFrom(stats,qt) importFrom(stats,weighted.mean) -importFrom(stringr,str_pad) +importFrom(stringi,stri_pad) importFrom(tidyr,pivot_longer) -importFrom(tidyselect,all_of) useDynLib(dscore) diff --git a/NEWS.md b/NEWS.md index 7ddf7d58..7bc4f389 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,58 +4,331 @@ editor_options: wrap: 72 --- -# dscore 1.8.7 +# dscore 2.0.5 + +- Adds support BSID-III (`by3`) to key `gsed2510` (adds 242 items) +- Extends `builtin_itembank` to include BSID-III (`by3`) items in key `gsed2510` +- Updates `builtin_keys` to signal new instrument `by3` for key `gsed2510` +- Updates vignettes to reflect addition of BSID-III (`by3`) instrument +- Update `scoring_GSED` vignette: switch to html_document, improve formatting, update references section, and clarify DAZ calculation standards + +# dscore 2.0.4 + +- Adds support for 48-item version of GSED HF (`gh1`) instrument +- Replaces 55 HF items with 48 HF items in `builtin_itemtable` to + reflect dropping of the first three months form +- Updates `sample_hf` example data to the 48-item HF version +- Adds `hf_48_2406.txt` and `hf_48_2510.txt` key files +- Updates `builtin_itembank` using 48-item version of `gh1` for keys + `gsed2212`, `gsed2404` and `gsed2510`. + +# dscore 2.0.3 + +- Changes the behavior in `get_reference()`: If the user specifies a + builtin population (e.g. `gcdg`, `who_descriptive`) and the key is + not found, then it returns the specified reference for its most + recent key +- Adds an example dataset `triple` for demo purposes + +# dscore 2.0.2 + +- Updates the mu-model for `"who_descriptive"` populations +- Adds tests for minimum and maximum test scores for LF and SF + instruments +- Updates `builtin_keys` and `builtin_references` +- Updates documentation + +# dscore 2.0.1 + +- Added the new D-score reference for `key = "gsed2510"` and + `population = "who_descriptive"`. This reference replaces the + (temporary) `phase1` reference. + ([#62](https://github.com/D-score/dscore/issues/62)). + +# dscore 2.0.0 + +### 🌍 D-score now powered by data from 7 countries! + +- The default key has been updated from `gsed2406` to `gsed2510`. + - `gsed2406` was built from data in three GSED countries. + - `gsed2510` is a major step forward: it incorporates the full + validation study across seven countries (BGD, BRA, CHN, CIV, + NLD, PAK, TZA), giving a richer and more robust foundation. +- What does this mean for you? + - The effect on D-scores is generally modest: in 90% of cases the + difference is less than 1 point, and almost never exceeds 2 + points. + - If you need exact reproducibility with earlier calculations, you + can always choose a previous key from `dscore::builtin_keys` and + pass it explicitly via the key argument in `dscore::dscore()`. + - **NOTE:** To calculate D-scores from instruments other than GSED + SF or GSED LF, specify `key = "gsed2406"` in your `dscore()` + call. Support for additional instruments will be added over + time. +- What else is new? + - Removed legacy keys that are no longer useful + - Removed duplicated instrument codes `gpa` and `gto` + - Streamlined documentation and vignettes for easier navigation + - Laid the groundwork for extending D-score calculations to older + children + - Now licensed under Apache 2.0 - making it easier to use, adapt, + and integrate into your own applications +- Not ready yet? + - Version 1.11.0 remains available as a stable fallback on CRAN, + while version 2.0.0 introduces the new default key for future + analyses. + +# dscore 1.11.0 + +### Overview + +This release brings the following enhancements to the `dscore` package: + +- Adds new item codes for GSED LF and GSED SF +- Better support for D-score calculation using Bayley III +- Uses a more permissive open source license -- 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. - -# dscore 1.8.6 +### Major changes -- Adds reference `"dutch_gsed2212"` calculated from Dutch data using the "gsed2212" key. Note: This is a temporary name and will be deprecated. +- Adds item names starting with `lf` and `sf` to `builtin_itemtable` + to refer to GSED LF and GSED SF, respectively +- Replaces the `by3` key in `gsed2212` and `gsed2406`. The replacement + matches many more by3 items (172 instead of 67), especially for + younger children. Compared to the previous by3 key, it raises the + D-score estimate for by3 by approximately 2.6 D. +- Updates the LICENSE from AGPL to the permissive Apache 2.0 to + conform to Gates Foundation Open Access policy -# dscore 1.8.5 +### Minor changes -- `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. +- Adds support to calculate DAZ for children \< 2 weeks using the + reference `preliminary_standards` +- Makes `rename_vector()` part of the `dscore` package (moved from the + gsedread package) +- Updates the getting started vignette. +- Changes deprecated `arma::is_finite(val)` to `std::isfinite(val)` to + adhere to CRAN policy +- Rebuilds `builtin_itemtable` to resolve problems with SF items 88 + and 89 and LF B43-B51. +- Correct description of A45 Stand on 1 foot \< 5 seconds +- Extends the item table with SF items with mode s (self-report) + - Mode "s" is supported in the `gsed3`, `gsed2` and `gsed` + lexicons + - Adds item with mode "s" and "gs1" instrument codes + - NOTE: there are no gpa-items with mode "s" (gsed2 lexicon) +- It corrects an error in the definition of the gpa item names: + - Renames `gpaclc088` --\> `gpaclc089` (Can you child say five or + more separate words) + - Renames `gpasec089` --\> `gpasec088` (Is your child able to pee + or poo) + +### Breaking changes + +- Retires the key `gsed2212` (soft deprecation). This key is identical + to `gsed2406` (the current default), except that it defines its + default `population` as `phase1` instead of `preliminary_standards`. + If you want the old behavior, specify `key = "gsed2406"` in + combination with `population = "phase1"`. The key `gsed2212` will be + removed in a future release. + +### For developers + +- Adds `.toml` and `.vscode` file\` to enforce air formatting +- Initializes air format on save + +# dscore 1.10.0 + +### Overview + +This release brings two enhancements to the `dscore` package: + +- More flexible options for specifying the prior mean and prior + standard deviation for the D-score calculation, and a new vignette + to demonstrate these options. +- An updated reference of `preliminary_standards` based on a larger + sample from Bangladesh. -# dscore 1.8.4 +### Major changes -- Per request from CRAN (`Specified C++11: please drop specification unless essential`), removes a C++11 specification +- Refreshes `preliminary_standards` with a larger sample from + Bangladesh +- Implements new and more friendly options that add increased + flexibility to specify prior mean and prior standard deviation for + the D-score calculation +- Changes the default `prior_mean_NA` and `prior_sd_NA` to `NULL` (was + 50 and 20). This is a safer option to handle missing ages. The user + can emulate the previous automatic behavior (introduced in + intermediate version dscore 1.9.2) by setting the + `prior_mean_NA = 50` and `prior_sd_NA = 20` arguments to the + `dscore()` function. +- Rebrands `count_mu()` as function `get_mu()` to extract the prior + mean from a reference table. Deprecates `count_mu()`. +- Adds a vignette "Custom Priors (Advanced)" to demonstrate the new + options for specifying the prior mean and prior standard deviation +- Turns ages in `get_mu()` below -1/12 into `NA` values -# dscore 1.8.3 +### Minor changes -- Sets the default reference in `get_reference()` to `phase1` to remain in sync with the default `key = "gsed"` -- 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()` +- Changes `warning("Reference XX for key YY not found."` into + `warning("Reference XX for key YY not found. Using default."` +- Returns `preliminary_standards` from key `gsed2406` in the above + case. +- Some minor edits to the "Understanding and using DAZ" vignette +- Turns `Inf` values in `daz()` into `NA` values +- Turns `NaN` values in SEM into `NA` values +- `dscore()` and `dscore_posterior()` now accept a matrix as input +- Improves documentation for interpretation of `NA`s in D-score, SEM + and DAZ +- Adds a vignette "Understanding and using DAZ" to explain and + highlight DAZ (contributed Jonathan Seiden) +- Fixes typos in vignettes +- Adds tests in `testthat/test-prior.R` +- Repairs bug that occured when no items was found resulting in error + "cannot coerce class 'function' to a data.frame" in `dscore()` +- Restores a datafile `data-raw/data/keys/items_gs1_gl1.txt` that was + accidentally removed in a previous release +- Evades superfluous warning 'There was 1 warning in `mutate()`. In + argument: `daz = daz(...)`' +- Makes the `key` column compulsory in the `itembank` argument, and + adds a check on proper column names +- Improves documentation for the `population` and `key` arguments + +# dscore 1.9.0 + +### 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. -# dscore 1.8.2 +### Major changes -- Evades an error produced by internal `pBCT()` when `is.na(nu)` is `TRUE` +- 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) -# dscore 1.8.1 +### Minor changes -- Renames GSED HH to GSED HF +- 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` +- 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 # dscore 1.8.0 ### Major changes -- Adds instrument `gh1` (GSED-HF, JAN 2023) to `builtin_itemtable` and `builtin_itembank` as part of key `gsed2212` -- Adds example datasets: `sample_sf`, `sample_lf` and `sample_hf` -- Adds vignette to calculate D-scores and DAZ dedicated to GSED instruments -- Renames streams in `gl1` instruments as: aa --> gm, bb --> lg, cc --> fm -- Replaces item name `gl1aad001` --> `gl1gmd001`, and so on +- Adds instrument `gh1` (GSED-HF, JAN 2023) to `builtin_itemtable` and + `builtin_itembank` as part of key `gsed2212` +- Adds example datasets: `sample_sf`, `sample_lf` and `sample_hf` +- Adds vignette to calculate D-scores and DAZ dedicated to GSED + instruments +- Renames streams in `gl1` instruments as: aa --\> gm, bb --\> lg, cc + --\> fm +- Replaces item name `gl1aad001` --\> `gl1gmd001`, and so on -### Minor changes +### Minor changes -- Rewrite calls to `select()` and `pivot_longer()` to conform to `tidyselect 1.2.0` grammar +- Rewrite calls to `select()` and `pivot_longer()` to conform to + `tidyselect 1.2.0` grammar # dscore 1.7.0 ### Major issue -- On 22021130, we found errors in the LF item order. Solves a documentation error. This error was introduced on May 30, 2022 and invalidates keys `gsed2206` and `gsed2208`, as well as analyses that rely on correct LF item labels. Version 1.7.0 corrects these problems. -- Item labels are taken from +- On 22021130, we found errors in the LF item order. Solves a + documentation error. This error was introduced on May 30, 2022 and + invalidates keys `gsed2206` and `gsed2208`, as well as analyses that + rely on correct LF item labels. Version 1.7.0 corrects these + problems. +- Item labels are taken from - `LF1`, corrected using RedCAP comparisons from `Phase_1_master_data_dictionary_V1.0_29_11_2022.xlsx`; - `LF2`, from @@ -63,17 +336,20 @@ editor_options: manually matched to `LF1`. - Rerun core 293_0 model, check edits, redocument, regenerate diagnostic plots, etc. Check that result is identical. -- Refit full 818_6 model. In general better ICC's, effect on - D-score calculation is minor, six items were bad matches +- Refit full 818_6 model. In general better ICC's, effect on D-score + calculation is minor, six items were bad matches ### Major changes - Introduces new default key `gsed2212` -- Introduces new instrument codes `gs1` (GSED SF V1.0) and `gl1` (GSED LF V1.0) +- Introduces new instrument codes `gs1` (GSED SF V1.0) and `gl1` (GSED + LF V1.0) - Updates `gto` labels with correct order -- Set default key to `gsed2212`. This key repairs problems in `gsed2206` and `gsed2208`. +- Set default key to `gsed2212`. This key repairs problems in + `gsed2206` and `gsed2208`. - `get_labels()` now returns the labels in the same order as `items` -- Extends key `gsed2212` with 18 ECDI items using Phase 1 validation data +- Extends key `gsed2212` with 18 ECDI items using Phase 1 validation + data - Updates `builtin_itemtable` and `builtin_itembank` with correct LF item order - Redocuments upper anchor item @@ -85,15 +361,16 @@ editor_options: - Adds example data set `gsample` with 10 cases with SF and LF scores - Adds `order` argument to `get_itemnames()` - Repairs an error in the `sort_itemnames()` example -- Replaces bitwise by more elegant elementwise comparison in `dscore.cpp` +- Replaces bitwise by more elegant elementwise comparison in + `dscore.cpp` - Removes the dependency on the `sirt` package # dscore 1.6.0 ### Major changes -- Solves a long-standing issue that led to severe incongruence - between LF and SF at the earliest ages (\<6M). +- Solves a long-standing issue that led to severe incongruence between + LF and SF at the earliest ages (\<6M). - Adds two new keys (`gsed2208` and `293_0`) using the Phase 1 validation data for the GSED SF and GSED LF. - Sets `293_0` as the **GSED core model** and extended it to include @@ -213,4 +490,4 @@ editor_options: - Hi, welcome to `dscore 1.0.0`! For the development history, see -- Added a `NEWS.md` file to track changes to the package. +- Added a `NEWS.md` file to track changes to the package. \ No newline at end of file diff --git a/R/RcppExports.R b/R/RcppExports.R index dfd00c32..c94d214c 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -31,12 +31,13 @@ normalize <- function(d, qp) { #' @param tau Numeric, difficulty parameter #' @param prior Vector of prior values on quadrature points `qp` #' @param qp vector of equally spaced quadrature points +#' @param scale expansion relative to the logit scale #' @return A vector of length `length(prior)` #' @author Stef van Buuren, Arjan Huizing, 2020 #' @note: Internal function #' @seealso [dscore()] -posterior <- function(score, tau, prior, qp) { - .Call('_dscore_posterior', PACKAGE = 'dscore', score, tau, prior, qp) +posterior <- function(score, tau, prior, qp, scale) { + .Call('_dscore_posterior', PACKAGE = 'dscore', score, tau, prior, qp, scale) } #' Calculate posterior of ability @@ -49,6 +50,7 @@ posterior <- function(score, tau, prior, qp) { #' scores in `scores` estimated from the Rasch model in the #' preferred metric/scale. #' @param qp Numeric vector of equally spaced quadrature points. +#' @param scale Scale expansion #' @param mu Numeric scalar. The mean of the prior. #' @param sd Numeric scalar. Standard deviation of the prior. #' @param relhi Positive numeric scalar. Upper end of the relevance interval @@ -63,7 +65,7 @@ posterior <- function(score, tau, prior, qp) { #' `posterior` | Vector with posterior distribution. #' #' Since `dscore V40.1` the function does not return the `"start"` element. -calculate_posterior <- function(scores, tau, qp, mu, sd, relhi, rello) { - .Call('_dscore_calculate_posterior', PACKAGE = 'dscore', scores, tau, qp, mu, sd, relhi, rello) +calculate_posterior <- function(scores, tau, qp, scale, mu, sd, relhi, rello) { + .Call('_dscore_calculate_posterior', PACKAGE = 'dscore', scores, tau, qp, scale, mu, sd, relhi, rello) } diff --git a/R/builtin_itembank.R b/R/builtin_itembank.R index 061544c0..625e0ba7 100644 --- a/R/builtin_itembank.R +++ b/R/builtin_itembank.R @@ -1,37 +1,42 @@ -#' Built-in itembank +#' Collection of items fitting the Rasch model #' -#' A data frame with administrative information per item. Includes -#' only items that are part of a Rasch model. -#' See [dscore::builtin_itemtable] for an overview of all currently -#' defined items. +#' A data frame with administrative information per item with difficulty +#' estimates (`tau`) from the Rasch model. The item bank provides the basic +#' information to calculate D-scores. The items in the item bank +#' are a subset of all items as collected in [dscore::builtin_itemtable]. #' -#' In general, one can only compare D-score calculated with the same -#' key. The current recommendation for new projects is to choose -#' key `gsed2212`. +#' The difficulty estimates were estimated by a Rasch model. The `key` +#' indicates the specific Rasch model used to estimate the difficulty. +#' Strictly speaking, one can only compare D-score calculated from the +#' same `key`. #' #' @docType data #' @format A `data.frame` with variables: #' -#' | Name | Label | -#' | --- | --------- | -#' | `key` | String indicating a specific Rasch model (the key) | -#' | `item` | Item name, gsed lexicon | -#' | `tau` | Difficulty estimate | -#' | `label` | Label (English) | -#' | `instrument` | Instrument code | -#' | `domain` | Domain code | -#' | `mode` | Administration mode | -#' | `number` | Item number | +#' | Name | Label | +#' | -------------- | ---------------------------------------- | +#' | `key` | String indicating a specific Rasch model | +#' | `item` | Item name, gsed lexicon | +#' | `tau` | Difficulty estimate | +#' | `label` | Label (English) | +#' | `instrument` | Instrument code | +#' | `domain` | Domain code | +#' | `mode` | Administration mode | +#' | `number` | Item number | #' #' @note -#' Last update: -#' - Dec 01, 2022 - Overwrite labels of gto by correct item order. -#' - Dec 05, 2022 - Adds key `gsed2212`, adding instruments `gl1` and `gs1`, and -#' defining correct order for `gto` -#' - Jan 05, 2023 - Adds instrument `gh1` to key `gsed2212` +#' Updates: #' +#' - Dec 01, 2022 - Overwrite labels of gto by correct item order. +#' - Dec 05, 2022 - Adds key `gsed2212`, adding instruments `gl1` and `gs1`, and +#' defining correct order for `gto` +#' - Jan 05, 2023 - Adds instrument `gh1` to key `gsed2212` +#' - Oct 10, 2025 - Adds key `gsed2510` for instruments `gl1` and `gs1` (281 items) +#' - Oct 21, 2025 - Updates keys `gsed2212`, `gsed2406` for `gh1` (55 -> 48 items) +#' - Oct 21, 2025 - Adds `gh1` extension to key `gsed2510` (48 items) +#' - Oct 23, 2025 - Adds `by3` extension to key `gsed2510` (242 items) #' @examples -#' head(builtin_itembank) -#' @seealso [dscore()], [get_tau()], -#' [builtin_itemtable()] +#' # count number of items per instrument in each key +#' table(builtin_itembank$instrument, builtin_itembank$key) +#' @seealso [dscore()], [get_tau()], [builtin_itemtable()] "builtin_itembank" diff --git a/R/builtin_itemtable.R b/R/builtin_itemtable.R index b463e906..bdec0208 100644 --- a/R/builtin_itemtable.R +++ b/R/builtin_itemtable.R @@ -1,31 +1,33 @@ -#' Global Scale for Early Development - itemtable +#' Collection of items from instruments measuring early child development +#' +#' The built-in variable `builtin_itemtable` contains the name and label +#' of items for measuring early child development. #' -#' The built-in variable named `builtin_itemtable` -#' contains descriptions of all items found in the `gsed` -#' data. #' @docType data #' @format A `data.frame` with variables: #' -#' | Name | Label | -#' | --- | --------- | -#' | `item` | Item name, gsed lexicon | -#' | `equate` | Equate group | -#' | `label` | Label (English) | +#' | Name | Label | +#' | -------- | ------------------------- | +#' | `item` | Item name, gsed lexicon | +#' | `equate` | Equate group | +#' | `label` | Label (English) | #' #' @details -#' Data are collected by the members of the Global Scales for Early -#' Development (GSED) group. -#' The `itemtable` is created by `\\data-raw\\R\\save_builtin_itemtable.R`. +#' The `builtin_itemtable` is created by script +#' `data-raw/R/save_builtin_itemtable.R`. #' -#' Last update: +#' Updates: #' - May 30, 2022 - added gto (LF) and gpa (SF) items #' - June 1, 2022 - added seven gsd items #' - Nov 24, 2022 - Added instruments gs1, gs2 -#' - Dec 01, 2022 - Labels of gto replaced by correct order. This change invalidates -#' any analyses done on LF done after May 30, 2022 !!! +#' - Dec 01, 2022 - Labels of gto replaced by correct order. +#' Incorrect item order affects analyses done on LF between 20220530 - 20221201 !!! #' - Dec 05, 2022 - Redefines gs1 and instrument for Phase 2, removes gs2 (139) #' Adds gl1 (Long Form Phase 2 items 155) #' - Jan 05, 2023 - Adds 55 items from GSED-HF -#' @author Compiled by Stef van Buuren +#' - Jul 15, 2025 - Rename gpaclc088 --> gpaclc089 (Can you child say five or more separate words) +#' Rename gpasec089 --> gpasec088 (Is your child able to pee and poo) +#' - Oct 20, 2025 Replace HF 55 items list by HF 48 item list +#' @author Compiled by Stef van Buuren using different sources #' @keywords datasets "builtin_itemtable" diff --git a/R/builtin_keys.R b/R/builtin_keys.R new file mode 100644 index 00000000..c5f8fe56 --- /dev/null +++ b/R/builtin_keys.R @@ -0,0 +1,26 @@ +#' Available keys for calculating the D-score +#' +#' A key contains the item difficulty estimates from a given Rasch model. +#' The difficulty estimates (`tau`) within a given key are used to +#' calculate D-scores. D-scores can only be compared when calculated +#' from the same key. +#' +#' @docType data +#' @format `builtin_keys` is a `data.frame` with variables: +#' +#' | Name | Label | +#' | --- | --------- | +#' | `key` | String. Name of the key indicating the Rasch model | +#' | `base_population` | String. Name of the base population for the key | +#' | `n_items` | Number of items in the key | +#' | `n_instruments` | Number of instruments in the key | +#' | `intercept` | Intercept to convert logit into D-score | +#' | `slope` | Slope to convert logit into D-score | +#' | `from` | Starting value of the quadrature points | +#' | `to` | Stopping value of the quadrature points | +#' | `by` | Increment of the quadrature points | +#' | `retired` | Has the key been retired? | +#' @note +#' Updated: 20251023 SvB: Added `builtin_keys` table by +#' `data-raw\data\R\save_builtin_keys.R` +"builtin_keys" diff --git a/R/builtin_references.R b/R/builtin_references.R index 025181f0..ed4f4b10 100644 --- a/R/builtin_references.R +++ b/R/builtin_references.R @@ -1,4 +1,4 @@ -#' Age-conditional reference distribution of D-score +#' Collection of age-conditional reference distributions #' #' A data frame containing the age-dependent distribution of the #' D-score for children aged 0-5 years. The distribution is modelled @@ -6,17 +6,18 @@ #' (Stasinopoulos & Rigby, 2022) and is equal for #' both boys and girls. The LMS/BCT values can be used to graph #' reference charts and to calculate age-conditional Z-scores, also -#' known as DAZ. +#' known as the *Development-for-Age Z-score (DAZ)*. #' #' @docType data -#' @format A `data.frame` with 18 variables: +#' @format A `data.frame` with the following variables: #' -#' | Name | Label | -#' | --- | --------- | -#' | `pop` | Population: `"dutch"`, `"gcdg"`, `"phase1"`, `"phase1_healthy"`, -#' `"dutch_gsed2212"` | -#' | `age` | Decimal age in years | -#' | `mu` | M-curve, median D-score, P50 | +#' | Name | Label | +#' | ------- | --------- | +#' | `population` | Name of the reference population | +#' | `key` | D-score key, e.g., `"dutch"`, `"gcdg"` or `"gsed"` | +#' | `distribution` | Distribution family: `"LMS"` or `"BCT"` | +#' | `age` | Decimal age in years | +#' | `mu` | M-curve, median D-score, P50 | #' | `sigma` | S-curve, spread expressed as coefficient of variation | #' | `nu` | L-curve, the lambda coefficient of the LMS/BCT model for skewness | #' | `tau` | Kurtosis parameter in the BCT model | @@ -34,20 +35,31 @@ #' | `SDP2` | +2SD centile | #' #' @details +#' 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). +#' #' The `"phase1"` references were calculated from the GSED Phase 1 validation #' data (GSED-BGD, GSED-PAK, GSED-TZA) cover age range 2w-3.5 years. The -#' age range 3.5-5 yrs is linearly extrapolated and are only indicative. -#' The `"phase1_healthy"` references were calculated from the GSED Phase 1 validation +#' age range 3.5-5 yrs is linearly extrapolated and is only indicative. +#' +#' The `"preliminary_standards"` were calculated from the GSED Phase 1 validation #' data (GSED-BGD, GSED-PAK, GSED-TZA) using a subset of children with -#' healthy development. -#' The `"dutch_gsed2212"` references were calculated from Dutch data using -#' the `gsed2212` key. This is a temporary name, and will be deprecated. +#' covariate indicating healthy development. +#' +#' The `"who_descriptive"` references were calculated from the GSED Phase 1 & 2 +#' validation data (GSED-BGD, GSED-BRA, GSED_CHN, GSED-CIV, GSED-NLD, GSED-PAK, +#' GSED-TZA) cover age range 2w-3.5 years. The age range 3.5-5 yrs is linearly +#' extrapolated and is only indicative. The source code for the relevant +#' calculations can be found in +#' and . +#' #' @examples -#' head(builtin_references) +#' # get an overview of available references per key +#' table(builtin_references$population, builtin_references$key) #' @references #' Cole TJ, Green PJ (1992). Smoothing reference centile curves: The LMS #' method and penalized likelihood. Statistics in Medicine, 11(10), @@ -65,6 +77,12 @@ #' BMJ Global Health, BMJ Global Health 4: e001724. #' #' +#' van Buuren S, Eekhout I, McCray G, Lancaster GA, Waldman MR, McCoy DC, +#' Gladstone M, Cavallera, V, Dua T, Black MM, GSED Team (2025). +#' Enhancing comparability in early child development assessment with the +#' D-score. International Journal of Behavioral Development, 49(4), 348-364, +#' +#' #' Stasinopoulos M, Rigby R (2022). gamlss.dist: Distributions for #' Generalized Additive Models for Location Scale and Shape, #' R package version 6.0-3, diff --git a/R/builtin_translate.R b/R/builtin_translate.R new file mode 100644 index 00000000..4db810f4 --- /dev/null +++ b/R/builtin_translate.R @@ -0,0 +1,31 @@ +#' A table to translate between different lexicons (naming schema) +#' +#' The built-in variable `builtin_translate` contains a table for +#' translating among sets of item names into each other. +#' +#' @docType data +#' @format A `data.frame` with variables: +#' +#' | Name | Label | +#' | ---------- | ------------------------------ | +#' | `phase1` | Item names, Phase 1 data | +#' | `phase2` | Item names, Phase 2 data | +#' | `gsed` | gsed lexion | +#' | `gsed2` | gto/gpa lexicon for LF/SF | +#' | `gsed3` | gl1/gs1 lexicon for LF/SF | +#' | `short1` | Short item name, phase 1 order | +#' | `short2` | Short item name, phase 2 order | +#' | `instrument` | Instrument code | +#' | `seq_phase1` | Phase 1 order | +#' | `seq_phase2` | Phase 2 order | +#' | `label` | Item label (English) | +#' +#' @details +#' The `builtin_translate` is created by script +#' `data-raw/R/save_builtin_translate.R`. +#' +#' Updates: +#' - July 2025 - Tranferred from gsedread package +#' @author Compiled by Stef van Buuren +#' @keywords datasets +"builtin_translate" diff --git a/R/count_mu.R b/R/count_mu.R deleted file mode 100644 index f20a8d35..00000000 --- a/R/count_mu.R +++ /dev/null @@ -1,117 +0,0 @@ -#' Median of Dutch references -#' -#' Returns the age-interpolated median of the Dutch references (van Buuren 2014). -#' The working range is 0-3 years. This function should -#' be called when the `key = "dutch"`. -#' @param t Decimal age, numeric vector -#' @return -#' A vector of length `length(t)` with the median of the Dutch references. -#' @note Internal function. Called by `dscore()` -#' @examples -#' dscore:::count_mu_dutch(0:2) -count_mu_dutch <- function(t) { - suppressWarnings(44.35 - 1.8 * t + 28.47 * log(t + 0.25)) -} - -#' Median of GCDG references -#' -#' Returns the age-interpolated median of the GCDG references (Weber -#' et al, 2019). The working range is 0-4 years. This function should -#' be called when the `key = "gsed"` or `key = "gcdg"`. -#' @param t Decimal age, numeric vector -#' @return -#' A vector of length `length(t)` with the median of the GCDG references. -#' @note Internal function. Called by `dscore()` -#' @examples -#' dscore:::count_mu_gcdg(0:2) -count_mu_gcdg <- function(t) { - suppressWarnings(47.65 - 3.05 * t + 26.70 * log(t + 0.19)) -} - - -#' Median of phase1 references -#' -#' Returns the age-interpolated median of the phase1 references -#' based on LF & SF in GSED-BGD, GSED-PAK, GSED-TZA. -#' -#' The interpolation is done in two rounds. First round: Calculate D-scores -#' using .gcdg prior-mean, calculate reference, estimate round 1 parameters -#' used in this function. Round 2: Calculate D-score using round 1 estimates as -#' the prior mean (most differences are within 0.1 D-score points), -#' recalculate references, estimate round 2 parameters used in this function. -#' -#' Round 1: -#' Count model: <= 9MN: 21.3449 + 26.4916 t + 7.0251(t + 0.2) -#' Count model: > 9Mn & <= 3.5 YR: 14.69947 - 12.18636 t + 69.11675(t + 0.92) -#' Linear model: > 3.5 YRS: 61.40956 + 3.80904 t -#' -#' Round 2: -#' Count model: < 9MND: 20.5883 + 27.3376 t + 6.4254(t + 0.2) -#' Count model: > 9MND & < 3.5 YR: 14.63748 - 12.11774 t + 69.05463(t + 0.92) -#' Linear model: > 3.5 YRS: 61.37967 + 3.83513 t -#' -#' The working range is 0-3.5 years. After the age of 3.5 years, the function -#' will increase at an arbitrary rate of 3.8 D-score points per year. -#' This function is intended to be called when `key = "gsed2212"`, -#' `key = "gsed2208"` or `key = "293_0"`. -#' @param t Decimal age, numeric vector -#' @return -#' A vector of length `length(t)` with the median of the GCDG references. -#' @note Internal function. Called by `dscore()` -#' @author Stef van Buuren, on behalf of GSED project -#' @examples -#' dscore:::count_mu_phase1(0:5) -count_mu_phase1 <- function(t) { - - to <- !is.na(t) - t1 <- to & t <= 0.75 - t2 <- to & t > 0.75 & t <= 3.5 - t3 <- to & t > 3.5 - - # Round 1 model - # t[t1] <- suppressWarnings(21.3449 + 26.4916 * t[t1] + 7.0251 * log(t[t1] + 0.2)) - # t[t2] <- suppressWarnings(14.69947 - 12.18636 * t[t2] + 69.11675 * log(t[t2] + 0.92)) - # t[t3] <- suppressWarnings(61.40956 + 3.80904 * t[t3]) - - # Round 2 model - t[t1] <- suppressWarnings(20.5883 + 27.3376 * t[t1] + 6.4254 * log(t[t1] + 0.2)) - t[t2] <- suppressWarnings(14.63748 - 12.11774 * t[t2] + 69.05463 * log(t[t2] + 0.92)) - t[t3] <- suppressWarnings(61.37967 + 3.83513 * t[t3]) - - return(t) -} - -#' Median of phase1_healthy references -#' -#' Returns the age-interpolated median of the phase1 references -#' based on LF & SF in GSED-BGD, GSED-PAK, GSED-TZA. -#' -#' This function is intended to be called when `key = "gsed2212"`, -#' `key = "gsed2208"` or `key = "293_0"`. -#' @param t Decimal age, numeric vector -#' @return -#' A vector of length `length(t)` with the median of the GCDG references. -#' @note Internal function. Called by `dscore()` -#' @author Stef van Buuren, on behalf of GSED project -#' @examples -#' dscore:::count_mu_phase1_healthy(0:5) -count_mu_phase1_healthy <- function(t) { - warning("Function count_mu_phase1_health() not yet updated") - - to <- !is.na(t) - t1 <- to & t <= 0.75 - t2 <- to & t > 0.75 & t <= 3.5 - t3 <- to & t > 3.5 - - # Round 1 model - # t[t1] <- suppressWarnings(21.3449 + 26.4916 * t[t1] + 7.0251 * log(t[t1] + 0.2)) - # t[t2] <- suppressWarnings(14.69947 - 12.18636 * t[t2] + 69.11675 * log(t[t2] + 0.92)) - # t[t3] <- suppressWarnings(61.40956 + 3.80904 * t[t3]) - - # Round 2 model - t[t1] <- suppressWarnings(20.5883 + 27.3376 * t[t1] + 6.4254 * log(t[t1] + 0.2)) - t[t2] <- suppressWarnings(14.63748 - 12.11774 * t[t2] + 69.05463 * log(t[t2] + 0.92)) - t[t3] <- suppressWarnings(61.37967 + 3.83513 * t[t3]) - - return(t) -} diff --git a/R/daz.R b/R/daz.R index 8506a17c..ba8a7846 100644 --- a/R/daz.R +++ b/R/daz.R @@ -1,9 +1,9 @@ -#' D-score standard deviation score: DAZ +#' Calculate Development-for-Age Z-score (DAZ) +#' +#' 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. #' -#' The `daz()` function calculated the -#' "Development for Age Z-score". -#' The DAZ represents a child's D-score after adjusting -#' for age by an external age-conditional reference. #' The `zad()` is the inverse of `daz()`: Given age and #' the Z-score, it finds the raw D-score. #' @@ -11,10 +11,11 @@ #' @param d Vector of D-scores #' @param z Vector of standard deviation scores (DAZ) #' @param x Vector of ages (decimal age) -#' @param reference A `data.frame` with the LMS reference values. -#' The default uses the `get_reference()` function. This selects -#' a subset of rows from the `builtin_references`. +#' @param 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`. #' @param dec The number of decimals (default `dec = 3`). +#' @param verbose Print out the used reference table (default `verbose = FALSE`). #' @return Unnamed numeric vector with Z-scores of length `length(d)`. #' @details #' @@ -30,86 +31,113 @@ #' Cole TJ, Green PJ (1992). Smoothing reference centile curves: The LMS #' method and penalized likelihood. Statistics in Medicine, 11(10), #' 1305-1319. -#' @seealso [dscore()] -#' @author Stef van Buuren 2020 +#' @seealso [dscore()][get_reference()] +#' @author Stef van Buuren #' @examples -#' # using GSED Phase 1 reference +#' # using default reference and key #' daz(d = c(35, 50), x = c(0.5, 1.0)) #' -#' # using Dutch reference -#' daz(d = c(35, 50), x = c(0.5, 1.0), reference = get_reference("gcdg")) +#' # print out names of the used reference table +#' daz(d = c(35, 50), x = c(0.5, 1.0), verbose = TRUE) +#' +#' # 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) #' -#' # using Dutch reference -#' daz(d = c(35, 50), x = c(0.5, 1.0), reference = get_reference("dutch")) +#' # using Dutch reference in default key +#' reftab <- get_reference(population = "dutch", verbose = TRUE) +#' daz(d = c(35, 50), x = c(0.5, 1.0), reference_table = reftab) #' @export -daz <- function(d, x, reference = get_reference(), dec = 3) { - if (length(d) != length(x)) stop("Arguments `x` and `d` of different length") - pop <- reference$pop[1] +daz <- function(d, x, reference_table = NULL, dec = 3, verbose = FALSE) { + if (length(d) != length(x)) { + stop("Arguments `x` and `d` of different length") + } - if (pop %in% c("gcdg", "dutch")) { - # LMS reference - l <- approx(x = reference[, "age"], y = reference[, "nu"], xout = x)$y - m <- approx(x = reference[, "age"], y = reference[, "mu"], xout = x)$y - s <- approx(x = reference[, "age"], y = reference[, "sigma"], xout = x)$y - z <- ifelse(l > 0.01 | l < (-0.01), - (((d / m)^l) - 1) / (l * s), - log(d / m) / s - ) + if (is.null(reference_table)) { + rt <- get_reference(verbose = verbose) + } else { + rt <- reference_table } - if (pop %in% c("phase1", "phase1_healthy")) { - # BCT reference - mu <- approx(x = reference[, "age"], y = reference[, "mu"], xout = x)$y - sigma <- approx(x = reference[, "age"], y = reference[, "sigma"], xout = x)$y - nu <- approx(x = reference[, "age"], y = reference[, "nu"], xout = x)$y - tau <- approx(x = reference[, "age"], y = reference[, "tau"], xout = x)$y + # Return NA if there is no reference + if (!nrow(rt)) { + return(rep(NA_real_, length(d))) + } + + dist <- rt$distribution[1L] + if (dist == "LMS") { + l <- approx(x = rt[, "age"], y = rt[, "nu"], xout = x)$y + m <- approx(x = rt[, "age"], y = rt[, "mu"], xout = x)$y + s <- approx(x = rt[, "age"], y = rt[, "sigma"], xout = x)$y + z <- ifelse( + l > 0.01 | l < (-0.01), + (((d / m)^l) - 1) / (l * s), + log(d / m) / s + ) + } else if (dist == "BCT") { + mu <- approx(x = rt[, "age"], y = rt[, "mu"], xout = x)$y + sigma <- approx(x = rt[, "age"], y = rt[, "sigma"], xout = x)$y + nu <- approx(x = rt[, "age"], y = rt[, "nu"], xout = x)$y + tau <- approx(x = rt[, "age"], y = rt[, "tau"], xout = x)$y z <- qnorm(pBCT(d, mu, sigma, nu, tau)) + } else { + stop("Unknown distribution '", dist, "'.") } + # Turn Inf into NA + z[is.infinite(z)] <- NA_real_ + return(round(z, dec)) } #' @return Unnamed numeric vector with D-scores of length `length(z)`. #' @rdname daz #' @examples -#' # population median at ages 0.5, 1 and 2 years, phase1 reference +#' # population median at ages 0.5, 1 and 2 years, default reference #' zad(z = rep(0, 3), x = c(0.5, 1, 2)) #' -#' # population median at ages 0.5, 1 and 2 years, gcdg reference -#' zad(z = rep(0, 3), x = c(0.5, 1, 2), reference = get_reference("gcdg")) -#' -#' # population median at ages 0.5, 1 and 2 years, dutch reference -#' zad(z = rep(0, 3), x = c(0.5, 1, 2), reference = get_reference("dutch")) +#' # population median at ages 0.5, 1 and 2 years, gcdg key +#' reftab <- get_reference(key = "gcdg", verbose = TRUE) +#' zad(z = rep(0, 3), x = c(0.5, 1, 2), reference_table = reftab) #' -#' # percentiles of D-score reference -#' g <- expand.grid(age = seq(0.1, 2, 0.1), p = c(0.1, 0.5, 0.9)) -#' d <- zad(z = qnorm(g$p), x = g$age) -#' matplot( -#' x = matrix(g$age, ncol = 3), y = matrix(d, ncol = 3), type = "l", -#' lty = 1, col = "blue", xlab = "Age (years)", ylab = "D-score" -#' ) +#' # population median at ages 0.5, 1 and 2 years, dutch key +#' reftab <- get_reference(key = "dutch", verbose = TRUE) +#' zad(z = rep(0, 3), x = c(0.5, 1, 2), reference = reftab) #' @export -zad <- function(z, x, reference = get_reference(), dec = 2) { - if (length(z) != length(x)) stop("Arguments `x` and `z` of different length") - pop <- reference$pop[1] +zad <- function(z, x, reference_table = NULL, dec = 2, verbose = FALSE) { + if (length(z) != length(x)) { + stop("Arguments `x` and `z` of different length") + } - if (pop %in% c("gcdg", "dutch")) { - # LMS reference - mu <- approx(reference[, "age"], reference[, "mu"], xout = x)$y - sigma <- approx(reference[, "age"], reference[, "sigma"], xout = x)$y - nu <- approx(reference[, "age"], reference[, "nu"], xout = x)$y - d <- ifelse(nu > 0.01 | nu < (-0.01), - mu * ((nu * sigma * z + 1) ^ (1 / nu)), - mu * exp(sigma * z)) + if (is.null(reference_table)) { + rt <- get_reference(verbose = verbose) + } else { + rt <- reference_table } - if (pop %in% c("phase1", "phase1_healthy")) { - # BCT reference - mu <- approx(x = reference[, "age"], y = reference[, "mu"], xout = x)$y - sigma <- approx(x = reference[, "age"], y = reference[, "sigma"], xout = x)$y - nu <- approx(x = reference[, "age"], y = reference[, "nu"], xout = x)$y - tau <- approx(x = reference[, "age"], y = reference[, "tau"], xout = x)$y + # Return NA if there is no reference + if (!nrow(rt)) { + return(rep(NA_real_, length(z))) + } + + dist <- rt$distribution[1L] + if (dist == "LMS") { + mu <- approx(rt[, "age"], rt[, "mu"], xout = x)$y + sigma <- approx(rt[, "age"], rt[, "sigma"], xout = x)$y + nu <- approx(rt[, "age"], rt[, "nu"], xout = x)$y + d <- ifelse( + nu > 0.01 | nu < (-0.01), + mu * ((nu * sigma * z + 1)^(1 / nu)), + mu * exp(sigma * z) + ) + } else if (dist == "BCT") { + mu <- approx(x = rt[, "age"], y = rt[, "mu"], xout = x)$y + sigma <- approx(x = rt[, "age"], y = rt[, "sigma"], xout = x)$y + nu <- approx(x = rt[, "age"], y = rt[, "nu"], xout = x)$y + tau <- approx(x = rt[, "age"], y = rt[, "tau"], xout = x)$y d <- qBCT(pnorm(z), mu, sigma, nu, tau) + } else { + stop("Unknown distribution '", dist, "'.") } return(round(d, dec)) diff --git a/R/decompose_itemnames.R b/R/decompose_itemnames.R index 42f0423c..1eb99977 100644 --- a/R/decompose_itemnames.R +++ b/R/decompose_itemnames.R @@ -2,7 +2,7 @@ #' #' This utility function decomposes item names into components: #' instrument, domain, mode and number -#' @param x A character vector containing item names (gcdg lexicon) +#' @param x A character vector containing item names (gsed lexicon) #' @return A `data.frame` with `length(x)` rows and #' four columns, named: `instrument`, `domain`, `mode`, #' and `number`. @@ -24,7 +24,5 @@ decompose_itemnames <- function(x) { domain <- substr(x, 4, 5) mode <- substr(x, 6, 6) number <- substr(x, 7, 9) - data.frame(instrument, domain, mode, number, - stringsAsFactors = FALSE - ) + data.frame(instrument, domain, mode, number, stringsAsFactors = FALSE) } diff --git a/R/dscore-package.R b/R/dscore-package.R index 1212de92..81d0c56c 100644 --- a/R/dscore-package.R +++ b/R/dscore-package.R @@ -1,8 +1,9 @@ -#' dscore: D-score for Child Development +#' @title D-score for child development #' -#' The `dscore` package implements several tools needed to -#' calculate the D-score, a numerical score that measures -#' generic development in children. +#' @description +#' The `dscore` package implements tools needed to calculate the D-score, +#' a numerical score that summarizes early development in children by +#' one number, the D-score. #' #' @section User functions: #' The available functions are: @@ -24,7 +25,7 @@ #'  | | | #' | [daz()] | Transform to age-adjusted standardized D-score | #' | [zad()] | Inverse of [daz()] | -#' | [get_reference()] | Get D-score age-reference | +#' | [get_reference()] | Get D-score reference tables | #' | [get_age_equivalent()] | Translate difficulty to age | #' #' @section Built-in data: @@ -32,11 +33,16 @@ #' #' Data | Description #' -------- | --------- -#' [builtin_itembank()] | A `data.frame` containing the difficulty estimates of items according to final Rasch models. -#' [builtin_itemtable()] | A `data.frame` containing names and descriptions of items from 22 instruments. -#' [builtin_references()] | A `data.frame` with LMS reference values used to transform from D-score to DAZ, DAZ to D-score. -#' [milestones()] | A small demo dataset with PASS/FAIL responses from 27 preterms, measured at various ages between birth -#' and 2.5 years. +#' [builtin_keys()] | Available keys for calculating the D-score +#' [builtin_itembank()] | Collection of items fitting the Rasch model +#' [builtin_itemtable()] | Collection of items from instruments measuring early child development +#' [builtin_references()] | Collection of age-conditional reference distributions +#'  | | | +#' [milestones()] | Dataset with PASS/FAIL responses for 27 preterms +#' [gsample] | Sample of 10 children from the GSED Phase 1 study, gsed lexicon +#' [sample_sf] | Sample of 10 children from GSED Short Form (GSED-SF) +#' [sample_lf] | Sample of 10 children from GSED Long Form (GSED-LF) +#' [sample_hf] | Sample of 10 children from GSED Household Form (GSED-HF) #' #' @references #' Jacobusse, G., S. van Buuren, and P.H. Verkerk. 2006. “An Interval Scale @@ -64,13 +70,7 @@ #' for Early Development (GSED).” *Early Childhood Matters*. #' #' -#' @note -#' 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. -#' +#' @section Acknowledgements: #' The authors wish to #' recognize the principal investigators and their study team members #' for their generous contribution of the data that made this tool @@ -89,10 +89,16 @@ #' 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. +#' #' @name dscore-package -#' @docType package #' @aliases dscore-package -NULL +#' @keywords internal +"_PACKAGE" # The following block is used by usethis to automatically manage # roxygen namespace tags. Modify with care! diff --git a/R/dscore.R b/R/dscore.R index 697262f9..7cb877d0 100644 --- a/R/dscore.R +++ b/R/dscore.R @@ -1,76 +1,82 @@ #' D-score estimation #' -#' The function `dscore()` function estimates the D-score, -#' a numeric score that measures child development, from PASS/FAIL -#' observations on milestones. +#' The `dscore()` function estimates the following quantities: *D-score*, +#' a numeric score that quantifies child development by one number, +#' *Development-for-Age Z-score (DAZ)* that corrects the D-score for age, +#' *standard error of measurement (SEM)* of the D-score. #' -#' @rdname dscore -#' @param data A `data.frame` with the data. +#' @param data A `data.frame` or `matrix` with the data. #' A row collects all observations made on a child on a set of #' milestones administered at a given age. The function calculates -#' a D-score for each row. Different rows correspond to different -#' children or different ages. +#' a D-score for each row. Different rows can correspond to different +#' children or ages. #' @param items A character vector containing names of items to be #' included into the D-score calculation. Milestone scores are coded #' numerically as `1` (pass) and `0` (fail). By default, #' D-score calculation is done on all items found in the data #' that have a difficulty parameter under the specified `key`. +#' @param key String. They key identifies 1) the difficulty estimates +#' pertaining to a particular Rasch model, and 2) the prior mean and standard +#' deviation of the prior distribution for calculating the D-score. +#' The default key `NULL` sets `key = "gsed2406"`. +#' View `builtin_keys` for an overview of the available keys. +#' @param population String. The name of the reference population to calculate +#' DAZ. +#' Use `with(builtin_references, table(key, population))` to see which +#' built-in references are available for `key - population` combinations. +#' If not specified, the function set the default population as +#' `builtin_keys$base_population[key == builtin_keys$key]`. +#' @param itembank A `data.frame` with at least three columns named +#' `key`, `item` and `tau`. By default, the function uses +#' `dscore::builtin_itembank`. If you specify your own `itembank`, +#' then you should also provide the relevant `transform` and `qp` arguments. #' @param xname A string with the name of the age variable in -#' `data`. The default is `"age"`. +#' `data`. The default is `"age"`. Do not round age. #' @param xunit A string specifying the unit in which age is measured #' (either `"decimal"`, `"days"` or `"months"`). -#' The default (`"decimal"`) means decimal age in years. +#' The default `"decimal"` corresponds to decimal age in years. #' @param prepend Character vector with column names in `data` that will #' be prepended to the returned data frame. This is useful for copying #' columns from data into the result, e.g., for matching. -#' @param key A string that selects a subset in the itembank that -#' makes up the key, the set of difficulty -#' estimates from a fitted Rasch model. -#' The built-in keys are: `"gsed2212"` (default), `"gsed2208"` (deprecated), -#' `"gsed2206"` (deprecated), `"gsed1912"`, `"lf2206"`, `"sf2206"`, `"gcdg"`, -#' and `"dutch"`. Since version 1.5.0, the `key = "gsed"` -#' selects the latest key starting with the string "gsed". -#' Use `key = ""` to use all item names, -#' which should only be done if there are no duplicate itemnames -#' in the itembank. -#' @param itembank A `data.frame` with columns -#' `key`, `item`, `tau`, `instrument`, `domain`, -#' `mode`, `number` and `label`. Only columns `item` -#' and `tau` are required. -#' The function uses `dscore::builtin_itembank` by -#' default. #' @param metric A string, either `"dscore"` (default) or #' `"logit"`, signalling the metric in which ability is estimated. -#' @param prior_mean A string specifying where the mean of the -#' prior for the D-score calculation should come from. It could be -#' a column name in `data` (when you want your own prior for every row), -#' but normally this is one of the keywords `".dutch"`, `".gcdg"` -#' or `".phase1"`. -#' The default depends on the `key`. If `key == "dutch"` then -#' `prior_mean = ".dutch"`. The choice `prior_mean = ".dutch"` -#' calculates `prior_mean` from the Count model coded in -#' `dscore:::count_mu_dutch()`). -#' If `key` is #' `"gcdg"`, `"gsed1912"`, -#' `"gsed2206"`, `"lf2206"` or `"sf2206"` then `prior_mean = ".gcdg"`. -#' This setting calculates an age-dependent prior mean internally according -#' to function `dscore:::count_mu_gcdg()`. -#' In other cases, `prior_mean = ".phase1"` -#' which uses the function `dscore:::count_mu_phase1()` or -#' `dscore:::count_mu_phase1_healthy()`. -#' Normally, you should not touch this parameter, but feel free to use -#' `prior_mean` to override the automatic choices. -#' @param prior_sd A string specifying a column name in `data` -#' with the standard deviation of the prior for the D-score calculation. -#' If not specified, the standard deviation is taken as 5 for every row. -#' @param transform Vector of length 2, signalling the intercept -#' and slope respectively of the linear transform that converts an -#' observation in the logit scale to the the D-score scale. Only -#' needed if `metric == "logit"`. +#' `daz` is not calculated for the logit scale. +#' @param prior_mean `NULL` (default), a string, a numeric scalar, or +#' a numeric vector with `nrow(data)` elements. The default value +#' `NULL` will consult the `base_population` field in `builtin_keys`, +#' and use the corresponding median of that reference as prior mean for +#' the D-score. The string should refer to a column name in `data` +#' that contains user-supplied values of the prior mean for each observation. +#' A numeric scalar will be expanded to all observations. A numeric vector +#' will be used as is. +#' @param prior_mean_NA `NULL` (default) or a scalar numeric, representing +#' the prior mean for observations with missing ages. By default, D-scores +#' with missing ages will we `NA`. We suggest setting +#' `prior_mean_NA = 50` as a reasonable choice for samples between 0-3 +#' years. The argument is ignored if `prior_mean` is specified per +#' observation, which gives you full control of priors for observations +#' with missing ages. +#' @param prior_sd `NULL` (default), a string, a numeric scalar, or +#' a numeric vector with `nrow(data)` elements. The default (`NULL`) +#' uses a value of 5 for all ages. The string should refer to a column +#' name in `data` that contains user-supplied values of the prior sd +#' for each observation. A numeric scalar will be expanded to all +#' observations. A numeric vector will be used as is. +#' @param prior_sd_NA `NULL` (default) or a scalar numeric, representing +#' the prior sd for observations with missing ages. By default, D-scores +#' with missing ages will we `NA`. We suggest setting +#' `prior_sd_NA = 20` as a reasonable choice for samples between 0-3 +#' years. The argument is ignored if `prior_sd` is specified per +#' observation, which gives you full control of priors for observations +#' with missing ages. +#' @param transform Numeric vector, length 2, containing the intercept +#' and slope of the linear transform from the logit scale into the +#' the D-score scale. The default (`NULL`) searches `builtin_keys` +#' for intercept and slope values. #' @param qp Numeric vector of equally spaced quadrature points. -#' This vector should span the range of all D-score values. The default -#' (`qp = -10:100`) is suitable for age range 0-4 years. -#' @param population A string describing the population. Currently -#' supported are `"phase1"` (default), `"dutch"`, `"gcdg"`. +#' This vector should span the range of all D-score or logit values. +#' The default (`NULL`) creates `seq(from, to, by)` searching the +#' arguments from `builtin_keys`. #' @param dec A vector of two integers specifying the number of #' decimals for rounding the D-score and DAZ, respectively. #' The default is `dec = c(2L, 3L)`. @@ -80,32 +86,48 @@ #' next item is outside the relevance interval around EAP, the procedure #' ignore the score on the item. The default is `c(-Inf, +Inf)` does not #' ignore scores. -#' @return -#' The `dscore()` function returns a `data.frame` with `nrow(data)` rows. -#' Optionally, the first block of columns can be specified by `prepend` -#' are copied from `data`. The second block consists of the +#' @param algorithm Computational method, for backward compatibility. +#' Either `"current"` (default) or `"1.8.7"` (deprecated). +#' @param verbose Logical. Print settings. +#' +#' @return The `dscore()` function returns a `data.frame` with `nrow(data)` rows. +#' Optionally, the first block of columns can be copied to the +#' result by using `prepend`. The second block consists of the #' following columns: #' #' Name | Label #' --- | --------- -#' `a` | Decimal age +#' `a` | Decimal age (years) #' `n` | Number of items with valid (0/1) data #' `p` | Percentage of passed milestones -#' `d` | Ability estimate, mean of posterior +#' `d` | D-score, mean of posterior distribution #' `sem` | Standard error of measurement, standard deviation of the posterior -#' `daz` | D-score corrected for age, calculated in Z-scale +#' `daz` | D-score corrected for age, calculated in Z-scale (for metric `"dscore"`) +#' +#' The D-score in column `d` is a linear scale, with values usually ranging +#' from 0 to 100. The D-score is `NA` if age is missing or if age is lower +#' than -1/12. It is possible to calculate D-scores for cases with missing ages +#' by setting `prior_mean_NA` and `prior_sd_NA` to some reasonable value, e.g., +#' `prior_mean_NA = 50` and `prior_sd_NA = 20`, for the sample at hand. +#' +#' The SEM is a positive number that quantifies the uncertainty of the D-score. +#' It is `NA` if the D-score is `NA`. #' -#' The `dscore_posterior()` function returns a data frame with -#' `nrow(data)` rows and `length(qp)` plus prepended columns with the -#' density at each quadrature point. A row vector representes the full -#' posterior ability distribution. If no valid responses are found, -#' `dscore_posterior()` returns the prior density. Versions prior to -#' 1.8.5 returned a `matrix` (instead of a `data.frame`). Code that depends on -#' the result being a `matrix` may break and needs to be adapted. +#' The DAZ in column `daz` is a Z-score that corrects the D-score for age. It +#' is `NA` when there are no reference values for the given age, or when +#' the D-score is extremely unlikely to be valid at the given age. +#' +#' Advanced applications: The `dscore_posterior()` function returns a +#' data frame with `nrow(data)` rows and `length(qp)` plus prepended columns +#' with the full posterior density of the D-score at each quadrature point. +#' If no valid responses are found, `dscore_posterior()` returns the +#' prior density. Versions prior to 1.8.5 returned a `matrix` (instead of +#' a `data.frame`). Code that depends on the result being a `matrix` may break +#' and may need adaptation. #' #' @details -#' The algorithm is based on the method by Bock and Mislevy (1982). The -#' method uses Bayes rule to update a prior ability into a posterior +#' The scoring algorithm is based on the method by Bock and Mislevy (1982). +#' The method uses Bayes rule to update a prior ability into a posterior #' ability. #' #' The item names should correspond to the `"gsed"` lexicon. @@ -115,29 +137,29 @@ #' Key | Model | Quadrature | Instruments | Direct/Caregiver | Reference #' --- | -----:| ----------:| ----------: |:----------------:|:--------- #' `"dutch"` | `75_0` | `-10:80` | 1 | direct | Van Buuren, 2014/2020 -#' `"gcdg"` | `565_18` | `-10:100` | 14 | direct | Weber, 2019 -#' `"gsed1912"` | `807_17` | `-10:100` | 20 | mixed | GSED Team, 2019 -#' `"gsed2206"` | `818_17` | `-10:100` | 22 | mixed | GSED Team, 2022 -#' `"gsed2208"` | `818_6` | `-10:100` | 22 | mixed | GSED Team, 2022 -#' `"gsed2212"` | `818_6` | `-10:100` | 22 | mixed | GSED Team, 2022 -#' `"lf2206"` | `155_0` | `-10:100` | 1 | direct | GSED Team, 2022 -#' `"sf2206"` | `139_0` | `-10:100` | 1 | caregiver | GSED Team, 2022 +#' `"gcdg"` | `565_18` | `-10:100` | 13 | direct | Weber, 2019 +#' `"gsed1912"` | `807_17` | `-10:100` | 21 | mixed | GSED Team, 2019 +#' `"293_0"` | `293_0` | `-10:100` | 2 | mixed | GSED Team, 2022 +#' `"gsed2212"` | `818_6` | `-10:100` | 27 | mixed | GSED Team, 2022 +#' `"gsed2406"` | `818_6` | `-10:100` | 27 | mixed | GSED Team, 2024 +#' `"gsed2510"` | `281_0` | `-10:125` | 3 | mixed | GSED Team, 2025 #' #' As a general rule, one should only compare D-scores #' that are calculated using the same key and the same #' set of quadrature points. For calculating D-scores on new data, -#' the advice is to use the default, which currently links to -#' `"gsed2212"`. +#' the advice is to use the default, which currently is `"gsed2510"`. +#' Currently, key `"gsed2510"` is defined for instrument codes `gs1` +#' (GSED SF), `gl1` (GSED LF) and `gh1` (GSED HF). If you +#' have another instrument, use the key `"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 internal functions -#' `dscore:::count_mu_phase1()`, `dscore:::count_mu_gcdg()` and -#' `dscore:::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 `[get_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 thus somewhat informative for low numbers of -#' valid 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 #' Bock DD, Mislevy RJ (1982). @@ -157,30 +179,41 @@ #' #' #' @author Stef van Buuren, Iris Eekhout, Arjan Huizing (2022) -#' @seealso [get_tau()], -#' [builtin_itembank()], [posterior()], -#' [builtin_references()] +#' @seealso [builtin_keys()], [builtin_itembank()], [builtin_itemtable()], +#' [builtin_references()], [get_tau()], [posterior()], [milestones()] #' @examples +#' # using all defaults and properly formatted data +#' sf <- dscore::triple[, 1:141] +#' ds <- dscore(sf) +#' head(ds) +#' +#' # step-by-step example demonstrating +#' # all possible response vectors for 3 items #' data <- data.frame( -#' id = c("Jane", "Martin", "ID-3", "No. 4", "Five", "6", -#' NA_character_, as.character(8:10)), +#' id = c( +#' "Jane", "Martin", "ID-3", "No. 4", "Five", "6", +#' NA_character_, as.character(8:10)), #' age = rep(round(21 / 365.25, 4), 10), -#' ddifmd001 = c(NA, NA, 0, 0, 0, 1, 0, 1, 1, 1), -#' ddicmm029 = c(NA, NA, NA, 0, 1, 0, 1, 0, 1, 1), -#' ddigmd053 = c(NA, 0, 0, 1, 0, 0, 1, 1, 0, 1) +#' gs1sec001 = c(NA, NA, 0, 0, 0, 1, 0, 1, 1, 1), +#' gs1moc002 = c(NA, NA, NA, 0, 1, 0, 1, 0, 1, 1), +#' gs1sec003 = c(NA, 0, 0, 1, 0, 0, 1, 1, 0, 1) #' ) +#' +#' # what are these items? #' items <- names(data)[3:5] +#' get_labels(items) #' -#' # third item is not part of default key -#' get_tau(items) +#' # difficulty parameter in default key +#' get_tau(items, verbose = TRUE) #' #' # calculate D-score +#' # the same sumscore leads to the same D-score (column d) #' dscore(data) #' #' # prepend id variable to output #' dscore(data, prepend = "id") #' -#' # prepend all data +#' # or prepend all data #' # dscore(data, prepend = colnames(data)) #' #' # calculate full posterior @@ -189,38 +222,74 @@ #' # check that rows sum to 1 #' rowSums(p) #' -#' # plot posterior for row 7 -#' barplot(as.matrix(p[7, 12:29]), names = 1:18, -#' xlab = "D-score", ylab = "Density", -#' main = "Full D-score posterior for measurement in row 7") +#' # plot full posterior for measurement 7 +#' barplot(as.matrix(p[7, 12:36]), +#' names = 1:25, +#' xlab = "D-score", ylab = "Density", col = "grey", +#' main = "Full D-score posterior for measurement in row 7", +#' sub = "D-score (EAP) = 11.58, SEM = 3.99") +#' +#' # 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) +#' matplot( +#' x = matrix(g$age, ncol = 3), y = matrix(d, ncol = 3), type = "l", +#' lty = 1, col = "blue", xlab = "Age (years)", ylab = "D-score", +#' main = "D-score preliminary standards: P10, P50 and P90") +#' abline(h = seq(10, 80, 10), v = seq(0, 4, 0.5), col = "gray", lty = 2) +#' +#' # add measurements made on very preterms, ga < 32 weeks +#' # we need key = "gsed2406" because DDI is not yet in key "gsed2510" +#' ds <- dscore(milestones, key = "gsed2406") +#' points(x = ds$a, y = ds$d, pch = 19, col = "red") #' @export -dscore <- function(data, - items = names(data), - xname = "age", - xunit = c("decimal", "days", "months"), - prepend = NULL, - key = NULL, - itembank = dscore::builtin_itembank, - metric = c("dscore", "logit"), - prior_mean = NULL, - prior_sd = NULL, - transform = NULL, - qp = -10:100, - population = NULL, - dec = c(2L, 3L), - relevance = c(-Inf, Inf)) { +dscore <- function( + data, + items = names(data), + key = NULL, + population = NULL, + xname = "age", + xunit = c("decimal", "days", "months"), + prepend = NULL, + itembank = NULL, + metric = c("dscore", "logit"), + prior_mean = NULL, + prior_mean_NA = NULL, + prior_sd = NULL, + prior_sd_NA = NULL, + transform = NULL, + qp = NULL, + dec = c(2L, 3L), + relevance = c(-Inf, Inf), + algorithm = c("current", "1.8.7"), + verbose = FALSE +) { xunit <- match.arg(xunit) metric <- match.arg(metric) + algorithm <- match.arg(algorithm) + data <- as.data.frame(data) calc_dscore( - data = data, items = items, xname = xname, xunit = xunit, + data = data, + items = items, + key = key, + population = population, + xname = xname, + xunit = xunit, prepend = prepend, - key = key, itembank = itembank, metric = metric, - prior_mean = prior_mean, prior_sd = prior_sd, - transform = transform, qp = qp, - population = population, dec = dec, + itembank = itembank, + metric = metric, + prior_mean = prior_mean, + prior_mean_NA = prior_mean_NA, + prior_sd = prior_sd, + prior_sd_NA = prior_sd_NA, + transform = transform, + qp = qp, + dec = dec, posterior = FALSE, - relevance = relevance + relevance = relevance, + algorithm = algorithm, + verbose = verbose ) } @@ -228,91 +297,92 @@ dscore <- function(data, #' distribution of the D-score. #' @rdname dscore #' @export -dscore_posterior <- function(data, - items = names(data), - xname = "age", - xunit = c("decimal", "days", "months"), - prepend = NULL, - key = NULL, - itembank = dscore::builtin_itembank, - metric = c("dscore", "logit"), - prior_mean = NULL, - prior_sd = NULL, - transform = NULL, - qp = -10:100, - population = NULL, - dec = c(2L, 3L), - relevance = c(-Inf, Inf)) { - +dscore_posterior <- function( + data, + items = names(data), + key = NULL, + population = NULL, + xname = "age", + xunit = c("decimal", "days", "months"), + prepend = NULL, + itembank = NULL, + metric = c("dscore", "logit"), + prior_mean = NULL, + prior_mean_NA = NULL, + prior_sd = NULL, + prior_sd_NA = NULL, + transform = NULL, + qp = NULL, + dec = c(2L, 3L), + relevance = c(-Inf, Inf), + algorithm = c("current", "1.8.7"), + verbose = FALSE +) { xunit <- match.arg(xunit) metric <- match.arg(metric) + algorithm <- match.arg(algorithm) + data <- as.data.frame(data) calc_dscore( - data = data, items = items, xname = xname, xunit = xunit, prepend = prepend, - key = key, itembank = itembank, metric = metric, - prior_mean = prior_mean, prior_sd = prior_sd, - transform = transform, qp = qp, - population = population, dec = dec, + data = data, + items = items, + key = key, + population = population, + xname = xname, + xunit = xunit, + prepend = prepend, + itembank = itembank, + metric = metric, + prior_mean = prior_mean, + prior_mean_NA = prior_mean_NA, + prior_sd = prior_sd, + prior_sd_NA = prior_sd_NA, + transform = transform, + qp = qp, + dec = dec, posterior = TRUE, - relevance = relevance + relevance = relevance, + algorithm = algorithm, + verbose = verbose ) } -calc_dscore <- function(data, items, xname, xunit, prepend, - key, itembank, metric, - prior_mean, prior_sd, - transform, qp, - population, dec, - posterior, - relevance) { +calc_dscore <- function( + data, + items, + key, + population, + xname, + xunit, + prepend, + itembank, + metric, + prior_mean, + prior_mean_NA, + prior_sd, + prior_sd_NA, + transform, + qp, + dec, + posterior, + relevance, + algorithm, + verbose +) { stopifnot(length(relevance) == 2L) - # set default key - if (is.null(key) || key == "gsed") { - key <- "gsed2212" - } - - # set default reference population for DAZ - if (is.null(population)) { - if (key %in% c("gsed2212", "gsed2208", "293_0")) - population <- "phase1" - if (key %in% c("gcdg", "gsed1912", "gsed2206", "lf2206", "sf2206", "294_0")) - population <- "gcdg" - if (key %in% c("dutch")) - population <- "dutch" - if (is.null(population)) { - population <- "phase1" - warning("Could not set 'population' argument. Uses phase1.") - } - } - - # set default column name of prior_mean - if (is.null(prior_mean)) { - prior_mean <- switch(population, - phase1 = ".phase1", - phase1_health = ".phase1_healthy", - gcdg = ".gcdg", - dutch = ".dutch", - "other") - if (prior_mean == "other") { - prior_mean <- ".phase1" - warning("Inherits prior mean from population phase1. Set prior_mean = '.phase1' to silence this warning.") - } - } + init <- init_key(key, population, transform, qp) + key <- init$key + population <- init$population + transform <- init$transform + qp <- init$qp - # set default transform if needed - if (is.null(transform) && metric == "logit") { - transform <- switch(population, - phase1 = c(54.939147, 4.064264), - gcdg = c(66.174355, 2.073871), - dutch = c(38.906, 2.1044)) - # if (key %in% c("gsed2208", "293_0")) - # transform <- c(54.939147, 4.064264) - # if (key %in% c("gcdg", "gsed1912", "gsed2206", "lf2206", "sf2206")) - # transform <- c(66.174355, 2.073871) - # if (key %in% c("dutch")) - # transform <- c(38.906, 2.1044) # van buuren 2014 - if (is.null(transform)) stop("Could not set 'transform' argument.") + if (verbose) { + cat("key: ", key, "\n") + cat("population: ", population, "\n") + cat("transform: ", transform, "\n") + cat("qp range: ", range(qp), "\n") + cat("algorithm: ", algorithm, "\n") } # handle zero rows @@ -330,14 +400,26 @@ calc_dscore <- function(data, items, xname, xunit, prepend, } # get decimal age - if (!xname %in% names(data)) stop("Variable `", xname, "` not found") - decage <- switch(xunit, - decimal = round(data[[xname]], 4L), - months = round(data[[xname]] / 12, 4L), - days = round(data[[xname]] / 365.25, 4L), - rep(NA, nrow(data)) + if (!xname %in% names(data)) { + stop("Variable `", xname, "` not found") + } + a <- switch( + xunit, + decimal = round(data[[xname]], 4L), + months = round(data[[xname]] / 12, 4L), + days = round(data[[xname]] / 365.25, 4L), + rep(NA, nrow(data)) ) + # check the itembank + if (is.null(itembank)) { + itembank <- dscore::builtin_itembank + } else { + if (!all(c("key", "item", "tau") %in% colnames(itembank))) { + stop("itembank must have columns 'key', 'item' and 'tau'") + } + } + # obtain difficulty estimates ib <- data.frame( item = items, @@ -353,35 +435,27 @@ calc_dscore <- function(data, items, xname, xunit, prepend, if (length(items) == 0L) { return( data.frame( - a = decage, + a = a, n = 0L, - p = NA, - d = NA, - sem = NA, - daz = NA + p = NA_real_, + d = NA_real_, + sem = NA_real_, + daz = NA_real_ ) ) } - # initialise prior mean (mu) - mu <- rep(NA, nrow(data)) - if (prior_mean == ".gcdg") { - mu <- count_mu_gcdg(decage) - } else if (prior_mean == ".dutch") { - mu <- count_mu_dutch(decage) - } else if (prior_mean == ".phase1") { - mu <- count_mu_phase1(decage) - } else if (prior_mean == ".phase1_healthy") { - mu <- count_mu_phase1_healthy(decage) - } else if (prior_mean %in% names(data)) { - mu <- data[[prior_mean]] - } - # if (any(is.na(mu))) stop("Missing values in prior mean found.") + # initialize prior mean mu and standard deviation sd + mu <- init_mu(data, key, a, prior_mean, prior_mean_NA) + sd <- init_sd(data, key, a, prior_sd, prior_sd_NA) - # determine sd for the prior - sd <- rep(5, nrow(data)) - if (is.character(prior_sd) && prior_sd %in% names(data)) - sd <- data[[prior_sd]] + # In D-score scale, set scale expansion + scale <- switch( + algorithm, + "current" = transform[2L], + "1.8.7" = 1, + transform[2L] + ) # setup for logit scale if (metric == "logit") { @@ -389,38 +463,44 @@ calc_dscore <- function(data, items, xname, xunit, prepend, qp <- (qp - transform[1L]) / transform[2L] mu <- (mu - transform[1L]) / transform[2L] sd <- sd / transform[2L] + scale <- switch(algorithm, "current" = 1, "1.8.7" = 1 / transform[2], 1) } # bind difficulty estimates to data - data2 <- data %>% - mutate(a = decage) %>% + data2 <- data |> mutate( + a = a, mu = mu, sd = sd, .rownum = 1L:n() - ) %>% - select(all_of(c(".rownum", "a", "mu", "sd", items))) %>% + ) |> + select(all_of(c(".rownum", "a", "mu", "sd", items))) |> pivot_longer( - cols = all_of(items), names_to = "item", - values_to = "score", values_drop_na = TRUE - ) %>% - arrange(.data$.rownum, .data$item) %>% + cols = all_of(items), + names_to = "item", + values_to = "score", + values_drop_na = TRUE + ) |> + arrange(.data$.rownum, .data$item) |> left_join(ib, by = "item") # if dscore_posterior() was called if (posterior) { - data3 <- data2 %>% - group_by(.data$.rownum) %>% + data3 <- data2 |> + group_by(.data$.rownum) |> summarise( - w = list(calculate_posterior( - scores = .data$score, - tau = .data$tau, - qp = qp, - mu = (.data$mu)[1L], - sd = (.data$sd)[1L], - relhi = relevance[2L], - rello = relevance[1L] - )$posterior) + w = list( + calculate_posterior( + scores = .data$score, + tau = .data$tau, + qp = qp, + scale = scale[1L], + mu = (.data$mu)[1L], + sd = (.data$sd)[1L], + relhi = relevance[2L], + rello = relevance[1L] + )$posterior + ) ) # unlist the posterior and store in proper row @@ -433,9 +513,10 @@ calc_dscore <- function(data, items, xname, xunit, prepend, if (!is.null(f)) { data4[i, ] <- f } else { - data4[i, ] <- dnorm(qp, - mean = as.double(data2[i, "mu"]), - sd = as.double(data2[i, "sd"]) + data4[i, ] <- dnorm( + qp, + mean = as.double(data2[i, "mu"]), + sd = as.double(data2[i, "sd"]) ) } } @@ -445,58 +526,74 @@ calc_dscore <- function(data, items, xname, xunit, prepend, # if dscore() was called if (!posterior) { # summarise n, p, d and sem - data3 <- data2 %>% - group_by(.data$.rownum, .data$a) %>% + data3 <- data2 |> + group_by(.data$.rownum, .data$a) |> summarise( n = n(), p = round(mean(.data$score), digits = 4L), x = list(qp), - w = list(calculate_posterior( - scores = .data$score, - tau = .data$tau, - qp = qp, - mu = (.data$mu)[1L], - sd = (.data$sd)[1L], - relhi = relevance[2L], - rello = relevance[1L] - )$posterior) + w = list( + calculate_posterior( + scores = .data$score, + tau = .data$tau, + qp = qp, + scale = scale[1L], + mu = (.data$mu)[1L], + sd = (.data$sd)[1L], + relhi = relevance[2L], + rello = relevance[1L] + )$posterior + ) ) - data4 <- data3 %>% - group_by(.data$.rownum, .data$a, .data$n, .data$p) %>% + data4 <- data3 |> + group_by(.data$.rownum, .data$a, .data$n, .data$p) |> summarise( d = weighted.mean(x = unlist(.data$x), w = unlist(.data$w)), sem = sqrt(sum(unlist(.data$w) * (unlist(.data$x) - unlist(.data$d))^2)) ) - # add daz, shape end result - data5 <- data.frame(.rownum = seq_len(nrow(data))) %>% - left_join(data4, by = ".rownum") %>% + # add n and d + data5 <- data.frame(.rownum = seq_len(nrow(data))) |> + left_join(data4, by = ".rownum") |> mutate( n = recode(.data$n, .missing = 0L), - d = round(.data$d, digits = dec[1L]), - daz = daz( - d = .data$d, x = .data$a, - reference = get_reference(population), - dec = dec[2L]), - daz = ifelse(is.nan(.data$daz), NA, .data$daz) - ) %>% - select(all_of(c("a", "n", "p", "d", "sem", "daz"))) + d = round(.data$d, digits = dec[1L]) + ) + + # add n and d daz, shape end result + reference_table <- get_reference( + population = population, + key = key, + verbose = verbose + ) + if (nrow(reference_table)) { + data5$daz <- daz( + d = data5$d, + x = data5$a, + reference_table = reference_table, + dec = dec[2L] + ) + } else { + data5$daz = NA_real_ + } + data5 <- select(data5, all_of(c("a", "n", "p", "d", "sem", "daz"))) + data5$sem[is.nan(data5$sem)] <- NA_real_ } # prepend administrative variables from data nfo <- setdiff(prepend, colnames(data)) if (length(nfo)) { - warning("Not found: ", - paste(nfo, collapse = ", "), - call. = FALSE) + warning("Not found: ", paste(nfo, collapse = ", "), call. = FALSE) } adm <- intersect(colnames(data), prepend) dup <- intersect(colnames(data5), adm) if (length(dup)) { - warning("Overwrites column(s): ", - paste(dup, collapse = ", "), - call. = FALSE) + warning( + "Overwrites column(s): ", + paste(dup, collapse = ", "), + call. = FALSE + ) adm <- setdiff(adm, dup) } if (length(adm)) { diff --git a/R/get_age_equivalent.R b/R/get_age_equivalent.R index 280763a4..57dc06d0 100644 --- a/R/get_age_equivalent.R +++ b/R/get_age_equivalent.R @@ -3,72 +3,68 @@ #' This function calculates the ages at which a certain percent #' in the reference population passes the items. #' +#' @note #' The function internally defines a scale factor given the key. #' #' @inheritParams dscore #' @param pct Numeric vector with requested percentiles (0-100). The #' default is `pct = c(10, 50, 90)`. #' @inheritParams dscore -#' @return Tibble with four columns: `item`, `d` (*D*-score), +#' @return `data.frame` with four columns: `item`, `d` (D-score), #' `pct` (percentile), and `a` (age-equivalent, in `xunit` units). #' @examples -#' get_age_equivalent(c("gpagmc018", "gtogmd026", "ddicmm050")) +#' get_age_equivalent(c("gpagmc018", "gtogmd026", "ddicmm050"), +#' key = "gsed2406", population = "dutch", verbose = TRUE) #' @export -get_age_equivalent <- function(items, - pct = c(10, 50, 90), - key = NULL, - itembank = dscore::builtin_itembank, - population = NULL, - xunit = c("decimal", "days", "months")) { +get_age_equivalent <- function( + items, + pct = c(10, 50, 90), + key = NULL, + population = NULL, + transform = NULL, + itembank = dscore::builtin_itembank, + xunit = c("decimal", "days", "months"), + verbose = FALSE +) { xunit <- match.arg(xunit) - # set default key - if (is.null(key) || key == "gsed") { - key <- "gsed2212" - } + init <- init_key(key, population, transform, qp = NULL) + key <- init$key + population <- init$population + transform <- init$transform - # set default reference population for DAZ - if (is.null(population)) { - if (key %in% c("gsed2212", "gsed2208", "293_0")) - population <- "phase1" - if (key %in% c("gcdg", "gsed1912", "gsed2206", "lf2206", "sf2206", "294_0")) - population <- "gcdg" - if (key %in% c("dutch")) - population <- "dutch" - if (is.null(population)) { - population <- "phase1" - warning("Could not set population argument. Uses phase1.") - } + if (verbose) { + cat("key: ", key, "\n") + cat("population: ", population, "\n") + cat("transform: ", transform, "\n") } - # set scalefactor - scalefactor <- switch(population, - phase1 = 4.064264, - gcdg = 2.073871, - dutch = 2.1044, - NA) - if (is.na(scalefactor)) stop("Could not set scale factor for population.") - # obtain difficulty estimates - ib <- tibble( + ib <- data.frame( item = items, - d = get_tau(items = items, key = key, itembank = itembank)) + d = get_tau(items = items, key = key, itembank = itembank) + ) # get reference - reference <- get_reference(population) + rt <- get_reference(population = population, key = key) # calculate age-equivalent percentiles - ib <- ib %>% - slice(rep(seq_along(items), each = length(pct))) %>% + ib <- ib |> + slice(rep(seq_along(items), each = length(pct))) |> mutate( pct = rep(pct, length(items)), - d = .data$d + scalefactor * qlogis(.data$pct / 100), - a = approx(x = reference$mu, y = reference$age, xout = .data$d)$y + d = .data$d + qlogis(.data$pct / 100, scale = transform[2]), + a = approx(x = rt$mu, y = rt$age, xout = .data$d)$y ) # convert to requested age unit - if (xunit == "days") ib$a <- round(ib$a * 365.25) - if (xunit == "months") ib$a <- round(ib$a * 12, 4L) + if (xunit == "days") { + ib$a <- round(ib$a * 365.25) + } + if (xunit == "months") { + ib$a <- round(ib$a * 12, 4L) + } - ib + rownames(ib) <- NULL + return(ib) } diff --git a/R/get_itemnames.R b/R/get_itemnames.R index f1636587..c73dc5c1 100644 --- a/R/get_itemnames.R +++ b/R/get_itemnames.R @@ -31,7 +31,7 @@ #' direct/caregiver/message, positions 7-9 is a item sequence number. #' #' @seealso [sort_itemnames()] -#' @author Stef van Buuren 2020 +#' @author Stef van Buuren #' @examples #' itemnames <- c("aqigmc028", "grihsd219", "", "age", "mdsgmd999") #' @@ -51,27 +51,55 @@ #' #' # get all item numbers 70 and 73 from gm domain #' get_itemnames(number = c(70, 73), domain = "gm") +#' +#' # get item names from GSED SF (2023 version) in published order +#' items_sf <- get_itemnames(instrument = "gs1", order = "indm") +#' +#' # get item names from GSED LF (2023 version) in published order +#' items_lf <- get_itemnames(instrument = "gl1") +#' items_lf <- items_lf[c(55:155, 1:54)] +#' #' @export -get_itemnames <- function(x, instrument = NULL, domain = NULL, - mode = NULL, number = NULL, strict = FALSE, - itemtable = NULL, - order = "idnm") { +get_itemnames <- function( + x, + instrument = NULL, + domain = NULL, + mode = NULL, + number = NULL, + strict = FALSE, + itemtable = NULL, + order = "idnm" +) { if (is.null(itemtable)) { builtin <- dscore::builtin_itemtable$item } else { builtin <- itemtable$item } - if (missing(x)) x <- builtin - if (is.data.frame(x)) x <- names(x) - if (inherits(x, "lean")) x <- unique(x[["itm"]]$item) + if (missing(x)) { + x <- builtin + } + if (is.data.frame(x)) { + x <- names(x) + } + if (inherits(x, "lean")) { + x <- unique(x[["itm"]]$item) + } if (strict) { z <- builtin[builtin %in% x] } else { z <- x[grep("^......\\d\\d\\d$", x)] } - if (!is.null(instrument)) z <- z[substr(z, 1, 3) %in% instrument] - if (!is.null(domain)) z <- z[substr(z, 4, 5) %in% domain] - if (!is.null(mode)) z <- z[substr(z, 6, 6) %in% mode] - if (!is.null(number)) z <- z[as.numeric(substr(z, 7, 9)) %in% number] + if (!is.null(instrument)) { + z <- z[substr(z, 1, 3) %in% instrument] + } + if (!is.null(domain)) { + z <- z[substr(z, 4, 5) %in% domain] + } + if (!is.null(mode)) { + z <- z[substr(z, 6, 6) %in% mode] + } + if (!is.null(number)) { + z <- z[as.numeric(substr(z, 7, 9)) %in% number] + } sort_itemnames(z, order = order) } diff --git a/R/get_itemtable.R b/R/get_itemtable.R index b64c9780..d57a846b 100644 --- a/R/get_itemtable.R +++ b/R/get_itemtable.R @@ -19,33 +19,41 @@ #' head(get_itemtable(), 3) #' get_itemtable(LETTERS[1:3], "") #' @export -get_itemtable <- function(items = NULL, itemtable = NULL, - decompose = FALSE) { - - if (is.null(itemtable)) itemtable <- dscore::builtin_itemtable - - # itemtable == "" is a special case for creating new items - else if (is.character(itemtable)) { - if (itemtable == "") - if (length(items)) - itemtable <- data.frame(item = items, - equate = NA_character_, - label = paste("Label for", items), - stringsAsFactors = FALSE) - else - itemtable <- data.frame(item = "", - equate = NA_character_, - label = paste("Label for", items), - stringsAsFactors = FALSE) +get_itemtable <- function(items = NULL, itemtable = NULL, decompose = FALSE) { + if (is.null(itemtable)) { + # itemtable == "" is a special case for creating new items + itemtable <- dscore::builtin_itemtable + } else if (is.character(itemtable)) { + if (itemtable == "") { + if (length(items)) { + itemtable <- data.frame( + item = items, + equate = NA_character_, + label = paste("Label for", items), + stringsAsFactors = FALSE + ) + } else { + itemtable <- data.frame( + item = "", + equate = NA_character_, + label = paste("Label for", items), + stringsAsFactors = FALSE + ) + } + } } - if (length(items)) + if (length(items)) { itemtable <- filter(itemtable, .data$item %in% items) + } itemtable <- select(itemtable, all_of(c("item", "equate", "label"))) - if (decompose) - itemtable <- bind_cols(itemtable, - decompose_itemnames(itemtable$item)) + if (decompose) { + itemtable <- bind_cols( + itemtable, + decompose_itemnames(itemtable$item) + ) + } itemtable } diff --git a/R/get_labels.R b/R/get_labels.R index e740e2bc..2ee0254c 100644 --- a/R/get_labels.R +++ b/R/get_labels.R @@ -15,13 +15,16 @@ #' get_labels(get_itemnames(instrument = "mac", number = 1:2), trim = 40) #' @export get_labels <- function(items = NULL, trim = NULL, itemtable = NULL) { - # construct variable names - if (is.null(items)) items <- get_itemnames(itemtable = itemtable) + if (is.null(items)) { + items <- get_itemnames(itemtable = itemtable) + } # obtain label label <- get_itemtable(items = items, itemtable = itemtable)$label - if (!is.null(trim)) label <- substr(label, 1L, trim) + if (!is.null(trim)) { + label <- substr(label, 1L, trim) + } names(label) <- get_itemtable(items = items, itemtable = itemtable)$item label[items] } diff --git a/R/get_mu.R b/R/get_mu.R new file mode 100644 index 00000000..5d196833 --- /dev/null +++ b/R/get_mu.R @@ -0,0 +1,196 @@ +#' Median D-score from the base population for a given key +#' +#' Returns the age-interpolated median of the D-score of the default +#' reference for a given key. +#' +#' Use `get_reference()` for more options. +#' @param t Decimal age, numeric vector +#' @param key Character, key of the reference population +#' @param prior_mean_NA Numeric, prior mean when age is missing +#' @return +#' A vector of length `length(t)` with the median of the default reference +#' population for the key. +#' @export +get_mu <- function(t, key, prior_mean_NA = NA_real_) { + # calculate P50 from the default population for the key + init <- init_key(key = key, population = NULL, transform = NULL, qp = NULL) + population <- init$population + mu <- switch( + population, + "dutch" = count_mu_dutch(t), + "gcdg" = count_mu_gcdg(t), + "phase1" = count_mu_phase1(t), + "preliminary_standards" = count_mu_preliminary_standards(t, key = init$key), + "who_descriptive" = count_mu_preliminary_standards(t, key = init$key), + rep(NA_real_, length(t)) + ) + mu[is.na(t)] <- prior_mean_NA + return(mu) +} + +#' Median D-score from the default references for the given key +#' +#' Returns the age-interpolated median of the D-score of the default +#' reference for a given key. +#' +#' Do not use this function if you want the median D-score for a specific +#' reference. +#' +#' DEPRECATED in dscore 1.9.6 +#' @param t Decimal age, numeric vector +#' @param key Character, key of the reference population +#' @param prior_mean_NA Numeric, prior mean when age is missing +#' @return +#' A vector of length `length(t)` with the median of the default reference +#' population for the key. +#' @export +count_mu <- function(t, key, prior_mean_NA = NA_real_) { + .Deprecated("get_mu") + get_mu(t, key, prior_mean_NA) +} + + +#' Median of Dutch references +#' +#' Returns the age-interpolated median of the Dutch references (van Buuren 2014). +#' The working range is 0-3 years. This function is used +#' to set prior mean under key `"dutch"`. +#' @param t Decimal age, numeric vector +#' @return +#' A vector of length `length(t)` with the median of the Dutch references. +#' @note Internal function. Called by `dscore()` +#' @examples +#' dscore:::count_mu_dutch(0:2) +count_mu_dutch <- function(t) { + suppressWarnings(44.35 - 1.8 * t + 28.47 * log(t + 0.25)) +} + +#' Median of GCDG references +#' +#' Returns the age-interpolated median of the GCDG references (Weber +#' et al, 2019). The working range is 0-4 years. This function is used +#' to set prior mean under keys `"gcdg"` and `"gsed1912"`. +#' @param t Decimal age, numeric vector +#' @return +#' A vector of length `length(t)` with the median of the GCDG references. +#' @note Internal function. Called by `dscore()` +#' @examples +#' dscore:::count_mu_gcdg(0:2) +count_mu_gcdg <- function(t) { + suppressWarnings(47.65 - 3.05 * t + 26.70 * log(t + 0.19)) +} + +#' Median of phase1 references +#' +#' Returns the age-interpolated median of the phase1 references +#' based on LF & SF in GSED-BGD, GSED-PAK, GSED-TZA. This function is used +#' to set prior mean under keys `"293_0"` and `"gsed2212"`. +#' +#' The interpolation is done in two rounds. First round: Calculate D-scores +#' using .gcdg prior-mean, calculate reference, estimate round 1 parameters +#' used in this function. Round 2: Calculate D-score using round 1 estimates as +#' the prior mean (most differences are within 0.1 D-score points), +#' recalculate references, estimate round 2 parameters used in this function. +#' +#' Round 1: +#' Count model: <= 9MN: 21.3449 + 26.4916 t + 7.0251(t + 0.2) +#' Count model: > 9Mn & <= 3.5 YR: 14.69947 - 12.18636 t + 69.11675(t + 0.92) +#' Linear model: > 3.5 YRS: 61.40956 + 3.80904 t +#' +#' Round 2: +#' Count model: < 9MND: 20.5883 + 27.3376 t + 6.4254(t + 0.2) +#' Count model: > 9MND & < 3.5 YR: 14.63748 - 12.11774 t + 69.05463(t + 0.92) +#' Linear model: > 3.5 YRS: 61.37967 + 3.83513 t +#' +#' The working range is 0-3.5 years. After the age of 3.5 years, the function +#' will increase at an arbitrary rate of 3.8 D-score points per year. +#' +#' @param t Decimal age, numeric vector +#' @return +#' A vector of length `length(t)` with the median of the GCDG references. +#' @note Internal function. Called by `dscore()` +#' @author Stef van Buuren, on behalf of GSED project +#' @examples +#' dscore:::count_mu_phase1(0:5) +count_mu_phase1 <- function(t) { + to <- !is.na(t) + t1 <- to & t <= 0.75 + t2 <- to & t > 0.75 & t <= 3.5 + t3 <- to & t > 3.5 + + # Round 1 model + # t[t1] <- suppressWarnings(21.3449 + 26.4916 * t[t1] + 7.0251 * log(t[t1] + 0.2)) + # t[t2] <- suppressWarnings(14.69947 - 12.18636 * t[t2] + 69.11675 * log(t[t2] + 0.92)) + # t[t3] <- suppressWarnings(61.40956 + 3.80904 * t[t3]) + + # Round 2 model + t[t1] <- suppressWarnings( + 20.5883 + 27.3376 * t[t1] + 6.4254 * log(t[t1] + 0.2) + ) + t[t2] <- suppressWarnings( + 14.63748 - 12.11774 * t[t2] + 69.05463 * log(t[t2] + 0.92) + ) + t[t3] <- suppressWarnings(61.37967 + 3.83513 * t[t3]) + + return(t) +} + +#' Median of preliminary_standards +#' +#' Returns the age-interpolated median of the preliminary_standards +#' based on LF & SF in seven GSED countries. This function is used +#' to set prior mean under keys `"gsed2406"` and `"gsed2510"`. +#' +#' @param t Decimal age, numeric vector +#' @param key Character, key name +#' @return +#' A vector of length `length(t)` with the median of the GCDG references. +#' @note Internal function. Called by `dscore()` +#' @author Stef van Buuren, on behalf of GSED project +#' @examples +#' dscore:::count_mu_preliminary_standards(0:5) +count_mu_preliminary_standards <- function(t, key = NULL) { + to <- !is.na(t) + t0 <- to & t < -1 / 12 + t1 <- to & t <= 0.75 + t2 <- to & t > 0.75 & t <= 3.5 + t3 <- to & t > 3.5 + + # Round 1 model + # t[t1] <- suppressWarnings(24.226 + 24.057 * t[t1] + 8.996 * log(t[t1] + 0.2)) + # t[t2] <- suppressWarnings(18.012 - 9.561 * t[t2] + 62.214 * log(t[t2] + 0.92)) + # t[t3] <- suppressWarnings(63.0822 + 3.9134 * t[t3]) + + # Round 3 model + # t[t1] <- suppressWarnings(24.486 + 23.912 * t[t1] + 9.165 * log(t[t1] + 0.2)) + # t[t2] <- suppressWarnings(18.391 - 9.245 * t[t2] + 61.361 * log(t[t2] + 0.92)) + # t[t3] <- suppressWarnings(61.5214 + 4.4309 * t[t3]) + + # Round 2 model + t[t0] <- NA_real_ + t[t1] <- suppressWarnings(24.522 + 23.886 * t[t1] + 9.190 * log(t[t1] + 0.2)) + t[t2] <- suppressWarnings(18.434 - 9.206 * t[t2] + 61.255 * log(t[t2] + 0.92)) + t[t3] <- suppressWarnings(62.6268 + 4 * t[t3]) + + return(t) +} + +# For completeness: mu-model for who_descriptive references +# Not used because we want to use mu from preliminary_standards +# as prior mean for both population "preliminary_standards" +# and "who_descriptive". +# +# ref1 <- reference[reference$age < 0.75, ] +# ref2 <- reference[reference$age >= 0.75 & reference$age < 3.5, ] +# ref3 <- reference[reference$age > 3, ] +# +# Count model: < 9MND: +# summary(mod <- lm(formula = mu ~ age + log(age + 10), data = ref1)) +# -2775.83728 - 75.02296 age + 1210.41737 log(age + 10) +# +# Count model: > 9MND & < 3.5 YR +# summary(mod <- lm(formula = mu ~ age + I(log(age + 0.25)), data = ref2)) +# 46.69057068 - 6.42038876 age + 39.77773960 log(age + 0.25) +# +# Linear model: > 3.5 YRS: 63.12172890 + 3.84445765 age +# SvB 20251010 diff --git a/R/get_reference.R b/R/get_reference.R index d146e1b0..8a389458 100644 --- a/R/get_reference.R +++ b/R/get_reference.R @@ -3,25 +3,35 @@ #' The `get_reference()` function selects the D-score reference #' distribution. #' -#' @param population A string describing the population. Currently supported -#' are `"dutch"`, `"gcdg"`, `"phase1"` or `"phase1_health"`. -#' The default is `"phase1"`, in sync with the default `key = "gsed"`. -#' @param references A `data.frame` with the same structure -#' as `builtin_references`. The default is to use -#' `builtin_references`. +#' @inheritParams dscore +#' @param references A `data.frame` with the same structure as `builtin_references`. +#' The default is to use `builtin_references`. +#' @param \dots Used to test whether the call contained the deprecated argument +#' `references`. #' @return A `data.frame` with the LMS reference values. #' @note No references for population `"gsed"` exist. #' The function will silently rewrite `population = "gsed"` #' into to the `population = "gsed"`. #' #' The `"dutch"` reference was published in Van Buuren (2014) +#' #' The `"gcdg"` was calculated from 15 cohorts with direct #' observations (Weber, 2019). +#' #' The `"phase1"` references were calculated from the GSED Phase 1 validation #' data (GSED-BGD, GSED-PAK, GSED-TZA) cover age range 2w-3.5 years. The #' age range 3.5-5 yrs is linearly extrapolated and are only indicative. -#' The `"phase1_healthy"` references were calculated from the GSED Phase 1 validation -#' using a subset of children with healthy development. +#' (Van Buuren et al, 2025) +#' +#' The `"preliminary_standards"` references were calculated from the GSED +#' Phase 1 validation using a subset of children with healthy development. +#' (Van Buuren et al, 2025) +#' +#' The `"who_descriptive"` references were calculated from the GSED +#' Phase 1 + 2 (Seven countries) validation study using the `"gsed2510"` key. +#' It is a descriptive reference, i.e., no selection of children growing +#' up in healthy environments was made. (In preparation for publication). +#' #' @references #' Van Buuren S (2014). Growth charts of human development. #' Stat Methods Med Res, 23(4), 346-368. @@ -34,11 +44,124 @@ #' BMJ Global Health, BMJ Global Health 4: e001724. #' . #' +#' van Buuren S, Eekhout I, McCray G, Lancaster GA, Waldman MR, McCoy DC, +#' Gladstone M, Cavallera, V, Dua T, Black MM, GSED Team (2025). +#' Enhancing comparability in early child development assessment with the +#' D-score. International Journal of Behavioral Development, 49(4), 348-364, +#' +#' #' @seealso [builtin_references()] +#' @examples +#' # see key-population combinations of builtin_references +#' table(builtin_references$key, builtin_references$population) +#' +#' # get the default reference +#' reftab <- get_reference() +#' head(reftab, 2) +#' +#' # get the default reference for the key "gsed2212" +#' reftab <- get_reference(key = "gsed2212", verbose = TRUE) +#' +#' # get dutch reference for default key +#' reftab <- get_reference(population = "dutch", verbose = TRUE) +#' +#' # loading a non-existing reference yield fallback to default +#' reftab <- get_reference(population = "france", verbose = TRUE) +#' +#' # if user specifies a builtin population (e.g. who_descriptive) and the key +#' # is not found, then it returns the specified reference for its most recent key +#' reftab <- get_reference(key = "none", population = "preliminary_standards", verbose = TRUE) +#' nrow(reftab) #' @export -get_reference <- function(population = "phase1", - references = dscore::builtin_references) { - # - # if (population == "gsed") population <- "gcdg" - references[references$pop == population, ] +get_reference <- function( + population = NULL, + key = NULL, + references = dscore::builtin_references, + verbose = FALSE, + ... +) { + user_specified_population <- ifelse(is.null(population), FALSE, TRUE) + + init <- init_key( + key = key, + population = population, + transform = NULL, + qp = NULL + ) + key <- init$key + population <- init$population + + if (verbose) { + cat("key: ", key, "\n") + cat("population: ", population, "\n") + } + + # filter rows from references + idx <- which(references$key == key & references$population == population) + if (!any(idx)) { + # use default reference `preliminary_standards` (calculated for gsed2406) + # if 1) key is one of the builtin keys and 2) the requested population in + # is not found for that key + + # If user speficies a builtin population, then find the most recent key + # and return the reference for that key + if ( + user_specified_population && + population %in% unique(dscore::builtin_references$population) + ) { + history <- c( + "gsed2510", + "gsed2406", + "gsed2212", + "293_0", + "gsed1912", + "gcdg", + "dutch" + ) + for (k in history) { + if (any(references$key == k & references$population == population)) { + key_new <- k + if (verbose) { + cat("Using key: ", key_new, "\n") + } + + idx <- which( + references$key == key_new & + references$population == population + ) + ref <- references[idx, ] + return(ref) + } + } + if (any(idx)) { + warning( + "Reference '", + population, + "' for key '", + key, + "' not found. Fallback: '", + population, + "' for key 'gsed2406'.", + call. = FALSE + ) + ref <- references[idx, ] + return(ref) + } + } + warning( + "Reference '", + population, + "' for key '", + key, + "' not found. Fallback: 'preliminary_standards' for key 'gsed2406'.", + call. = FALSE + ) + idx <- which( + references$key == "gsed2406" & + references$population == "preliminary_standards" + ) + } + + ref <- references[idx, ] + return(ref) } diff --git a/R/get_tau.R b/R/get_tau.R index 47be4784..2081a31d 100644 --- a/R/get_tau.R +++ b/R/get_tau.R @@ -13,12 +13,16 @@ #' # difficulty levels in the GHAP lexicon #' get_tau(items = c("ddifmd001", "DDigmd052", "xyz")) #' @export -get_tau <- function(items, - key = NULL, - itembank = dscore::builtin_itembank) { - # set default key - if (is.null(key) || key == "gsed") { - key <- "gsed2212" +get_tau <- function( + items, + key = NULL, + itembank = dscore::builtin_itembank, + verbose = FALSE +) { + key <- set_default_key(key) + + if (verbose) { + cat("key: ", key, "\n") } # if key = "", then search in all rows diff --git a/R/gsample.R b/R/gsample.R index 76d2bac6..b074a48f 100644 --- a/R/gsample.R +++ b/R/gsample.R @@ -16,6 +16,12 @@ #' #' There are 138 `gpa` items (item `gpamoc008` (clench fists) removed) from GSED SF and #' and 155 `gto` items from GSED LF. +#' +#' @details +#' On July 15, 2025, the item `gpaclc088` was renamed to `gpaclc089` +#' (Can you child say five or more separate words) and `gpasec089` was renamed +#' to `gpasec088` (Is your child able to pee and poo). +#' #' @examples #' head(gsample) #' @seealso [dscore()] @@ -38,6 +44,12 @@ #' `...` | and so on.. #' #' Sample data for 139 `gpa` items from GSED SF +#' +#' #' @details +#' On July 15, 2025, the item `gpaclc088` was renamed to `gpaclc089` +#' (Can you child say five or more separate words) and `gpasec089` was renamed +#' to `gpasec088` (Is your child able to pee and poo). +#' #' @examples #' head(sample_sf) #' @seealso [dscore()] @@ -71,7 +83,7 @@ #' 10 random children from the GSED Phase 1 data. #' #' @docType data -#' @format A `data.frame` with 10 rows and 57 variables: +#' @format A `data.frame` with 10 rows and 50 variables: #' #' Name | Label #' ---------- | --------- @@ -81,7 +93,10 @@ #' `hf002` | Integer, ...: 1 = yes, 0 = no, NA = not administered #' `...` | and so on.. #' -#' Sample data for 55 `gpa` items forming GSED HF V1 +#' Sample data for 48 `gpa` items forming GSED HF V1 +#' @note +#' The HF item set was revised on October 20, 2025 to contain 48 items. +#' This dataset reflects that change. #' @examples #' head(sample_hf) #' @seealso [dscore()] diff --git a/R/import.R b/R/import.R index f5a64e95..4ef470b2 100644 --- a/R/import.R +++ b/R/import.R @@ -1,10 +1,8 @@ -#' @importFrom dplyr arrange bind_cols filter group_by -#' intersect left_join -#' mutate n recode select slice summarise -#' tibble ungroup %>% .data +#' @importFrom dplyr all_of arrange bind_cols filter group_by +#' intersect left_join mutate n pull recode select +#' slice summarise ungroup .data #' @importFrom stats approx dnorm plogis qlogis weighted.mean qt pt #' pnorm qnorm -#' @importFrom stringr str_pad +#' @importFrom stringi stri_pad #' @importFrom tidyr pivot_longer -#' @importFrom tidyselect all_of NULL diff --git a/R/initialize.R b/R/initialize.R new file mode 100644 index 00000000..f1259638 --- /dev/null +++ b/R/initialize.R @@ -0,0 +1,75 @@ +init_key <- function(key, population, transform, qp) { + key <- set_default_key(key) + idx <- which(dscore::builtin_keys$key == key) + + population <- set_default_population(population, idx) + transform <- set_default_transform(transform, idx) + qp <- set_default_qp(qp, idx) + + result <- list( + key = key, + population = population, + transform = transform, + qp = qp + ) + + return(result) +} + +init_mu <- function(data, key, a, prior_mean, prior_mean_NA) { + if (is.null(prior_mean_NA)) { + prior_mean_NA <- NA_real_ + } + n <- length(a) + + # set prior mean mu per observation + if (is.null(prior_mean)) { + # default, use the key, handle NA + return(get_mu(a, key, prior_mean_NA)) + } + if (is.numeric(prior_mean) && length(prior_mean) == 1L) { + # scalar method, handle NA + mu <- rep(prior_mean, n) + mu[is.na(a)] <- prior_mean_NA + return(mu) + } + if (is.character(prior_mean) && prior_mean %in% names(data)) { + # column method + return(data[[prior_mean]]) + } + if (is.numeric(prior_mean) && length(prior_mean) == n) { + # vector method + return(prior_mean) + } + return(rep(NA_real_, n)) +} + +init_sd <- function(data, key, a, prior_sd, prior_sd_NA) { + if (is.null(prior_sd_NA)) { + prior_sd_NA <- NA_real_ + } + n <- length(a) + + # set prior sd per observation + if (is.null(prior_sd)) { + # default, use fixed value, handle NA + sd <- rep(5, n) + sd[is.na(a)] <- prior_sd_NA + return(sd) + } + if (is.numeric(prior_sd) && length(prior_sd) == 1L) { + # scalar method, handle NA + sd <- rep(prior_sd, n) + sd[is.na(a)] <- prior_sd_NA + return(sd) + } + if (is.character(prior_sd) && prior_sd %in% names(data)) { + # column method + return(data[[prior_sd]]) + } + if (is.numeric(prior_sd) && length(prior_sd) == n) { + # vector method + return(prior_sd) + } + return(rep(NA_real_, n)) +} diff --git a/R/internal.R b/R/internal.R index a1f78d04..a59be8e6 100644 --- a/R/internal.R +++ b/R/internal.R @@ -13,80 +13,139 @@ # note = {R package version 6.0-3}, # url = {https://CRAN.R-project.org/package=gamlss.dist}} -qBCT <- function (p, mu = 5, sigma = 0.1, nu = 1, tau = 2, lower.tail = TRUE, - log.p = FALSE, na.rm = TRUE) -{ - if (any(mu < 0, na.rm = na.rm)) +qBCT <- function( + p, + mu = 5, + sigma = 0.1, + nu = 1, + tau = 2, + lower.tail = TRUE, + log.p = FALSE, + na.rm = TRUE +) { + if (any(mu < 0, na.rm = na.rm)) { stop(paste("mu must be positive", "\n", "")) - if (any(sigma < 0, na.rm = na.rm)) + } + if (any(sigma < 0, na.rm = na.rm)) { stop(paste("sigma must be positive", "\n", "")) - if (any(tau < 0, na.rm = na.rm)) + } + if (any(tau < 0, na.rm = na.rm)) { stop(paste("tau must be positive", "\n", "")) - if (log.p == TRUE) + } + if (log.p == TRUE) { p <- exp(p) - else p <- p - if (any(p <= 0, na.rm = na.rm) | any(p >= 1, na.rm = na.rm)) + } else { + p <- p + } + if (any(p <= 0, na.rm = na.rm) | any(p >= 1, na.rm = na.rm)) { stop(paste("p must be between 0 and 1", "\n", "")) - if (lower.tail == TRUE) + } + if (lower.tail == TRUE) { p <- p - else p <- 1 - p + } else { + p <- 1 - p + } if (length(nu) > 1) { - z <- ifelse((nu <= 0), qt(p * pt(1/(sigma * abs(nu)), - tau), tau), qt(1 - (1 - p) * pt(1/(sigma * abs(nu)), - tau), tau)) - } - else { - z <- if (nu <= 0) - qt(p * pt(1/(sigma * abs(nu)), tau), tau) - else qt(1 - (1 - p) * pt(1/(sigma * abs(nu)), tau), tau) - } - if (length(nu) > 1) - ya <- ifelse(nu != 0, mu * (nu * sigma * z + 1)^(1/nu), - mu * exp(sigma * z)) - else if (nu != 0) - ya <- mu * (nu * sigma * z + 1)^(1/nu) - else ya <- mu * exp(sigma * z) + z <- ifelse( + (nu <= 0), + qt( + p * + pt( + 1 / (sigma * abs(nu)), + tau + ), + tau + ), + qt( + 1 - + (1 - p) * + pt( + 1 / (sigma * abs(nu)), + tau + ), + tau + ) + ) + } else { + z <- if (nu <= 0) { + qt(p * pt(1 / (sigma * abs(nu)), tau), tau) + } else { + qt(1 - (1 - p) * pt(1 / (sigma * abs(nu)), tau), tau) + } + } + if (length(nu) > 1) { + ya <- ifelse( + nu != 0, + mu * (nu * sigma * z + 1)^(1 / nu), + mu * exp(sigma * z) + ) + } else if (nu != 0) { + ya <- mu * (nu * sigma * z + 1)^(1 / nu) + } else { + ya <- mu * exp(sigma * z) + } ya[ya < 1.0 & !is.na(ya)] <- 1.0 ya } -pBCT <- function (q, mu = 5, sigma = 0.1, nu = 1, tau = 2, lower.tail = TRUE, - log.p = FALSE, na.rm = TRUE) -{ - if (any(mu < 0, na.rm = na.rm)) +pBCT <- function( + q, + mu = 5, + sigma = 0.1, + nu = 1, + tau = 2, + lower.tail = TRUE, + log.p = FALSE, + na.rm = TRUE +) { + if (any(mu < 0, na.rm = na.rm)) { stop(paste("mu must be positive", "\n", "")) - if (any(sigma < 0, na.rm = na.rm)) + } + if (any(sigma < 0, na.rm = na.rm)) { stop(paste("sigma must be positive", "\n", "")) - if (any(tau < 0, na.rm = na.rm)) + } + if (any(tau < 0, na.rm = na.rm)) { stop(paste("tau must be positive", "\n", "")) + } # recode D-score < 1 to 1. q[q < 1.0 & !is.na(q)] <- 1.0 # added check - if (length(nu) == 1L && is.na(nu)) + if (length(nu) == 1L && is.na(nu)) { return(NA) - if (length(nu) > 1) - z <- ifelse(nu != 0, (((q/mu)^nu - 1)/(nu * sigma)), - log(q/mu)/sigma) - else if (nu != 0) - z <- (((q/mu)^nu - 1)/(nu * sigma)) - else if (is.na(nu)) + } + if (length(nu) > 1) { + z <- ifelse( + nu != 0, + (((q / mu)^nu - 1) / (nu * sigma)), + log(q / mu) / sigma + ) + } else if (nu != 0) { + z <- (((q / mu)^nu - 1) / (nu * sigma)) + } else if (is.na(nu)) { z <- NA - else z <- log(q/mu)/sigma + } else { + z <- log(q / mu) / sigma + } FYy1 <- pt(z, tau) - if (length(nu) > 1) - FYy2 <- ifelse(nu > 0, pt(-1/(sigma * abs(nu)), df = tau), - 0) - else if (nu > 0) - FYy2 <- pt(-1/(sigma * abs(nu)), df = tau) - else FYy2 <- 0 - FYy3 <- pt(1/(sigma * abs(nu)), df = tau) - FYy <- (FYy1 - FYy2)/FYy3 - if (lower.tail == TRUE) + if (length(nu) > 1) { + FYy2 <- ifelse(nu > 0, pt(-1 / (sigma * abs(nu)), df = tau), 0) + } else if (nu > 0) { + FYy2 <- pt(-1 / (sigma * abs(nu)), df = tau) + } else { + FYy2 <- 0 + } + FYy3 <- pt(1 / (sigma * abs(nu)), df = tau) + FYy <- (FYy1 - FYy2) / FYy3 + if (lower.tail == TRUE) { FYy <- FYy - else FYy <- 1 - FYy - if (log.p == FALSE) + } else { + FYy <- 1 - FYy + } + if (log.p == FALSE) { FYy <- FYy - else FYy <- log(FYy) + } else { + FYy <- log(FYy) + } FYy } diff --git a/R/rename_gcdg_gsed.R b/R/rename_gcdg_gsed.R index 92ee990e..0de7965d 100644 --- a/R/rename_gcdg_gsed.R +++ b/R/rename_gcdg_gsed.R @@ -42,7 +42,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { domn <- ifelse(domo == "g", "gm", domn) domn <- ifelse(domo == "ps", "sl", domn) nr <- gsub("[a-z]", "", x) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "c" instr <- "aqi" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -51,7 +51,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { bar <- function(x) { domn <- "xx" nr <- gsub("[a-z]", "", x) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") repi <- gsub("bm|[0-9]", "", x) rep <- "x" rep <- ifelse(grepl("a", repi), "d", rep) @@ -68,10 +68,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { domn <- ifelse(domo == "a", "ad", domn) domn <- ifelse(domo == "m", "mo", domn) domn <- ifelse(domo == "s", "sl", domn) - nr <- str_pad(unlist(lapply(strsplit(x, "_z"), `[[`, 2)), - 3, - pad = "0" - ) + nr <- stri_pad(unlist(lapply(strsplit(x, "_z"), `[[`, 2)), 3, pad = "0") rep <- "d" instr <- "bat" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -83,7 +80,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { domn <- ifelse(domo == "m", "md", domn) domn <- ifelse(domo == "p", "pd", domn) nr <- gsub("b1p|b1m", "", x) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "d" instr <- "by1" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -96,7 +93,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { domn <- ifelse(domo == "p" | domo == "g", "pd", domn) # 3 items with g instead of p with same label b2g102 b2g103 b2g109 nr <- gsub("b2p|b2m|b2g", "", x) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "d" instr <- "by2" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -111,7 +108,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { domn <- ifelse(domo == "r", "re", domn) domn <- ifelse(domo == "g", "gm", domn) nr <- gsub("b3|[a-z]", "", x) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "d" instr <- "by3" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -119,16 +116,68 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { ddi <- function(x) { fm <- c( - 1, 7, 8, 9, 13, 14, 19, 20, 21, 27, 32, 33, 38, - 39, 44, 45, 51, 52, 53, 54 + 1, + 7, + 8, + 9, + 13, + 14, + 19, + 20, + 21, + 27, + 32, + 33, + 38, + 39, + 44, + 45, + 51, + 52, + 53, + 54 ) cm <- c( - 2, 6, 10, 25, 31, 30, 37, 40, 47, 55, 56, 16, 36, - 41, 48 + 2, + 6, + 10, + 25, + 31, + 30, + 37, + 40, + 47, + 55, + 56, + 16, + 36, + 41, + 48 ) gm <- c( - 3, 4, 11, 15, 5, 12, 18, 17, 14, 22, 23, 24, 26, - 28, 29, 34, 35, 42, 50, 43, 49, 57, 46 + 3, + 4, + 11, + 15, + 5, + 12, + 18, + 17, + 14, + 22, + 23, + 24, + 26, + 28, + 29, + 34, + 35, + 42, + 50, + 43, + 49, + 57, + 46 ) domn <- rep("xx", length(x)) nr <- gsub("n|v", "", x) @@ -220,11 +269,27 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { nr <- ifelse(grepl("v74", x), 73, nr) nr <- ifelse(grepl("v75", x), 74, nr) mitem <- c( - 4, 9, 12, 29:38, 60, 64, 65, 66, 67, - 14, 16, 19, 25, 39:43, 45:48, 50, 51, 73 + 4, + 9, + 12, + 29:38, + 60, + 64, + 65, + 66, + 67, + 14, + 16, + 19, + 25, + 39:43, + 45:48, + 50, + 51, + 73 ) rep <- ifelse(nr %in% mitem, "m", "d") - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") instr <- "ddi" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) } @@ -237,7 +302,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { domn <- ifelse(domo == "g", "gm", domn) domn <- ifelse(domo == "p", "sl", domn) nr <- gsub("[a-z]", "", x) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "d" instr <- "den" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -254,7 +319,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { nr <- gsub("g|[a-z]", "", x) nr <- ifelse(nchar(nr) > 3, gsub("_", "", nr), nr) nr <- gsub("_", "0", nr) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "d" instr <- "gri" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -263,7 +328,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { mac <- function(x) { domn <- "gm" nr <- gsub("mg", "", x) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") nr <- ifelse(nr == "04a", "041", nr) nr <- ifelse(nr == "04b", "042", nr) rep <- "d" @@ -274,7 +339,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { mds <- function(x) { domn <- "gm" nr <- gsub("mil", "", x) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "d" instr <- "mds" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -299,7 +364,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { ad <- ifelse(tr == "e", "4", ad) ad <- ifelse(tr == "f", "5", ad) nr <- paste0(nr, ad) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "d" instr <- "mul" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -308,7 +373,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { peg <- function(x) { domn <- "fm" nr <- gsub("peg", "", x) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "d" instr <- "peg" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -324,7 +389,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { domn <- ifelse(domo == "l", "gm", domn) domn <- ifelse(domo == "ps" | domo == "s", "re", domn) nr <- gsub("[a-z]", "", x) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "d" instr <- "sgr" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -339,7 +404,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { domn <- ifelse(domo == "s", "sl", domn) nr <- gsub("[a-z]", "", x) nr <- ifelse(nchar(nr) == 1, paste0(nr, "0"), nr) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "d" instr <- "sbi" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -352,7 +417,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { domn <- ifelse(nr > 16 & nr <= 40, "lg", domn) domn <- ifelse(nr > 40, "mo", domn) nr <- gsub("[a-z]|__", "", x) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "d" instr <- "tep" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -382,7 +447,7 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { nr <- ifelse(grepl("playself", x), "49", nr) nr <- ifelse(grepl("ytoilet", x), "50", nr) nr <- ifelse(grepl("dressself", x), "51", nr) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") rep <- "c" instr <- "vin" cbind(as.character(x), paste(instr, domn, rep, nr, sep = "")) @@ -398,7 +463,9 @@ rename_gcdg_gsed <- function(x, copy = TRUE) { } y <- x - if (!copy) y <- rep("", length(y)) + if (!copy) { + y <- rep("", length(y)) + } y <- convert(x, y, 2, c("ac", "af", "ap", "ag"), aqi) y <- convert(x, y, 2, c("bm"), bar) diff --git a/R/rename_vector.R b/R/rename_vector.R new file mode 100644 index 00000000..6091ead8 --- /dev/null +++ b/R/rename_vector.R @@ -0,0 +1,132 @@ +#' Rename character vector +#' +#' Translates names between different lexicons (naming schema). +#' @param input A character vector with names to be translated +#' @param lexin A string indicating the input lexicon. One of `"phase1"`, +#' `"phase2"`, `"short1"`, `"short2"`, `"gsed"`, `"gsed2"` or `"gsed3"`. +#' Default is `"phase2"`, which orders item names according to the +#' published 2023 version of the SF and LF instruments. +#' @param lexout A string indicating the output lexicon. One of `"phase1"`, +#' `"phase2"`, `"short1"`, `"short2"`, `"gsed"`, `"gsed2"`, `"gsed3"`. +#' Default is `"gsed3"`. The default output `"gsed3"` applies instrument +#' codes `gs1` (SF) and `gl1` (LF), which can be understood by the `dscore` +#' package. +#' @param notfound A string indicating what to do some input value is not found +#' @param contains A string to filter the translation table prior to matching. +#' Needed to prevent double matches. The default ("") does not filter. +#' @param underscore Replaces space (" ") and dash ("-") by underscore ("_") +#' @param trim A substring to be removed from `input`. Defaults to "Ma_". +#' @param lowercase Sets all variables in lower case. +#' in `lexin`? The default `notfound = "copy"` copies the input values into the +#' output value. In other cases (e.g. `""` or `NA_character_`), the function +#' uses the string specified in `notfound` as a replacement value. +#' @param force_subjid_agedays If `TRUE`, forces the output to have `"subjid"` +#' and `"agedays"` as names for the `"ID"` and `"age"`, respectively. +#' @return A character vector of the same length as `input` with processed +#' names. +#' @details +#' The recommended approach for reading new data is to name the columns +#' according to the names defined by `"short2"` and the apply `rename_vector()` +#' to translate the names to the `"gsed3"` lexicon. +#' +#' The lexicons `"phase1"`, `"short1"`, `"gsed"` and `"gsed2"` are included +#' for backward compatibility, and are not recommended for use with new +#' data. +#' @examples +#' # Using Ma_SF_Cxx as input names, 2023 SF/LF version +#' input <- c("file", "GSED_ID", "Ma_SF_Parent ID", "Ma_SF_C01", "Ma_SF_C02") +#' rename_vector(input) +#' rename_vector(input, lexout = "short2", lowercase = FALSE) +#' rename_vector(input, lexout = "gsed3", trim = "Ma_SF_") +#' +#' # Convert short names to gsed names +#' input <- c("file", "GSED_ID", "Ma_SF_Parent ID", paste0("SF00", 1:3)) +#' rename_vector(input, lexin = "short2", lowercase = TRUE) +#' @export +rename_vector <- function( + input, + lexin = c( + "phase2", + "phase1", + "short1", + "short2", + "gsed", + "gsed2", + "gsed3" + ), + lexout = c( + "gsed3", + "gsed2", + "gsed", + "short2", + "short1", + "phase1", + "phase2" + ), + notfound = "copy", + contains = c("", "Ma_SF_", "Ma_LF_", "bsid_"), + underscore = TRUE, + trim = "Ma_", + lowercase = TRUE, + force_subjid_agedays = FALSE +) { + lexin <- match.arg(lexin) + lexout <- match.arg(lexout) + contains <- match.arg(contains) + + # rename itemnames + colin <- switch( + lexin, + phase1 = "phase1", + phase2 = "phase2", + short1 = "short1", + short2 = "short2", + gsed = "gsed", + gsed2 = "gsed2", + gsed3 = "gsed3", + "notfound" + ) + colout <- switch( + lexout, + phase1 = "phase1", + phase2 = "phase2", + short1 = "short1", + short2 = "short2", + gsed = "gsed", + gsed2 = "gsed2", + gsed3 = "gsed3", + "notfound" + ) + if (colin == "notfound") { + stop("Lexicon not found: ", lexin) + } + if (colout == "notfound") { + stop("Lexicon not found: ", lexout) + } + + output <- input + mt <- dscore::builtin_translate + v <- mt[match(input, pull(mt, colin)), colout, drop = TRUE] + output[!is.na(v)] <- v[!is.na(v)] + if (is.na(notfound[1L]) || notfound[1L] != "copy") { + output[is.na(v)] <- notfound[1L] + } + + # prettify + if (underscore) { + output <- sub(" ", "_", output) + output <- sub("-", "_", output) + } + output <- sub(trim, "", output) + if (lowercase) { + output <- tolower(output) + } + + # force subjid and agedays names + if (force_subjid_agedays) { + output <- sub("gsed_id", "subjid", output) + output <- sub("age", "agedays", output) + } + + return(output) +} diff --git a/R/set_default.R b/R/set_default.R new file mode 100644 index 00000000..a0ea3930 --- /dev/null +++ b/R/set_default.R @@ -0,0 +1,44 @@ +set_default_key <- function(key) { + if (is.null(key) || key == "gsed") { + key <- "gsed2510" + } + return(key) +} + +set_default_population <- function(population, idx) { + if (is.null(population) && length(idx)) { + return(dscore::builtin_keys$base_population[idx]) + } + if (is.null(population) && !length(idx)) { + # warning("No population specified, using 'preliminary_standards'.") + return("preliminary_standards") + } + return(population) +} + +set_default_transform <- function(transform, idx) { + if (is.null(transform) && length(idx)) { + return(c( + dscore::builtin_keys$intercept[idx], + dscore::builtin_keys$slope[idx] + )) + } + if (is.null(transform) && !length(idx)) { + return(c(55.724132, 3.603965)) + } + return(transform) +} + +set_default_qp <- function(qp, idx) { + if (is.null(qp) && length(idx)) { + return(seq( + from = dscore::builtin_keys$from[idx], + to = dscore::builtin_keys$to[idx], + by = dscore::builtin_keys$by[idx] + )) + } + if (is.null(qp) && !length(idx)) { + return(-10:125) + } + return(qp) +} diff --git a/R/triple.R b/R/triple.R new file mode 100644 index 00000000..c800a8b2 --- /dev/null +++ b/R/triple.R @@ -0,0 +1,43 @@ +#' Sample of 50 children measured with three instruments +#' +#' An example dataset with developmental scores at the item level for +#' 50 random children from the GSED Validation Study (Cavellera et al, 2023). +#' Each child has measurements from GSED SF (`gs1`), GSED LF (`gl1`) and +#' BSID-III (`by3`). +#' +#' @docType data +#' @format A `data.frame` with 50 rows and 559 variables: +#' +#' Name | Label +#' ---------- | --------- +#' `id` | Integer, child ID +#' `age` | Numeric, age in decimal years +#' `agedays` | Integer, age in days +#' `gs1sec001`| Integer, SF001 Does your child smile? +#' `gs1moc002`| Integer, SF002 When lying on his/her back, ... +#' `...` | and so on.. +#' +#' The dataset contains 138 items from GSED SF (`gs1`), +#' (item `gs1moc028` was skipped), 155 items from GSED LF (`gl1`), +#' and 263 (out of 326) items from BSID-III (`by3`). +#' +#' @examples +#' # calculate D-score from all instruments +#' ds_all <- dscore(triple) +#' head(ds_all) +#' # calculate D-score from only GSED SF items +#' ds_sf <- dscore(triple, items = get_itemnames(instrument = "gs1")) +#' head(ds_sf) +#' @seealso [dscore()] +#' @references +#' Cavallera et al. (2023). Protocol for validation of the Global +#' Scales for Early Development (GSED) for children under 3 years of +#' age in seven countries. BMJ Open, 13(1), e062562. +#' DOI: 10.1136/bmjopen-2022-062562. +#' +#' +#' World Health Organization (WHO) (2023). Global Scales for Early +#' Development (GSED) V1.0: Technical Report. Geneva: World Health +#' Organization. +#' +"triple" diff --git a/README.Rmd b/README.Rmd index 23a37b95..b4cc4860 100644 --- a/README.Rmd +++ b/README.Rmd @@ -3,7 +3,7 @@ output: github_document always_allow_html: yes bibliography: [vignettes/references.bib] biblio-style: apalike -link-citations: yes +link-citations: true --- @@ -15,7 +15,8 @@ knitr::opts_chunk$set( fig.retina = 2, comment = "#>", fig.path = "man/figures/README-", - out.width = "100%") + out.width = "100%" +) suppressPackageStartupMessages(library(dplyr)) suppressPackageStartupMessages(library(ggplot2)) ``` @@ -23,24 +24,20 @@ suppressPackageStartupMessages(library(ggplot2)) # dscore -[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html#maturing) -[![CRAN status](https://www.r-pkg.org/badges/version/dscore)](https://CRAN.R-project.org/package=dscore) -[![](http://cranlogs.r-pkg.org/badges/dscore)](https://cran.r-project.org/package=dscore) -[![](https://img.shields.io/badge/github%20version-1.8.7-orange.svg)](https://github.com/d-score/dscore) + +[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![CRAN status](https://www.r-pkg.org/badges/version/dscore)](https://CRAN.R-project.org/package=dscore) [![](http://cranlogs.r-pkg.org/badges/dscore)](https://cran.r-project.org/package=dscore) [![](https://img.shields.io/badge/github%20version-2.0.5-orange.svg)](https://github.com/d-score/dscore) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/license/apache-2-0) + -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 -- Calculate *D*-score from item level responses -- Transform the *D*-scores into DAZ, age-standardised Z-scores +- Map your item names to the GSED convention +- Calculate D-score from item level responses +- Transform the D-scores into DAZ, age-standardised Z-scores -The required input consists of *item level* responses on milestones -from widely used instruments for measuring child development. +The required input consists of *item level* responses on milestones from widely used instruments for measuring child development. ## Installation @@ -53,33 +50,32 @@ remotes::install_github("d-score/dscore") ## 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. Calculate *D*-score and DAZ; -4. Summarise your results. +1. Identify whether the `dscore` package covers your measurement instrument; +2. Map your variable names to the GSED 9-position schema; +3. Calculate D-score and DAZ; +4. Summarise your results. The `dscore` package provides various function that support these steps. See [Getting started](https://d-score.org/dscore/articles/getting_started.html) for more details. - ## Resources ### Books and reports -1. [*D*-score: Turning milestones into measurement](https://d-score.org/dbook1/) -2. [Inventory of 147 instruments for measuring early child development](https://documents.worldbank.org/en/publication/documents-reports/documentdetail/384681513101293811/a-toolkit-for-measuring-early-childhood-development-in-low-and-middle-income-countries): @fernald2017 +1. [D-score: Turning milestones into measurement](https://d-score.org/dbook1/) +2. [Inventory of 147 instruments for measuring early child development](https://documents.worldbank.org/en/publication/documents-reports/documentdetail/384681513101293811/a-toolkit-for-measuring-early-childhood-development-in-low-and-middle-income-countries): @fernald2017 ### Keys -1. Project with `dutch` key, 0-2 years: @vanbuuren2014 -3. Project with `gcdg` key: @weber2019 -4. Project with `gsed` key: @gsedteam2019 +1. Project with `dutch` key, 0-2 years: @vanbuuren2014 +2. Project with `gcdg` key: @weber2019 +3. Project with `gsed` keys: @gsedteam2023 ### Methodology -1. Interval scale: @jacobusse2006 -2. Adaptive testing: @jacobusse2007 +1. Interval scale: @jacobusse2006 +2. Adaptive testing: @jacobusse2007 ### Shiny app @@ -87,10 +83,12 @@ If you want to calculate the D-score on your own data, and you're not an `R` use ## 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. -### Literature +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. + +## License +This package uses a [Apache License 2.0](https://opensource.org/licenses/Apache-2-0). +### Literature \ No newline at end of file diff --git a/README.md b/README.md index 04e20c55..df2573bb 100644 --- a/README.md +++ b/README.md @@ -6,22 +6,24 @@ [![Lifecycle: -maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html#maturing) +stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![CRAN status](https://www.r-pkg.org/badges/version/dscore)](https://CRAN.R-project.org/package=dscore) [![](http://cranlogs.r-pkg.org/badges/dscore)](https://cran.r-project.org/package=dscore) -[![](https://img.shields.io/badge/github%20version-1.8.7-orange.svg)](https://github.com/d-score/dscore) +[![](https://img.shields.io/badge/github%20version-2.0.5-orange.svg)](https://github.com/d-score/dscore) +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/license/apache-2-0) + -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 -- Calculate *D*-score from item level responses -- Transform the *D*-scores into DAZ, age-standardised Z-scores +- Calculate D-score from item level responses +- Transform the D-scores into DAZ, age-standardised Z-scores The required input consists of *item level* responses on milestones from widely used instruments for measuring child development. @@ -38,14 +40,13 @@ remotes::install_github("d-score/dscore") ## 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. Calculate *D*-score and DAZ; +3. Calculate D-score and DAZ; 4. Summarise your results. The `dscore` package provides various function that support these steps. @@ -57,7 +58,7 @@ more details. ### Books and reports -1. [*D*-score: Turning milestones into +1. [D-score: Turning milestones into measurement](https://d-score.org/dbook1/) 2. [Inventory of 147 instruments for measuring early child development](https://documents.worldbank.org/en/publication/documents-reports/documentdetail/384681513101293811/a-toolkit-for-measuring-early-childhood-development-in-low-and-middle-income-countries): @@ -68,13 +69,8 @@ more details. 1. Project with `dutch` key, 0-2 years: van Buuren ([2014](#ref-vanbuuren2014)) 2. Project with `gcdg` key: Weber et al. ([2019](#ref-weber2019)) -3. 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](#ref-gsedteam2019)) +3. Project with `gsed` keys: World Health Organization (WHO) + ([2023](#ref-gsedteam2023)) ### Methodology @@ -92,12 +88,6 @@ 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 @@ -113,6 +103,17 @@ 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. + +## License + +This package uses a [Apache License +2.0](https://opensource.org/licenses/Apache-2-0). + ### Literature
-
- -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*. -. - -
-
Jacobusse, G., and S. van Buuren. 2007. “Computerized Adaptive Testing @@ -176,4 +164,13 @@ Global Settings.” *BMJ Global Health* 4: e001724.
+
+ +World Health Organization (WHO). 2023. “Global +Scales for Early Development (GSED) V1.0: Technical Report.” +Geneva: World Health Organization. +. + +
+
diff --git a/_pkgdown.yml b/_pkgdown.yml index 803b43d0..94c45303 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -24,6 +24,7 @@ reference: that the dscore() function can understand. contents: - rename_gcdg_gsed + - rename_vector - order_itemnames - sort_itemnames - title: "Calculate D-score and DAZ" @@ -37,33 +38,47 @@ reference: - get_tau - title: "Working with references" desc: > - Specification of the imputation models can be made more + Specification of the models can be made more convenient using the following set of helpers. contents: - daz - get_reference - get_age_equivalent + - get_mu - title: "Internal functions" desc: > - While documented, these internal functions should not be - called directly. + For research purposes only. contents: + - count_mu - count_mu_dutch - count_mu_gcdg - count_mu_phase1 - - count_mu_phase1_healthy + - count_mu_preliminary_standards - posterior - normalize - title: "Datasets" desc: "Built-in datasets" contents: - - builtin_itemtable + - builtin_keys - builtin_itembank + - builtin_itemtable - builtin_references + - builtin_translate - milestones - gsample - sample_sf - sample_lf - sample_hf + - triple +articles: + - title: Tips + navbar: ~ + contents: + - getting_started + - scoring_GSED + - using_DAZ + - multiple_keys + - custom_priors + navbar: type: inverse diff --git a/air.toml b/air.toml new file mode 100644 index 00000000..e69de29b diff --git a/cran-comments.Rmd b/cran-comments.Rmd index 2a16ea60..85fbbb82 100644 --- a/cran-comments.Rmd +++ b/cran-comments.Rmd @@ -7,14 +7,24 @@ editor_options: ## Reason for update -`dscore 1.8.0` provides new features and resolves some problems +`dscore 2.0.0` is a major new release that builds on more extensive data + +## Resubmission 1 + +*Why is such a quick update needed? Please explain. Please also re-read the CRAN policies about submission frequency.And why is there a major new release after only 6 days? This is very confusing....* + +I realize 6 days is short. Version 1.11.0 was a regular maintenance release and provides a stable fallback for users not yet ready to transition. Version 2.0.0 introduces a new key and changes an important default, which some collaborators need immediately, but may break code for existing users. Having both versions on CRAN ensures continuity for existing users and access to the new functionality. + +*Is there some reference about the method you can add in the Description field in the form Authors (year) ?* + +I updated DESCRIPTION with the relevant DOI reference. ## Test environments ### Local ```{r} -R.Version() +R.Version()$version.string ``` ## Local check @@ -27,7 +37,7 @@ build() ``` ```{bash eval=FALSE} -R CMD CHECK dscore_1.8.0.tar.gz +R CMD CHECK ../dscore_2.0.0.tar.gz ``` Status: OK @@ -38,30 +48,17 @@ Status: OK devtools::check_win_devel() ``` -### WIN_DEVEL - -`devtools::check_win_devel()` resulted in: - -``` -* checking CRAN incoming feasibility ... [11s] NOTE -Maintainer: 'Stef van Buuren ' - -Found the following (possibly) invalid URLs: - URL: https://support.posit.co/hc/en-us/articles/201141096-Getting-Started-with-R - From: inst/doc/scoring_GSED.html - Status: 403 - Message: Forbidden -``` - -The URL is reachable by browser. I assume this status results from a setting made by Posit. +Upload of the dscore package to win-builder failed. ### RHUB ```{r eval=FALSE} -check_rhub() +rhub::rhub_check() ``` -The result is: `SUCCESS` for all four builds +Using three builds: linux, windows, macos. + +Status: OK ## Downstream dependencies diff --git a/cran-comments.md b/cran-comments.md index 594833ae..4ad1e380 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -3,57 +3,35 @@ cran-comments ## Reason for update -`dscore 1.8.0` provides new features and resolves some problems +`dscore 2.0.0` is a major new release that builds on more extensive data + +## Resubmission 1 + +*Why is such a quick update needed? Please explain. Please also re-read +the CRAN policies about submission frequency.And why is there a major +new release after only 6 days? This is very confusing….* + +I realize 6 days is short. Version 1.11.0 was a regular maintenance +release and provides a stable fallback for users not yet ready to +transition. Version 2.0.0 introduces a new key and changes an important +default, which some collaborators need immediately, but may break code +for existing users. Having both versions on CRAN ensures continuity for +existing users and access to the new functionality. + +*Is there some reference about the method you can add in the Description +field in the form Authors (year) ?* + +I updated DESCRIPTION with the relevant DOI reference. ## Test environments ### Local ``` r -R.Version() +R.Version()$version.string ``` - ## $platform - ## [1] "aarch64-apple-darwin20" - ## - ## $arch - ## [1] "aarch64" - ## - ## $os - ## [1] "darwin20" - ## - ## $system - ## [1] "aarch64, darwin20" - ## - ## $status - ## [1] "" - ## - ## $major - ## [1] "4" - ## - ## $minor - ## [1] "2.2" - ## - ## $year - ## [1] "2022" - ## - ## $month - ## [1] "10" - ## - ## $day - ## [1] "31" - ## - ## $`svn rev` - ## [1] "83211" - ## - ## $language - ## [1] "R" - ## - ## $version.string - ## [1] "R version 4.2.2 (2022-10-31)" - ## - ## $nickname - ## [1] "Innocent and Trusting" + ## [1] "R version 4.5.1 (2025-06-13)" ## Local check @@ -65,7 +43,7 @@ build() ``` ``` bash -R CMD CHECK dscore_1.8.0.tar.gz +R CMD CHECK ../dscore_2.0.0.tar.gz ``` Status: OK @@ -76,29 +54,17 @@ Status: OK devtools::check_win_devel() ``` -### WIN_DEVEL - -`devtools::check_win_devel()` resulted in: - - * checking CRAN incoming feasibility ... [11s] NOTE - Maintainer: 'Stef van Buuren ' - - Found the following (possibly) invalid URLs: - URL: https://support.posit.co/hc/en-us/articles/201141096-Getting-Started-with-R - From: inst/doc/scoring_GSED.html - Status: 403 - Message: Forbidden - -The URL is reachable by browser. I assume this status results from a -setting made by Posit. +Upload of the dscore package to win-builder failed. ### RHUB ``` r -check_rhub() +rhub::rhub_check() ``` -The result is: `SUCCESS` for all four builds +Using three builds: linux, windows, macos. + +Status: OK ## Downstream dependencies diff --git a/data-raw/R/export_keys.R b/data-raw/R/export_keys.R index 374483bc..c4d5b53e 100644 --- a/data-raw/R/export_keys.R +++ b/data-raw/R/export_keys.R @@ -4,184 +4,322 @@ library(openxlsx) # define project project <- path.expand("~/Package/dscore/dscore") -#project <- path.expand("~/OneDrive - TNO/Documents/GitHub/dscore") +# project <- path.expand("~/OneDrive - TNO/Documents/GitHub/dscore") # ------------- export dutch key fn <- file.path(project, "data-raw/data/bds_edited.csv") -ib_dutch <- read.csv2(file = fn, stringsAsFactors = FALSE) %>% - mutate(key = "dutch") %>% - select(one_of(c("key", "lex_gsed", "tau"))) %>% - filter(tau != "") %>% +ib_dutch <- read.csv2(file = fn, stringsAsFactors = FALSE) |> + mutate(key = "dutch") |> + select(one_of(c("key", "lex_gsed", "tau"))) |> + filter(tau != "") |> rename(item = lex_gsed) fo <- file.path(project, "data-raw/data/keys/dutch.txt") -write.table(ib_dutch, - file = fo, quote = FALSE, sep = "\t", - na = "", row.names = FALSE +write.table( + ib_dutch, + file = fo, + quote = FALSE, + sep = "\t", + na = "", + row.names = FALSE ) # ------------- export gcdg key fn <- path.expand("~/Package/dscore/dscore/data-raw/data/gcdg_itembank.txt") -ib_gcdg <- read.delim(fn, stringsAsFactors = FALSE) %>% +ib_gcdg <- read.delim(fn, stringsAsFactors = FALSE) |> mutate( key = "gcdg", item = dscore:::rename_gcdg_gsed(lex_gcdg), tau = round(tau, 2) - ) %>% + ) |> select(one_of(c("key", "item", "tau"))) ib_gcdg <- ib_gcdg[order_itemnames(ib_gcdg$item), ] fo <- file.path(project, "data-raw/data/keys/gcdg.txt") -write.table(ib_gcdg, - file = fo, quote = FALSE, sep = "\t", - na = "", row.names = FALSE +write.table( + ib_gcdg, + file = fo, + quote = FALSE, + sep = "\t", + na = "", + row.names = FALSE ) # ------------- export gsed1912 key fn <- path.expand("~/Project/GSED/dmetric/models/807_17/model.Rds") gsed_model_807_17 <- readRDS(file = fn) -ib_gsed <- gsed_model_807_17$itembank %>% +ib_gsed <- gsed_model_807_17$itembank |> mutate( key = "gsed1912", tau = round(tau, 2) - ) %>% + ) |> select(one_of("key", "item", "tau")) ib_gsed <- ib_gsed[order_itemnames(ib_gsed$item), ] fo <- file.path(project, "data-raw/data/keys/gsed1912.txt") -write.table(ib_gsed, - file = fo, quote = FALSE, sep = "\t", - na = "", row.names = FALSE) +write.table( + ib_gsed, + file = fo, + quote = FALSE, + sep = "\t", + na = "", + row.names = FALSE +) # ------------- export gsed2206 key fn <- path.expand("~/Project/GSED/phase1/joint/818_17_joint_fixed/model.Rds") gsed_model_818_17 <- readRDS(file = fn) -ib_gsed <- gsed_model_818_17$itembank %>% +ib_gsed <- gsed_model_818_17$itembank |> mutate( key = "gsed2206", tau = round(tau, 2) - ) %>% + ) |> select(one_of("key", "item", "tau")) ib_gsed <- ib_gsed[order_itemnames(ib_gsed$item), ] fo <- file.path(project, "data-raw/data/keys/gsed2206.txt") -write.table(ib_gsed, - file = fo, quote = FALSE, sep = "\t", - na = "", row.names = FALSE) +write.table( + ib_gsed, + file = fo, + quote = FALSE, + sep = "\t", + na = "", + row.names = FALSE +) # ------------- export 293_0 key fn <- path.expand("~/Project/GSED/phase1/remodel/293_0/model.Rds") gsed_model_293_0 <- readRDS(file = fn) -ib_gsed <- gsed_model_293_0$itembank %>% +ib_gsed <- gsed_model_293_0$itembank |> mutate( key = "293_0", tau = round(tau, 2) - ) %>% + ) |> select(one_of("key", "item", "tau")) gpa <- ib_gsed[1:138, ] +# rename to correct for reversed items +gpa[gpa$item == "gpasec089", "item"] <- "gpasec088" +gpa[gpa$item == "gpaclc088", "item"] <- "gpaclc089" +# end correction gpa <- gpa[order_itemnames(gpa$item, order = "imnd"), ] ib_gsed <- bind_rows(gpa, ib_gsed[139:293, ]) fo <- file.path(project, "data-raw/data/keys/293_0.txt") -write.table(ib_gsed, - file = fo, quote = FALSE, sep = "\t", - na = "", row.names = FALSE) +write.table( + ib_gsed, + file = fo, + quote = FALSE, + sep = "\t", + na = "", + row.names = FALSE +) # ------------- export gsed2208 key fn <- path.expand("~/Project/GSED/phase1/remodel/818_6/model.Rds") gsed_model_818_6 <- readRDS(file = fn) -ib_gsed <- gsed_model_818_6$itembank %>% +ib_gsed <- gsed_model_818_6$itembank |> mutate( key = "gsed2208", tau = round(tau, 2) - ) %>% + ) |> select(one_of("key", "item", "tau")) ib_gsed <- ib_gsed[order_itemnames(ib_gsed$item), ] fo <- file.path(project, "data-raw/data/keys/gsed2208.txt") -write.table(ib_gsed, - file = fo, quote = FALSE, sep = "\t", - na = "", row.names = FALSE) +write.table( + ib_gsed, + file = fo, + quote = FALSE, + sep = "\t", + na = "", + row.names = FALSE +) # ------------- export lf2206 key fn <- path.expand("~/Project/GSED/phase1/lf/155_0/model.Rds") gsed_model <- readRDS(file = fn) -ib_gsed <- gsed_model$itembank %>% +ib_gsed <- gsed_model$itembank |> mutate( key = "lf2206", tau = round(tau, 2) - ) %>% + ) |> select(one_of("key", "item", "tau")) ib_gsed <- ib_gsed[order_itemnames(ib_gsed$item), ] fo <- file.path(project, "data-raw/data/keys/lf2206.txt") -write.table(ib_gsed, - file = fo, quote = FALSE, sep = "\t", - na = "", row.names = FALSE) +write.table( + ib_gsed, + file = fo, + quote = FALSE, + sep = "\t", + na = "", + row.names = FALSE +) # ------------- export sf2206 key fn <- path.expand("~/Project/GSED/phase1/sf/139_0/model.Rds") gsed_model <- readRDS(file = fn) -ib_gsed <- gsed_model$itembank %>% +ib_gsed <- gsed_model$itembank |> mutate( key = "sf2206", tau = round(tau, 2) - ) %>% + ) |> select(one_of("key", "item", "tau")) +# rename to correct for reversed items +ib_gsed[ib_gsed$item == "gpasec089", "item"] <- "gpasec088" +ib_gsed[ib_gsed$item == "gpaclc088", "item"] <- "gpaclc089" +# end correction ib_gsed <- ib_gsed[order_itemnames(ib_gsed$item, order = "indm"), ] fo <- file.path(project, "data-raw/data/keys/sf2206.txt") -write.table(ib_gsed, - file = fo, quote = FALSE, sep = "\t", - na = "", row.names = FALSE) - +write.table( + ib_gsed, + file = fo, + quote = FALSE, + sep = "\t", + na = "", + row.names = FALSE +) # ---------- export ecdi keys ## model gsed2206 extended with ecdi items -fn <- path.expand("~/OneDrive - TNO/Documents/GitHub/decdi/models/gsed2206/ECDI_142_6_fixed/model.Rds") +fn <- path.expand( + "~/OneDrive - TNO/Documents/GitHub/decdi/models/gsed2206/ECDI_142_6_fixed/model.Rds" +) ecdi_model <- readRDS(file = fn) -ib_ecdi <- ecdi_model$itembank %>% - filter(stringr::str_detect(item, "^ecd")) %>% +ib_ecdi <- ecdi_model$itembank |> + filter(stringr::str_detect(item, "^ecd")) |> mutate( key = "gsed2206", tau = round(tau, 2) - ) %>% + ) |> select(one_of("key", "item", "tau")) ib_ecdi <- ib_ecdi[order_itemnames(ib_ecdi$item, order = "indm"), ] -fo <- file.path(project, "data-raw/data/keys/ecd2206.txt") -write.table(ib_ecdi, - file = fo, quote = FALSE, sep = "\t", - na = "", row.names = FALSE) +fo <- file.path(project, "data-raw/data/keys/gsed2206_ecd.txt") +write.table( + ib_ecdi, + file = fo, + quote = FALSE, + sep = "\t", + na = "", + row.names = FALSE +) ## model 294_0 extende with ecdi items -fn <- path.expand("~/OneDrive - TNO/Documents/GitHub/decdi/models/294_0/ECDI_142_7_fixed/model.Rds") +fn <- path.expand( + "~/OneDrive - TNO/Documents/GitHub/decdi/models/294_0/ECDI_142_7_fixed/model.Rds" +) ecdi_model <- readRDS(file = fn) -ib_ecdi <- ecdi_model$itembank %>% - filter(stringr::str_detect(item, "^ecd")) %>% +ib_ecdi <- ecdi_model$itembank |> + filter(stringr::str_detect(item, "^ecd")) |> mutate( key = "294_0", tau = round(tau, 2) - ) %>% + ) |> select(one_of("key", "item", "tau")) ib_ecdi <- ib_ecdi[order_itemnames(ib_ecdi$item, order = "indm"), ] -fo <- file.path(project, "data-raw/data/keys/ecd294_0.txt") -write.table(ib_ecdi, - file = fo, quote = FALSE, sep = "\t", - na = "", row.names = FALSE) - +fo <- file.path(project, "data-raw/data/keys/294_0_ecd.txt") +write.table( + ib_ecdi, + file = fo, + quote = FALSE, + sep = "\t", + na = "", + row.names = FALSE +) ## model gsed2208 extended with ecdi items -fn <- path.expand("~/OneDrive - TNO/Documents/GitHub/decdi/models/gsed2208/ECDI_142_7_fixed/model.Rds") +fn <- path.expand( + "~/OneDrive - TNO/Documents/GitHub/decdi/models/gsed2208/ECDI_142_7_fixed/model.Rds" +) ecdi_model <- readRDS(file = fn) -ib_ecdi <- ecdi_model$itembank %>% - filter(stringr::str_detect(item, "^ecd")) %>% +ib_ecdi <- ecdi_model$itembank |> + filter(stringr::str_detect(item, "^ecd")) |> mutate( key = "gsed2208", tau = round(tau, 2) - ) %>% + ) |> select(one_of("key", "item", "tau")) ib_ecdi <- ib_ecdi[order_itemnames(ib_ecdi$item, order = "indm"), ] -fo <- file.path(project, "data-raw/data/keys/ecd2208.txt") -write.table(ib_ecdi, - file = fo, quote = FALSE, sep = "\t", - na = "", row.names = FALSE) +fo <- file.path(project, "data-raw/data/keys/gsed2208_ecd.txt") +write.table( + ib_ecdi, + file = fo, + quote = FALSE, + sep = "\t", + na = "", + row.names = FALSE +) +# extract the key gsed2510 +path <- file.path(Sys.getenv("GSED_PHASE2"), "202510", "281_0_phase_1+2") +model <- readRDS(file.path(path, "model.Rds")) +itembank <- model$itembank +items_sf <- dscore::get_itemnames(ins = "gs1", order = "indm") +items_lf <- dscore::get_itemnames(ins = "gl1") +items_lf <- items_lf[c(55:155, 1:54)] +tau <- c( + dscore::get_tau(items_lf, key = "", itembank = itembank), + dscore::get_tau(items_sf, key = "", itembank = itembank) +) +key2510 <- data.frame( + key = "gsed2510", + item = names(tau), + tau = round(unname(tau), 2) +) +write.table( + key2510, + file = "data-raw/data/keys/gsed2510.txt", + quote = FALSE, + sep = "\t", + row.names = FALSE +) +# Export GSED GH1 - Household form +key_gsed2212_gh1 <- openxlsx::read.xlsx( + "data-raw/data/ageforms_2025-07-15.xlsx" +) |> + mutate( + key = "gsed2212", + item = get_itemnames(instrument = "gh1", order = "indm") + ) |> + select(key, item, tau) +write.table( + key_gsed2212_gh1, + file = "data-raw/data/keys/gsed2212_gh1.txt", + sep = "\t", + quote = FALSE, + row.names = FALSE +) + +# Export GSED HF - 48 item version (Oct 2025) +hf_key_2025 <- load("data-raw/data/keys/gsedhf.Rda") +hf_48_2406 <- gsedhf |> + filter(key == "gsed2406") |> + mutate( + key = "gsed2406", + item = item, + tau = round(tau, 2) + ) |> + select(key, item, tau) +hf_48_2510 <- gsedhf |> + filter(key == "gsed2510") |> + mutate( + key = "gsed2510", + item = item, + tau = round(tau, 2) + ) |> + select(key, item, tau) + +write.table( + hf_48_2406, + file = "data-raw/data/keys/hf_48_2406.txt", + quote = FALSE, + sep = "\t", + row.names = FALSE +) +write.table( + hf_48_2510, + file = "data-raw/data/keys/hf_48_2510.txt", + quote = FALSE, + sep = "\t", + row.names = FALSE +) diff --git a/data-raw/R/mullen_itemtable.R b/data-raw/R/mullen_itemtable.R index 9d9969af..70cc1a2b 100644 --- a/data-raw/R/mullen_itemtable.R +++ b/data-raw/R/mullen_itemtable.R @@ -5,15 +5,30 @@ library(gseddata) library(dscore) # load mullen keys -mm1 <- read.xlsx("data-raw/data/Mullen items with labels match to gcdg_180614.xlsx", sheet = 1) +mm1 <- read.xlsx( + "data-raw/data/Mullen items with labels match to gcdg_180614.xlsx", + sheet = 1 +) mm1$domain <- "Gross Motor" -mm2 <- read.xlsx("data-raw/data/Mullen items with labels match to gcdg_180614.xlsx", sheet = 2) +mm2 <- read.xlsx( + "data-raw/data/Mullen items with labels match to gcdg_180614.xlsx", + sheet = 2 +) mm2$domain <- "Visual Reception" -mm3 <- read.xlsx("data-raw/data/Mullen items with labels match to gcdg_180614.xlsx", sheet = 3) +mm3 <- read.xlsx( + "data-raw/data/Mullen items with labels match to gcdg_180614.xlsx", + sheet = 3 +) mm3$domain <- "Fine Motor" -mm4 <- read.xlsx("data-raw/data/Mullen items with labels match to gcdg_180614.xlsx", sheet = 4) +mm4 <- read.xlsx( + "data-raw/data/Mullen items with labels match to gcdg_180614.xlsx", + sheet = 4 +) mm4$domain <- "Receptive Language" -mm5 <- read.xlsx("data-raw/data/Mullen items with labels match to gcdg_180614.xlsx", sheet = 5) +mm5 <- read.xlsx( + "data-raw/data/Mullen items with labels match to gcdg_180614.xlsx", + sheet = 5 +) mm5$domain <- "Expressive" mm <- bind_rows(mm1, mm2, mm3, mm4, mm5) diff --git a/data-raw/R/mullen_match2.R b/data-raw/R/mullen_match2.R index 8f8b2af0..5c1987e1 100644 --- a/data-raw/R/mullen_match2.R +++ b/data-raw/R/mullen_match2.R @@ -9,22 +9,40 @@ fn <- path.expand("~/Package/dscore/dscore/data-raw/data/gcdg_itembank.txt") gcdg_itembank <- read.delim(fn, stringsAsFactors = FALSE) # load mullen keys -mm1 <- read.xlsx("data-raw/data/Mullen items with labels match to gcdg.xlsx", sheet = 1) +mm1 <- read.xlsx( + "data-raw/data/Mullen items with labels match to gcdg.xlsx", + sheet = 1 +) mm1$domain <- "Gross Motor" -mm2 <- read.xlsx("data-raw/data/Mullen items with labels match to gcdg.xlsx", sheet = 2) +mm2 <- read.xlsx( + "data-raw/data/Mullen items with labels match to gcdg.xlsx", + sheet = 2 +) mm2$domain <- "Visual Reception" -mm3 <- read.xlsx("data-raw/data/Mullen items with labels match to gcdg.xlsx", sheet = 3) +mm3 <- read.xlsx( + "data-raw/data/Mullen items with labels match to gcdg.xlsx", + sheet = 3 +) mm3$domain <- "Fine Motor" -mm4 <- read.xlsx("data-raw/data/Mullen items with labels match to gcdg.xlsx", sheet = 4) +mm4 <- read.xlsx( + "data-raw/data/Mullen items with labels match to gcdg.xlsx", + sheet = 4 +) mm4$domain <- "Receptive Language" -mm5 <- read.xlsx("data-raw/data/Mullen items with labels match to gcdg.xlsx", sheet = 5) +mm5 <- read.xlsx( + "data-raw/data/Mullen items with labels match to gcdg.xlsx", + sheet = 5 +) mm5$domain <- "Expressive" mm <- bind_rows(mm1, mm2, mm3, mm4, mm5) #### --- The code below takes 59 tabled tau's from 565_18, and copies these to mullen items #### --- Shouldn't we take the ESTIMATED tau from solution 98_8? SvB 23SEP19 # match the mullenmatch to the itembank_lex and get tau for these items from reference -mm$tau <- gcdg_itembank[match(mm$gcdg_item, table = as.character(gcdg_itembank$lex_gcdg)), "tau"] +mm$tau <- gcdg_itembank[ + match(mm$gcdg_item, table = as.character(gcdg_itembank$lex_gcdg)), + "tau" +] # checks # head(mm) # gcdg_itembank[460:490,] @@ -37,5 +55,4 @@ gcdg_itembank_m <- bind_rows(gcdg_itembank, mm) tail(gcdg_itembank_m) - devtools::use_data(gcdg_itembank_m, overwrite = TRUE) diff --git a/data-raw/R/rapid_itemtable.R b/data-raw/R/rapid_itemtable.R index 428e4773..cc73906c 100644 --- a/data-raw/R/rapid_itemtable.R +++ b/data-raw/R/rapid_itemtable.R @@ -5,8 +5,19 @@ library(gseddata) library(dscore) library(stringr) -sf <- read.xlsx("data-raw/data/Master data dictionary - Rapid V1.1 KB lex_gsed.xlsx", sheet = "Short form (wide)")[10:148, ] -colnames(sf) <- c("lex_sf", "form names", "type", "label", "values", "age_cat", "lex_gsed") +sf <- read.xlsx( + "data-raw/data/Master data dictionary - Rapid V1.1 KB lex_gsed.xlsx", + sheet = "Short form (wide)" +)[10:148, ] +colnames(sf) <- c( + "lex_sf", + "form names", + "type", + "label", + "values", + "age_cat", + "lex_gsed" +) sf$lex_sf @@ -18,7 +29,7 @@ rename_sf <- function(x, match_table) { domn[is.na(match_y)] <- "xx" rep <- "c" nr <- gsub("Ra_SF", "", x) - nr <- str_pad(nr, 3, pad = "0") + nr <- stri_pad(nr, 3, pad = "0") y <- paste(instr, domn, rep, nr, sep = "") y diff --git a/data-raw/R/save_builtin_itembank.R b/data-raw/R/save_builtin_itembank.R index 5473bfd2..804951c0 100644 --- a/data-raw/R/save_builtin_itembank.R +++ b/data-raw/R/save_builtin_itembank.R @@ -17,172 +17,251 @@ check_single_key <- function(x) { warning("Missing tau detected.") ok <- FALSE } - if (ok) cat("Key", unique(x$key), "OK.\n") + if (ok) { + cat("Key", unique(x$key), "OK.\n") + } invisible(ok) } -f1 <- "data-raw/data/keys/dutch.txt" -f2 <- "data-raw/data/keys/gcdg.txt" -f3 <- "data-raw/data/keys/gsed1912.txt" -f4 <- "data-raw/data/keys/mullen_itembank.txt" -f5 <- "data-raw/data/keys/gsed2206.txt" -f6 <- "data-raw/data/keys/lf2206.txt" -f7 <- "data-raw/data/keys/sf2206.txt" -f8 <- "data-raw/data/keys/294_0.txt" -f9 <- "data-raw/data/keys/ecd2206.txt" -f10 <- "data-raw/data/keys/ecd294_0.txt" -f11 <- "data-raw/data/keys/293_0.txt" -f12 <- "data-raw/data/keys/gsed2208.txt" -f13 <- "data-raw/data/keys/ecd2208.txt" -f14 <- "data-raw/data/keys/items_sf.txt" -f15 <- "data-raw/data/keys/gsed2212.txt" -f16 <- "data-raw/data/keys/items_gs1_gl1.txt" -f17 <- "data-raw/data/ageforms_2023-01-13.xlsx" - -key_dutch <- read.delim(file = f1, stringsAsFactors = FALSE) +key_file <- c( + dutch = "dutch.txt", + gcdg = "gcdg.txt", + gsed1912 = "gsed1912.txt", + gsed1912_mul = "gsed1912_mul.txt", + lf2206 = "lf2206.txt", + sf2206 = "sf2206.txt", + gsed2206 = "gsed2206.txt", + gsed2206_ecd = "gsed2206_ecd.txt", + "294_0" = "294_0.txt", + "294_0_ecd" = "294_0_ecd.txt", + "293_0" = "293_0.txt", + gsed2208 = "gsed2208.txt", + gsed2208_ecd = "gsed2208_ecd.txt", + gsed2208_gs1_gs2 = "gsed2208_gs1_gs2.txt", + gsed2212 = "gsed2212.txt", + gsed2212_gs1_gl1 = "gsed2212_gs1_gl1.txt", + gsed2212_gh1 = "gsed2212_gh1.txt", # replaced by 48 item version + gsed2212_by3 = "by3_extension_gsed_key.txt", + gsed2510 = "gsed2510.txt", + gsed2406_gh1 = "hf_48_2406.txt", + gsed2510_gh1 = "hf_48_2510.txt", + gsed2510_by3 = "gsed2510_by3.txt" +) +key_name <- names(key_file) +key_path <- "data-raw/data/keys" +key_file <- file.path(key_path, key_file) +names(key_file) <- key_name + +# read key files + +key_dutch <- read.delim(file = key_file["dutch"]) key_dutch <- key_dutch[order_itemnames(key_dutch$item), ] -key_gcdg <- read.delim(file = f2, stringsAsFactors = FALSE) +key_gcdg <- read.delim(file = key_file["gcdg"]) key_gcdg <- key_gcdg[order_itemnames(key_gcdg$item), ] -key_gsed1912 <- read.delim(file = f3, stringsAsFactors = FALSE) +key_gsed1912 <- read.delim(file = key_file["gsed1912"]) key_gsed1912 <- key_gsed1912[order_itemnames(key_gsed1912$item), ] -key_mullen <- read.delim(file = f4, stringsAsFactors = FALSE) -key_mullen$key <- "gsed1912" -key_mullen <- key_mullen[order_itemnames(key_mullen$item), ] - -key_gsed2206 <- read.delim(file = f5, stringsAsFactors = FALSE) -key_gsed2206 <- key_gsed2206[order_itemnames(key_gsed2206$item), ] +key_gsed1912_mul <- read.delim(file = key_file["gsed1912_mul"]) +key_gsed1912_mul <- key_gsed1912_mul[order_itemnames(key_gsed1912_mul$item), ] -key_lf2206 <- read.delim(file = f6, stringsAsFactors = FALSE) +key_lf2206 <- read.delim(file = key_file["lf2206"]) key_lf2206 <- key_lf2206[order_itemnames(key_lf2206$item), ] -key_sf2206 <- read.delim(file = f7, stringsAsFactors = FALSE) +key_sf2206 <- read.delim(file = key_file["sf2206"]) key_sf2206 <- key_sf2206[order_itemnames(key_sf2206$item, order = "indm"), ] -key_294_0 <- read.delim(file = f8, stringsAsFactors = FALSE) +key_gsed2206 <- read.delim(file = key_file["gsed2206"]) +key_gsed2206 <- key_gsed2206[order_itemnames(key_gsed2206$item), ] + +key_gsed2206_ecd <- read.delim(file = key_file["gsed2206_ecd"]) +key_gsed2206_ecd <- key_gsed2206_ecd[order_itemnames(key_gsed2206_ecd$item), ] + +key_294_0 <- read.delim(file = key_file["294_0"]) items_gpa <- key_294_0$item[starts_with("gpa", vars = key_294_0$item)] items_gto <- key_294_0$item[starts_with("gto", vars = key_294_0$item)] -key_294_0_gto <- key_294_0 %>% filter(item %in% items_gto) +key_294_0_gto <- key_294_0 |> filter(item %in% items_gto) key_294_0_gto <- key_294_0_gto[order_itemnames(key_294_0_gto$item), ] -key_294_0_gpa <- key_294_0 %>% filter(item %in% items_gpa) -key_294_0_gpa <- key_294_0_gpa[order_itemnames(key_294_0_gpa$item, order = "indm"), ] -key_294_0 <- bind_rows(key_294_0_gto, - key_294_0_gpa) +key_294_0_gpa <- key_294_0 |> filter(item %in% items_gpa) +key_294_0_gpa <- key_294_0_gpa[ + order_itemnames(key_294_0_gpa$item, order = "indm"), +] +key_294_0 <- bind_rows( + key_294_0_gto, + key_294_0_gpa +) -key_ecd2206 <- read.delim(file = f9, stringsAsFactors = FALSE) -key_ecd2206 <- key_ecd2206[order_itemnames(key_ecd2206$item), ] +key_294_0_ecd <- read.delim(file = key_file["294_0_ecd"]) +key_294_0_ecd <- key_294_0_ecd[order_itemnames(key_294_0_ecd$item), ] -key_ecd294_0 <- read.delim(file = f10, stringsAsFactors = FALSE) -key_ecd294_0 <- key_ecd294_0[order_itemnames(key_ecd294_0$item), ] +key_293_0 <- read.delim(file = key_file["293_0"]) -key_293_0 <- read.delim(file = f11, stringsAsFactors = FALSE) - -key_gsed2208 <- read.delim(file = f12, stringsAsFactors = FALSE) +key_gsed2208 <- read.delim(file = key_file["gsed2208"]) key_gsed2208 <- key_gsed2208[order_itemnames(key_gsed2208$item), ] -key_ecd2208 <- read.delim(file = f13, stringsAsFactors = FALSE) -key_ecd2208 <- key_ecd2208[order_itemnames(key_ecd2208$item), ] +key_gsed2208_ecd <- read.delim(file = key_file["gsed2208_ecd"]) +key_gsed2208_ecd <- key_gsed2208_ecd[order_itemnames(key_gsed2208_ecd$item), ] -key_sf12 <- read.delim(file = f14, stringsAsFactors = FALSE) -key_sf12 <- key_sf12[order_itemnames(key_sf12$item, order = "imnd"), ] +key_gsed2208_gs1_gs2 <- read.delim(file = key_file["gsed2208_gs1_gs2"]) +key_gsed2208_gs1_gs2 <- key_gsed2208_gs1_gs2[ + order_itemnames(key_gsed2208_gs1_gs2$item, order = "imnd"), +] -key_gsed2212 <- read.delim(file = f15, stringsAsFactors = FALSE) +key_gsed2212 <- read.delim(file = key_file["gsed2212"]) key_gsed2212 <- key_gsed2212[order_itemnames(key_gsed2212$item), ] -key_gsed2212_gs1_gl1 <- read.delim(file = f16, stringsAsFactors = FALSE) %>% - select(key, item, tau) +key_gsed2212_gs1_gl1 <- read.delim(file = key_file["gsed2212_gs1_gl1"]) -key_gsed2212_gh1 <- openxlsx::read.xlsx(f17) %>% - mutate(key = "gsed2212", - item = get_itemnames(instrument = "gh1", order = "indm")) %>% - select(key, item, tau) +key_gsed2212_gh1 <- read.delim(file = key_file["gsed2212_gh1"]) -# --- key2212 -# Extend 293_0 key with model items 818_6 (version 20221201_remodel) -# Add gs1 and gs2 instrument names (gpa=gs1) -# Add ecdi -# Save as gsed2212 -key_gsed2212 <- bind_rows(key_gsed2212_gs1_gl1, - key_gsed2212_gh1, - key_293_0, - key_gsed2212, - key_ecd2208) %>% - mutate(key = "gsed2212") %>% - select(key, item, tau) -check_single_key(key_gsed2212) +key_gsed2212_by3 <- read.delim(file = key_file["gsed2212_by3"]) -# --- key2208 -# Extend 293_0 key with 818 items from the previous model 818_17 -# Add gs1 and gs2 instrument names (gpa=gs1) -# Add ecdi -# Save as gsed2208 -# Superseeded by gsed2212 because of LF item order problem - do not use -key_gsed2208 <- bind_rows(key_sf12, key_293_0, key_gsed2208, key_ecd2208) %>% - mutate(key = "gsed2208") %>% - select(key, item, tau) -check_single_key(key_gsed2208) +key_gsed2510 <- read.delim(file = key_file["gsed2510"]) -# --- key2206 Superseeded by key2208 - do not use -# Extend gsed2206 with gsed2 item names -lf_gsed <- gsedread::rename_vector(key_lf2206$item, lexin = "gsed2", lexout = "gsed") -sf_gsed <- gsedread::rename_vector(key_sf2206$item, lexin = "gsed2", lexout = "gsed") -lfsf_gsed <- gsedread::rename_vector(key_294_0$item, lexin = "gsed2", lexout = "gsed") -lf_tau <- dscore::get_tau(lf_gsed, key = "gsed2206", itembank = key_gsed2206) -sf_tau <- dscore::get_tau(sf_gsed, key = "gsed2206", itembank = key_gsed2206) -key_gsed2206 <- bind_rows(key_gsed2206, - data.frame(key = "gsed2206", item = key_lf2206$item, tau = lf_tau), - data.frame(key = "gsed2206", item = key_sf2206$item, tau = sf_tau), - key_ecd2206) %>% - filter(!is.na(tau)) -check_single_key(key_gsed2206) +key_gsed2406_gh1 <- read.delim(file = key_file["gsed2406_gh1"]) +key_gsed2212_gh1 <- key_gsed2406_gh1 |> + mutate(key = "gsed2212") |> + select(key, item, tau) +key_gsed2510_gh1 <- read.delim(file = key_file["gsed2510_gh1"]) +key_gsed2510_by3 <- read.delim(file = key_file["gsed2510_by3"]) -# --- key1912 (807 items) -key_gsed1912 <- bind_rows(key_gsed1912, - key_mullen) -check_single_key(key_gsed1912) +# --- key_dutch (76 items) +check_single_key(key_dutch) # --- key_gcdg (565 items) check_single_key(key_gcdg) +# --- key1912 (807 items) +key_gsed1912 <- bind_rows( + key_gsed1912, + key_gsed1912_mul +) +check_single_key(key_gsed1912) + # --- key_lf2206 Deprecated --> gsed2212 # Extend lf2206 with gsed item names -key_lf2206 <- bind_rows(key_lf2206, - data.frame(key = "lf2206", item = lf_gsed, tau = key_lf2206$tau)) +lf_gsed <- rename_vector(key_lf2206$item, lexin = "gsed2", lexout = "gsed") +key_lf2206 <- bind_rows( + key_lf2206, + data.frame(key = "lf2206", item = lf_gsed, tau = key_lf2206$tau) +) check_single_key(key_lf2206) # --- key_sf2206 Deprecated --> gsed2212 # Extend sf2206 with gsed item names -key_sf2206 <- bind_rows(key_sf2206, - data.frame(key = "sf2206", item = sf_gsed, tau = key_sf2206$tau)) +sf_gsed <- rename_vector(key_sf2206$item, lexin = "gsed2", lexout = "gsed") +key_sf2206 <- bind_rows( + key_sf2206, + data.frame(key = "sf2206", item = sf_gsed, tau = key_sf2206$tau) +) check_single_key(key_sf2206) +# --- key2206 Superseeded by key2208 - do not use +# Extend gsed2206 with gsed2 item names +lf_tau <- dscore::get_tau(lf_gsed, key = "gsed2206", itembank = key_gsed2206) +sf_tau <- dscore::get_tau(sf_gsed, key = "gsed2206", itembank = key_gsed2206) +key_gsed2206 <- bind_rows( + key_gsed2206, + data.frame(key = "gsed2206", item = lf_gsed, tau = lf_tau), + data.frame(key = "gsed2206", item = sf_gsed, tau = sf_tau), + key_gsed2206_ecd +) |> + filter(!is.na(tau)) +check_single_key(key_gsed2206) + # --- key_294_0 DEPRECATED --> key_293_0 # Extend 294_0 with gsed item names -key_294_0 <- bind_rows(key_294_0, - data.frame(key = "294_0", item = lfsf_gsed, tau = key_294_0$tau), - key_ecd294_0) +lfsf_gsed <- rename_vector(key_294_0$item, lexin = "gsed2", lexout = "gsed") +key_294_0 <- bind_rows( + key_294_0, + data.frame(key = "294_0", item = lfsf_gsed, tau = key_294_0$tau), + key_294_0_ecd +) check_single_key(key_294_0) -# --- key_293_9 GSED CORE MODEL (part of key_gsed2212) +# --- key_293_0 GSED CORE MODEL (part of key_gsed2212) check_single_key(key_293_0) -# --- key_dutch (76 items) -check_single_key(key_dutch) +# --- key2208 +# Extend 293_0 key with 818 items from the previous model 818_17 +# Add gs1 and gs2 instrument names (gpa=gs1) +# Add ecdi +# Save as gsed2208 +# Superseeded by gsed2212 because of LF item order problem - do not use +key_gsed2208 <- bind_rows( + key_gsed2208_gs1_gs2, + key_293_0, + key_gsed2208, + key_gsed2208_ecd +) |> + mutate(key = "gsed2208") |> + select(key, item, tau) +check_single_key(key_gsed2208) + +# --- key2212 +# Extend 293_0 key with model items 818_6 (version 20221201_remodel) +# Add gs1 and gs2 instrument names (gpa=gs1) +# Add ecdi +# Save as gsed2212 +key_gsed2212 <- bind_rows( + key_gsed2212_gs1_gl1, + key_gsed2406_gh1, # replaces key_gsed2212_gh1, + key_293_0, + key_gsed2212, + key_gsed2208_ecd +) |> + mutate(key = "gsed2212") |> + select(key, item, tau) +# Replace by3 by by3 update (13/8/25) +idx_old <- starts_with("by3", vars = key_gsed2212$item) +by3_old <- key_gsed2212[starts_with("by3", vars = key_gsed2212$item), ] +by3_new <- key_gsed2212_by3 +by3_new$key <- "gsed2212" +# by3_merge <- merge( +# by3_old, +# by3_new, +# by = "item", +# all.x = TRUE, +# suffixes = c("", "_new") +# ) +key_gsed2212 <- key_gsed2212[-idx_old, ] +key_gsed2212 <- bind_rows( + key_gsed2212, + by3_new +) +check_single_key(key_gsed2212) -builtin_itembank <- bind_rows(key_gsed2212, - key_gsed2208, - key_gsed2206, - key_gsed1912, - key_gcdg, - key_lf2206, - key_sf2206, - key_294_0, - key_293_0, - key_dutch) %>% - left_join(get_itemtable(decompose = TRUE), by = "item") %>% +# --- key2406 +# Creat copy of gsed2212 to make D-score calculation consistent +# with the adoption of the preliminary_standards +key_gsed2406 <- key_gsed2212 |> + mutate(key = "gsed2406") +check_single_key(key_gsed2406) + +# --- key2510 +# New key calculated from seven GSED studies + extension studies +key_gsed2510 <- bind_rows( + key_gsed2510, + key_gsed2510_gh1, + key_gsed2510_by3 +) |> + filter(!is.na(tau)) +check_single_key(key_gsed2510) + + +# --- Build itembank in reverse history order +builtin_itembank <- bind_rows( + key_gsed2510, + key_gsed2406, + key_gsed2212, + key_293_0, + key_gsed1912, + key_gcdg, + key_dutch +) |> + left_join(get_itemtable(decompose = TRUE), by = "item") |> select(-equate) # save to /data diff --git a/data-raw/R/save_builtin_itemtable.R b/data-raw/R/save_builtin_itemtable.R index 70ada5b4..aebeb295 100644 --- a/data-raw/R/save_builtin_itemtable.R +++ b/data-raw/R/save_builtin_itemtable.R @@ -2,58 +2,133 @@ # Fields: item, equate, label library(dplyr) fn <- file.path("data-raw/data/itemtable_20221201.txt") -builtin_itemtable <- read.delim(file = fn, quote = "", - stringsAsFactors = FALSE, na = "", - fileEncoding = "UTF-8", - header = TRUE) +builtin_itemtable <- read.delim( + file = fn, + quote = "", + stringsAsFactors = FALSE, + na = "", + fileEncoding = "UTF-8", + header = TRUE +) -## add GSED SF itemtable: gs1 and gl1 (Phase 2) -gsx_itemtable <- read.delim("data-raw/data/keys/items_gs1_gl1.txt", - stringsAsFactors = FALSE, na = "", - fileEncoding = "UTF-8", - header = TRUE) %>% - mutate(equate = NA_character_) %>% +## Create LF and SF item codes corresponding to published +## GSED v1.0 Short Form and GSED v1.0 Long Form +## NOTE: tab also contains crosswalk to gsed and gsed2 lexicon +tab <- read.delim( + "data-raw/data/items/phase2_items.txt", + stringsAsFactors = FALSE, + na = "", + fileEncoding = "UTF-8", + header = TRUE +) +items_sf_ <- tab |> + filter(instrument == "gs1") |> + mutate( + item = paste0("sf_", domain, mode, formatC(number, width = 3, flag = "0")), + equate = NA_character_, + label = paste(paste0("SF", formatC(number, width = 3, flag = "0")), label) + ) |> + select(item, equate, label) +# Add SF item names for selfreport mode s +items_sf_s <- tab |> + filter(instrument == "gs1") |> + mutate( + item = paste0("sf_", domain, "s", formatC(number, width = 3, flag = "0")), + equate = NA_character_, + label = paste(paste0("SF", formatC(number, width = 3, flag = "0")), label) + ) |> + select(item, equate, label) +items_gs1 <- tab |> + filter(instrument == "gs1") |> + mutate( + item = paste0("gs1", domain, mode, formatC(number, width = 3, flag = "0")), + equate = NA_character_, + label = paste(paste0("SF", formatC(number, width = 3, flag = "0")), label) + ) |> + select(item, equate, label) +# Add SF item names for selfreport mode s +items_gs1_s <- tab |> + filter(instrument == "gs1") |> + mutate( + item = paste0("gs1", domain, "s", formatC(number, width = 3, flag = "0")), + equate = NA_character_, + label = paste(paste0("SF", formatC(number, width = 3, flag = "0")), label) + ) |> + select(item, equate, label) +items_lf_ <- tab |> + filter(instrument == "gl1") |> + mutate( + item = paste0( + "lf", + c(rep("a", 49), rep("b", 52), rep("c", 54)), + domain, + "d", + formatC(number, width = 3, flag = "0") + ), + equate = NA_character_, + label = label + ) |> + select(item, equate, label) +items_gl1 <- tab |> + filter(instrument == "gl1") |> + mutate( + item = paste0("gl1", domain, "d", formatC(number, width = 3, flag = "0")), + equate = NA_character_, + label = label + ) |> select(item, equate, label) +gsx_itemtable <- bind_rows( + # items_sf_, + # items_sf_s, + # items_lf_, + items_gs1, + # items_gs1_s, + items_gl1 +) + ## add ecdi items to itemtable ecdi_itemtable <- read.delim("data-raw/data/ecdi_itemtable.txt") -ecdi_itemtable <- ecdi_itemtable %>% - select(item, label) %>% - mutate(equate = NA_character_) %>% - select(item, equate, label) %>% - mutate(equate = ifelse(item %in% c("ecdxxc001", "gpamoc097"), "ECD1", NA), - equate = ifelse(item %in% c("ecdxxc002", "gpamoc106"), "ECD2", equate), - equate = ifelse(item %in% c("ecdxxc003", "gpamoc129"), "ECD3", equate), - equate = ifelse(item %in% c("ecdxxc004", "gpamoc132"), "ECD4", equate), - equate = ifelse(item %in% c("ecdxxc005", "gpacmc090"), "ECD5", equate), - equate = ifelse(item %in% c("ecdxxc006", "gpaclc112"), "ECD6", equate), - equate = ifelse(item %in% c("ecdxxc008", "gpaclc113"), "ECD8", equate), - equate = ifelse(item %in% c("ecdxxc009", "gpaclc101"), "ECD9", equate), - equate = ifelse(item %in% c("ecdxxc013", "gpaclc126"), "ECD13", equate)) - -## add HF items to itemtable, creates instrument code gh1, overwrites item -hh_itemtable <- openxlsx::read.xlsx("data-raw/data/ageforms_2023-01-13.xlsx") -info <- dscore::decompose_itemnames(hh_itemtable$item) -info$instrument <- "gh1" -info$domain <- recode(hh_itemtable$voted_domain, cog = "cg", lang = "lg", life = "li", motor = "mo", sem = "se") -info$number <- formatC(1:55, width = 3, flag = "0") -hh_itemtable$item <- with(info, paste0(instrument, domain, mode, number)) -hh_itemtable <- hh_itemtable %>% - mutate(equate = NA_character_) %>% - select(item, equate, label) - -builtin_itemtable <- bind_rows(gsx_itemtable, - builtin_itemtable, - ecdi_itemtable, - hh_itemtable) +ecdi_itemtable <- ecdi_itemtable |> + select(item, label) |> + mutate(equate = NA_character_) |> + select(item, equate, label) |> + mutate( + equate = ifelse(item %in% c("ecdxxc001", "gpamoc097"), "ECD1", NA), + equate = ifelse(item %in% c("ecdxxc002", "gpamoc106"), "ECD2", equate), + equate = ifelse(item %in% c("ecdxxc003", "gpamoc129"), "ECD3", equate), + equate = ifelse(item %in% c("ecdxxc004", "gpamoc132"), "ECD4", equate), + equate = ifelse(item %in% c("ecdxxc005", "gpacmc090"), "ECD5", equate), + equate = ifelse(item %in% c("ecdxxc006", "gpaclc112"), "ECD6", equate), + equate = ifelse(item %in% c("ecdxxc008", "gpaclc113"), "ECD8", equate), + equate = ifelse(item %in% c("ecdxxc009", "gpaclc101"), "ECD9", equate), + equate = ifelse(item %in% c("ecdxxc013", "gpaclc126"), "ECD13", equate) + ) + +# 20251020: Using 48 HF items instead of 55 HF items +load("data-raw/data/keys/gsedhf.Rda") +gsedhf$label <- paste(gsedhf$itemhf, gsedhf$label) +gsedhf$equate <- NA_character_ +hh_itemtable <- gsedhf |> + filter(key == "gsed2510") |> + select(item, equate, label) + +builtin_itemtable <- bind_rows( + gsx_itemtable, + builtin_itemtable, + ecdi_itemtable, + hh_itemtable, +) info <- dscore::decompose_itemnames(builtin_itemtable$item) -builtin_itemtable <- builtin_itemtable %>% - bind_cols(info) %>% - arrange(instrument, domain, mode, number) %>% +builtin_itemtable <- builtin_itemtable |> + bind_cols(info) |> + arrange(instrument, domain, mode, number) |> select(item, equate, label) # check -if (any(duplicated(builtin_itemtable$item))) cat("Duplicated items found.") +if (any(duplicated(builtin_itemtable$item))) { + cat("Duplicated items found.") +} usethis::use_data(builtin_itemtable, overwrite = TRUE) diff --git a/data-raw/R/save_builtin_keys.R b/data-raw/R/save_builtin_keys.R new file mode 100644 index 00000000..8872c61c --- /dev/null +++ b/data-raw/R/save_builtin_keys.R @@ -0,0 +1,115 @@ +# do not forget to update the keys table +builtin_keys <- data.frame( + key = c( + "dutch", + "gcdg", + "gsed1912", + "sf2206", + "lf2206", + "gsed2206", + "294_0", + "293_0", + "gsed2208", + "gsed2212", + "gsed2406", + "gsed2510" + ), + base_population = c( + "dutch", + "gcdg", + "gcdg", + "gcdg", + "gcdg", + "gcdg", + "gcdg", + "phase1", + "phase1", + "phase1", + "preliminary_standards", + "preliminary_standards" + ), + n_items = c( + 76, + 565, + 945, + 278, + 310, + 1126, + 606, + 293, + 1407, + 1478, + 1478, + 571 + ), + n_instruments = c(1, 13, 20, 7, 13, 22, 20, 2, 25, 23, 23, 4), + intercept = c( + 38.906, + 66.483757, + 66.174355, + 66.174355, + 66.174355, + 66.174355, + 55, + 54.939147, + 54.939147, + 54.939147, + 54.939147, + 55.724132 + ), + slope = c( + 2.1044, + 2.075044, + 2.073871, + 2.073871, + 2.073871, + 2.073871, + 4, + 4.064264, + 4.064264, + 4.064264, + 4.064264, + 3.603965 + ), + from = rep(-10, 12), + to = c(80, rep(100, 10), rep(125, 1)), + by = rep(1, 12), + retired = c( + FALSE, + FALSE, + FALSE, + TRUE, + TRUE, + TRUE, + TRUE, + TRUE, + TRUE, + TRUE, + FALSE, + FALSE + ), + reference = c( + "van Buuren 2014", + "Weber 2019", + "Van Buuren 2025", + "", + "", + "", + "", + "", + "", + "Van Buuren 2025", + "Van Buuren 2025", + "In preparation" + ), + stringsAsFactors = FALSE +) + + +# remove retired keys +rem <- c("sf2206", "lf2206", "294_0", "293_0", "gsed2206", "gsed2208") +builtin_keys <- builtin_keys[!builtin_keys$key %in% rem, ] + +stopifnot(!anyDuplicated(builtin_keys$key)) + +usethis::use_data(builtin_keys, overwrite = TRUE) diff --git a/data-raw/R/save_builtin_references.R b/data-raw/R/save_builtin_references.R index d4286095..ca590fc2 100644 --- a/data-raw/R/save_builtin_references.R +++ b/data-raw/R/save_builtin_references.R @@ -7,86 +7,172 @@ f1 <- file.path(path, "dutch.txt") f2 <- file.path(path, "gcdg.txt") f3 <- file.path(path, "phase1.txt") f4 <- file.path(path, "Dutch_gsed2212.txt") -f5 <- file.path(path, "phase1_healthy.txt") +f5 <- file.path(path, "preliminary_standards.txt") +f6 <- file.path(path, "who_descriptive_gsed2510.txt") + # ------------- dutch references -ref_dutch <- read.delim(file = f1) %>% - mutate(pop = "dutch") +dutch_dutch <- read.delim(file = f1) |> + mutate(population = "dutch", key = "dutch", distribution = "LMS") # ------------- gcdg references -ref_gcdg <- read.delim(file = f2) %>% - mutate(pop = "gcdg") +gcdg_gcdg <- read.delim(file = f2) |> + mutate(population = "gcdg", key = "gcdg", distribution = "LMS") # using the fact that gcdg_reference is a normal model # add percentiles/SD lines percentiles <- c(3, 10, 25, 50, 75, 90, 97) z <- c(qnorm(percentiles / 100), -2:2) -mean <- ref_gcdg$mu -sd <- ref_gcdg$sigma * ref_gcdg$mu +mean <- gcdg_gcdg$mu +sd <- gcdg_gcdg$sigma * gcdg_gcdg$mu m <- matrix(sd, nrow = length(sd), ncol = length(z)) z <- matrix(z, nrow = length(sd), ncol = length(z), byrow = TRUE) p <- round(mean + m * z, 2) colnames(p) <- c( paste0("P", percentiles), - "SDM2", "SDM1", "SD0", "SDP1", "SDP2" + "SDM2", + "SDM1", + "SD0", + "SDP1", + "SDP2" ) -ref_gcdg <- bind_cols(ref_gcdg, data.frame(p)) +gcdg_gcdg <- bind_cols(gcdg_gcdg, data.frame(p)) + +# create copy for gsed1912 +gcdg_gsed1912 <- gcdg_gcdg |> + mutate(key = "gsed1912") # ------------- phase1 references -ref_phase1 <- read.delim(file = f3) %>% - mutate(pop = "phase1", - P3 = dscore:::qBCT(0.03, mu, sigma, nu, tau), - P10 = dscore:::qBCT(0.10, mu, sigma, nu, tau), - P25 = dscore:::qBCT(0.25, mu, sigma, nu, tau), - P50 = dscore:::qBCT(0.50, mu, sigma, nu, tau), - P75 = dscore:::qBCT(0.75, mu, sigma, nu, tau), - P90 = dscore:::qBCT(0.90, mu, sigma, nu, tau), - P97 = dscore:::qBCT(0.97, mu, sigma, nu, tau), - SDM2 = dscore:::qBCT(pnorm(-2), mu, sigma, nu, tau), - SDM1 = dscore:::qBCT(pnorm(-1), mu, sigma, nu, tau), - SD0 = dscore:::qBCT(pnorm(-0), mu, sigma, nu, tau), - SDP1 = dscore:::qBCT(pnorm(+1), mu, sigma, nu, tau), - SDP2 = dscore:::qBCT(pnorm(+2), mu, sigma, nu, tau) +phase1_gsed2212 <- read.delim(file = f3) |> + mutate( + population = "phase1", + key = "gsed2212", + distribution = "BCT", + P3 = dscore:::qBCT(0.03, mu, sigma, nu, tau), + P10 = dscore:::qBCT(0.10, mu, sigma, nu, tau), + P25 = dscore:::qBCT(0.25, mu, sigma, nu, tau), + P50 = dscore:::qBCT(0.50, mu, sigma, nu, tau), + P75 = dscore:::qBCT(0.75, mu, sigma, nu, tau), + P90 = dscore:::qBCT(0.90, mu, sigma, nu, tau), + P97 = dscore:::qBCT(0.97, mu, sigma, nu, tau), + SDM2 = dscore:::qBCT(pnorm(-2), mu, sigma, nu, tau), + SDM1 = dscore:::qBCT(pnorm(-1), mu, sigma, nu, tau), + SD0 = dscore:::qBCT(pnorm(-0), mu, sigma, nu, tau), + SDP1 = dscore:::qBCT(pnorm(+1), mu, sigma, nu, tau), + SDP2 = dscore:::qBCT(pnorm(+2), mu, sigma, nu, tau) ) # ------------- Dutch references for gsed2212 key -ref_dutchgsed <- read.delim(file = f4) %>% - mutate(pop = "dutch_gsed2212", - P3 = dscore:::qBCT(0.03, mu, sigma, nu, tau), - P10 = dscore:::qBCT(0.10, mu, sigma, nu, tau), - P25 = dscore:::qBCT(0.25, mu, sigma, nu, tau), - P50 = dscore:::qBCT(0.50, mu, sigma, nu, tau), - P75 = dscore:::qBCT(0.75, mu, sigma, nu, tau), - P90 = dscore:::qBCT(0.90, mu, sigma, nu, tau), - P97 = dscore:::qBCT(0.97, mu, sigma, nu, tau), - SDM2 = dscore:::qBCT(pnorm(-2), mu, sigma, nu, tau), - SDM1 = dscore:::qBCT(pnorm(-1), mu, sigma, nu, tau), - SD0 = dscore:::qBCT(pnorm(-0), mu, sigma, nu, tau), - SDP1 = dscore:::qBCT(pnorm(+1), mu, sigma, nu, tau), - SDP2 = dscore:::qBCT(pnorm(+2), mu, sigma, nu, tau) +dutch_gsed2212 <- read.delim(file = f4) |> + mutate( + population = "dutch", + key = "gsed2212", + distribution = "BCT", + P3 = dscore:::qBCT(0.03, mu, sigma, nu, tau), + P10 = dscore:::qBCT(0.10, mu, sigma, nu, tau), + P25 = dscore:::qBCT(0.25, mu, sigma, nu, tau), + P50 = dscore:::qBCT(0.50, mu, sigma, nu, tau), + P75 = dscore:::qBCT(0.75, mu, sigma, nu, tau), + P90 = dscore:::qBCT(0.90, mu, sigma, nu, tau), + P97 = dscore:::qBCT(0.97, mu, sigma, nu, tau), + SDM2 = dscore:::qBCT(pnorm(-2), mu, sigma, nu, tau), + SDM1 = dscore:::qBCT(pnorm(-1), mu, sigma, nu, tau), + SD0 = dscore:::qBCT(pnorm(-0), mu, sigma, nu, tau), + SDP1 = dscore:::qBCT(pnorm(+1), mu, sigma, nu, tau), + SDP2 = dscore:::qBCT(pnorm(+2), mu, sigma, nu, tau) ) -# ------------- phase1 references for subset of healthy participants -ref_phase1_healthy <- read.delim(file = f5) %>% - mutate(pop = "phase1_healthy", - P3 = dscore:::qBCT(0.03, mu, sigma, nu, tau), - P10 = dscore:::qBCT(0.10, mu, sigma, nu, tau), - P25 = dscore:::qBCT(0.25, mu, sigma, nu, tau), - P50 = dscore:::qBCT(0.50, mu, sigma, nu, tau), - P75 = dscore:::qBCT(0.75, mu, sigma, nu, tau), - P90 = dscore:::qBCT(0.90, mu, sigma, nu, tau), - P97 = dscore:::qBCT(0.97, mu, sigma, nu, tau), - SDM2 = dscore:::qBCT(pnorm(-2), mu, sigma, nu, tau), - SDM1 = dscore:::qBCT(pnorm(-1), mu, sigma, nu, tau), - SD0 = dscore:::qBCT(pnorm(-0), mu, sigma, nu, tau), - SDP1 = dscore:::qBCT(pnorm(+1), mu, sigma, nu, tau), - SDP2 = dscore:::qBCT(pnorm(+2), mu, sigma, nu, tau) + +# create copy for 293_0 +phase1_293_0 <- phase1_gsed2212 |> + mutate(key = "293_0") + +# ------------- preliminiary_standards based on coarse covariate selection +preliminary_standards_gsed2406 <- read.delim(file = f5) |> + mutate( + population = "preliminary_standards", + key = "gsed2406", + distribution = "BCT", + P3 = dscore:::qBCT(0.03, mu, sigma, nu, tau), + P10 = dscore:::qBCT(0.10, mu, sigma, nu, tau), + P25 = dscore:::qBCT(0.25, mu, sigma, nu, tau), + P50 = dscore:::qBCT(0.50, mu, sigma, nu, tau), + P75 = dscore:::qBCT(0.75, mu, sigma, nu, tau), + P90 = dscore:::qBCT(0.90, mu, sigma, nu, tau), + P97 = dscore:::qBCT(0.97, mu, sigma, nu, tau), + SDM2 = dscore:::qBCT(pnorm(-2), mu, sigma, nu, tau), + SDM1 = dscore:::qBCT(pnorm(-1), mu, sigma, nu, tau), + SD0 = dscore:::qBCT(pnorm(-0), mu, sigma, nu, tau), + SDP1 = dscore:::qBCT(pnorm(+1), mu, sigma, nu, tau), + SDP2 = dscore:::qBCT(pnorm(+2), mu, sigma, nu, tau) ) + +who_descriptive_gsed2510 <- read.delim(file = f6) |> + mutate( + population = "who_descriptive", + key = "gsed2510", + distribution = "BCT", + P3 = dscore:::qBCT(0.03, mu, sigma, nu, tau), + P10 = dscore:::qBCT(0.10, mu, sigma, nu, tau), + P25 = dscore:::qBCT(0.25, mu, sigma, nu, tau), + P50 = dscore:::qBCT(0.50, mu, sigma, nu, tau), + P75 = dscore:::qBCT(0.75, mu, sigma, nu, tau), + P90 = dscore:::qBCT(0.90, mu, sigma, nu, tau), + P97 = dscore:::qBCT(0.97, mu, sigma, nu, tau), + SDM2 = dscore:::qBCT(pnorm(-2), mu, sigma, nu, tau), + SDM1 = dscore:::qBCT(pnorm(-1), mu, sigma, nu, tau), + SD0 = dscore:::qBCT(pnorm(-0), mu, sigma, nu, tau), + SDP1 = dscore:::qBCT(pnorm(+1), mu, sigma, nu, tau), + SDP2 = dscore:::qBCT(pnorm(+2), mu, sigma, nu, tau) + ) + +# create copies for gsed2406 +phase1_gsed2406 <- phase1_gsed2212 |> + mutate(key = "gsed2406") +dutch_gsed2406 <- dutch_gsed2212 |> + mutate(key = "gsed2406") + +# create copies for gsed2510 +preliminary_standards_gsed2510 <- preliminary_standards_gsed2406 |> + mutate(key = "gsed2510") +dutch_gsed2510 <- dutch_gsed2212 |> + mutate(key = "gsed2510") + # save to /data -builtin_references <- bind_rows(ref_dutch, ref_gcdg, ref_phase1, ref_phase1_healthy, ref_dutchgsed) %>% - rename(age = year) %>% +builtin_references <- bind_rows( + dutch_dutch, + gcdg_gcdg, + gcdg_gsed1912, + phase1_293_0, + phase1_gsed2212, + dutch_gsed2212, + preliminary_standards_gsed2406, + phase1_gsed2406, + dutch_gsed2406, + preliminary_standards_gsed2510, + who_descriptive_gsed2510, + dutch_gsed2510 +) |> + rename(age = year) |> dplyr::select( - pop, age, mu, sigma, nu, tau, - P3, P10, P25, P50, P75, P90, P97, - SDM2, SDM1, SD0, SDP1, SDP2 + population, + key, + distribution, + age, + mu, + sigma, + nu, + tau, + P3, + P10, + P25, + P50, + P75, + P90, + P97, + SDM2, + SDM1, + SD0, + SDP1, + SDP2 ) usethis::use_data(builtin_references, overwrite = TRUE) diff --git a/data-raw/R/save_builtin_translate.R b/data-raw/R/save_builtin_translate.R new file mode 100644 index 00000000..5dbcd674 --- /dev/null +++ b/data-raw/R/save_builtin_translate.R @@ -0,0 +1,14 @@ +# Save built-in itemtable +# Fields: item, equate, label +library(dplyr) +fn <- file.path("data-raw/data/items/itemnames_translate.txt") +builtin_translate <- read.delim( + file = fn, + quote = "", + stringsAsFactors = FALSE, + na = "", + fileEncoding = "UTF-8", + header = TRUE +) + +usethis::use_data(builtin_translate, overwrite = TRUE) diff --git a/data-raw/R/save_gsample.R b/data-raw/R/save_gsample.R index d166851b..38cd735c 100644 --- a/data-raw/R/save_gsample.R +++ b/data-raw/R/save_gsample.R @@ -1,14 +1,54 @@ -hh_subset <- c("gpasec004", "gpasec015", "gpalac001", "gpacgc002", "gpamoc011", - "gpasec010", "gpaclc007", "gpalgc012", "gpasec014", "gpalgc021", - "gpasec020", "gpamoc017", "gpalgc019", "gpasec025", "gpaclc033", - "gpaclc023", "gpasec032", "gpasec045", "gpamoc024", "gpamoc037", - "gpaclc034", "gpamoc029", "gpasec039", "gpamoc028", "gpamoc044", - "gpamoc042", "gpamoc043", "gpaclc046", "gpamoc049", "gpasec064", - "gpamoc054", "gpamoc058", "gpamoc056", "gpalgc059", "gpamoc060", - "gpalgc068", "gpamoc061", "gpasec075", "gpamoc062", "gpamoc065", - "gpamoc063", "gpalgc072", "gpasec086", "gpamoc071", "gpagmc067", - "gpamoc078", "gpaclc088", "gpaclc093", "gpamoc084", "gpaxxc092", - "gpaclc101", "gpacmc090", "gpaclc112", "gpamoc106", "gpaclc113") +hh_subset <- c( + "gpalgc012", + "gpasec014", + "gpalgc021", + "gpasec020", + "gpamoc017", + "gpalgc019", + "gpasec025", + "gpaclc033", + "gpaclc023", + "gpagmc013", + "gpasec045", + "gpagmc018", + "gpamoc037", + "gpaclc034", + "gpamoc029", + "gpamoc040", + "gpamoc041", + "gpamoc044", + "gpamoc042", + "gpamoc043", + "gpaclc046", + "gpamoc049", + "gpasec064", + "gpamoc054", + "gpamoc058", + "gpamoc056", + "gpalgc059", + "gpamoc060", + "gpalgc068", + "gpamoc061", + "gpasec075", + "gpamoc062", + "gpamoc065", + "gpamoc063", + "gpalgc072", + "gpasec086", + "gpamoc071", + "gpagmc067", + "gpamoc078", + "gpaclc089", + "gpaclc093", + "gpamoc084", + "gpaxxc092", + "gpaclc101", + "gpacmc090", + "gpaclc112", + "gpamoc106", + "gpaclc113" +) + file <- "data-raw/data/sample/gsed_sample.txt" gsample <- read.table(file, header = TRUE, sep = "\t") usethis::use_data(gsample, overwrite = TRUE) @@ -17,9 +57,21 @@ sample_sf <- cbind(gsample[, 1:9], gpamoc008 = NA, gsample[, 10:140]) sample_lf <- cbind(gsample[, 1:2], gsample[, 141:ncol(gsample)]) sample_hf <- sample_sf[, c("subjid", "agedays", hh_subset)] -colnames(sample_sf) <- c("subjid", "agedays", paste0("sf", formatC(1:139, width = 3, flag = "0"))) -colnames(sample_lf) <- c("subjid", "agedays", paste0("lf", formatC(1:155, width = 3, flag = "0"))) -colnames(sample_hf) <- c("subjid", "agedays", paste0("hf", formatC(1:55, width = 3, flag = "0"))) +colnames(sample_sf) <- c( + "subjid", + "agedays", + paste0("sf", formatC(1:139, width = 3, flag = "0")) +) +colnames(sample_lf) <- c( + "subjid", + "agedays", + paste0("lf", formatC(1:155, width = 3, flag = "0")) +) +colnames(sample_hf) <- c( + "subjid", + "agedays", + paste0("hf", formatC(1:48, width = 3, flag = "0")) +) usethis::use_data(sample_sf, overwrite = TRUE) usethis::use_data(sample_lf, overwrite = TRUE) diff --git a/data-raw/R/save_gsx_itemtable.R b/data-raw/R/save_gsx_itemtable.R index 3c81630f..d9706175 100644 --- a/data-raw/R/save_gsx_itemtable.R +++ b/data-raw/R/save_gsx_itemtable.R @@ -7,32 +7,67 @@ library(openxlsx) # NOTE: The following file is invalid for LF, use only for SF # NOTE: sfi$tau is taken from key 294_0. IGNORE fn <- file.path("data-raw/data/SF_LF_Phase 2_Item Ordering.txt") -sfi <- read.delim(file = fn, quote = "", - stringsAsFactors = FALSE, na = "", - fileEncoding = "UTF-8", - header = TRUE) -colnames(sfi) <- c("start", "ph2", "ph1", "tau", "label", "domain", "gsed2", "gsed1") -sfi$domain <- recode(sfi$domain, sem = "se", motor = "mo", lang = "lg", cog = "cg", life = "li") +sfi <- read.delim( + file = fn, + quote = "", + stringsAsFactors = FALSE, + na = "", + fileEncoding = "UTF-8", + header = TRUE +) +colnames(sfi) <- c( + "start", + "ph2", + "ph1", + "tau", + "label", + "domain", + "gsed2", + "gsed1" +) +sfi$domain <- recode( + sfi$domain, + sem = "se", + motor = "mo", + lang = "lg", + cog = "cg", + life = "li" +) # LF Item order (corrected 22021201) fn <- file.path("data-raw/data/lf_gto_match_2.xlsx") lfi <- read.xlsx(fn, sheet = "gto_LF1_LF2 (221130)", startRow = 2) -lfi <- lfi[, c("stream", "matched_item", "matched_tau", "LF2_correct", "LF2_Stem")] +lfi <- lfi[, c( + "stream", + "matched_item", + "matched_tau", + "LF2_correct", + "LF2_Stem" +)] lfi <- lfi[order(lfi$LF2_correct), ] lfi <- lfi[!is.na(lfi$matched_tau), ] # select core model, using gpa and gto instrument codes fn <- file.path("data-raw/data/keys/293_0.txt") -core <- read.delim(file = fn, quote = "", - stringsAsFactors = FALSE, na = "", - fileEncoding = "UTF-8", - header = TRUE) +core <- read.delim( + file = fn, + quote = "", + stringsAsFactors = FALSE, + na = "", + fileEncoding = "UTF-8", + header = TRUE +) core$label <- get_labels(core$item) # Construct item names gs1 # gs1: GSED SF Version 1 (Validation Phase 2) # create gs1 itembank part -gs1_names <- paste0("gs1", sfi$domain, "c", formatC(1:139, width = 3, flag = "0")) +gs1_names <- paste0( + "gs1", + sfi$domain, + "c", + formatC(1:139, width = 3, flag = "0") +) gs1 <- data.frame(gs1_names, item = sfi$gsed2) gs1 <- left_join(x = gs1, y = core, by = "item") gs1 <- data.frame( @@ -40,18 +75,23 @@ gs1 <- data.frame( item = gs1$gs1_names, tau = gs1$tau, label = gs1$label, - decompose_itemnames(gs1_names)) + decompose_itemnames(gs1_names) +) gs1[28, "label"] <- "Does your child hold his/her hands in fists all the time?" # Construct item names gl1 # gl1: GSED LF Version 1 (Validation Phase 2) # create gl1 itembank part -gl1_names <- paste0("gl1", - c(rep("gm", 49), rep("lg",52), rep("fm", 54)), - "d", - c(formatC(1:49, width = 3, flag = "0"), - formatC(1:52, width = 3, flag = "0"), - formatC(1:54, width = 3, flag = "0"))) +gl1_names <- paste0( + "gl1", + c(rep("gm", 49), rep("lg", 52), rep("fm", 54)), + "d", + c( + formatC(1:49, width = 3, flag = "0"), + formatC(1:52, width = 3, flag = "0"), + formatC(1:54, width = 3, flag = "0") + ) +) gl1 <- data.frame(new = gl1_names, item = lfi$matched_item) gl1 <- left_join(x = gl1, y = core, by = "item") gl1 <- data.frame( @@ -59,9 +99,15 @@ gl1 <- data.frame( item = gl1_names, tau = lfi$matched_tau, label = lfi$LF2_Stem, - decompose_itemnames(gl1_names)) + decompose_itemnames(gl1_names) +) gsx <- bind_rows(gs1, gl1) -write.table(gsx, file = "data-raw/data/keys/items_gs1_gl1.txt", - quote = FALSE, sep = "\t", row.names = FALSE) +write.table( + gsx, + file = "data-raw/data/keys/items_gs1_gl1.txt", + quote = FALSE, + sep = "\t", + row.names = FALSE +) diff --git a/data-raw/R/save_milestones.R b/data-raw/R/save_milestones.R index 29e97434..963d103e 100644 --- a/data-raw/R/save_milestones.R +++ b/data-raw/R/save_milestones.R @@ -4,26 +4,32 @@ library("haven") library("labelled") # read data -pops_orig <- haven::read_sav(path.expand("~/Websites/dbook/dbook1/data-raw/data/pops/POPS19groeiSDS2whoTranslatedExtrav2PLUS.sav")) +pops_orig <- haven::read_sav(path.expand( + "~/Websites/dbook/dbook1/data-raw/data/pops/POPS19groeiSDS2whoTranslatedExtrav2PLUS.sav" +)) # translate DDI itemnames to lex_gsed items <- gseddata::rename_gcdg_gsed(paste0("n", 1:57)) names(pops_orig)[44:100] <- items # rename variables -pops_data <- pops_orig %>% +pops_data <- pops_orig |> mutate( subjid = as.integer(patid), sex = recode(gender, `1` = "male", `2` = "female", .missing = "unknown"), agedays = as.integer(Age), age = agedays / 365.25, gagebrth = as.integer(gestationalage * 7) - ) %>% - mutate_at(vars(items), function(x) as.integer(1 - x)) %>% + ) |> + mutate_at(vars(items), function(x) as.integer(1 - x)) |> dplyr::select( - subjid, sex, agedays, age, + subjid, + sex, + agedays, + age, gagebrth, - dead, handicap, + dead, + handicap, items ) @@ -33,8 +39,8 @@ nas <- apply(pops_data[, items], MARGIN = 1, function(x) sum(is.na(x))) # select rows with at least one DDI-item # infants below 32 weeks (224 days) gestational age # no dead, no handicaps -pops_pt <- pops_data %>% - dplyr::filter(nas < 57) %>% +pops_pt <- pops_data |> + dplyr::filter(nas < 57) |> dplyr::filter(gagebrth < 224 & dead == 0 & handicap == 0) # Data on 258 pre-terms @@ -42,7 +48,7 @@ pops_pt <- pops_data %>% # [1] 258 # ---- save first 100 rows -popsdemo <- dplyr::slice(pops_pt, 1:100) %>% +popsdemo <- dplyr::slice(pops_pt, 1:100) |> as.data.frame() ids <- table(popsdemo$subjid) @@ -51,9 +57,9 @@ ids <- table(popsdemo$subjid) set.seed(15199) id <- sample(100:999, size = length(ids)) popsdemo$id <- rep(id, ids) -milestones <- popsdemo %>% - select(-subjid, agedays, -dead, -handicap) %>% - select(id, agedays, age, sex, everything()) %>% +milestones <- popsdemo |> + select(-subjid, agedays, -dead, -handicap) |> + select(id, agedays, age, sex, everything()) |> arrange(id, age) # save to /data diff --git a/data-raw/R/save_triple.R b/data-raw/R/save_triple.R new file mode 100644 index 00000000..1a2d0454 --- /dev/null +++ b/data-raw/R/save_triple.R @@ -0,0 +1,3 @@ +file <- "data-raw/data/sample/triple.txt" +triple <- read.table(file, header = TRUE, sep = "\t") +usethis::use_data(triple, overwrite = TRUE) diff --git a/data-raw/R/update_equates.R b/data-raw/R/update_equates.R index a6b67828..09c4b3ad 100644 --- a/data-raw/R/update_equates.R +++ b/data-raw/R/update_equates.R @@ -1,6 +1,6 @@ # This script compares the equate groups defined in # ddata::itemtable and dscore::itemtable -library(ddata) # V0.50.0 +library(ddata) # V0.50.0 it <- ddata::itemtable rownames(it) <- NULL @@ -41,25 +41,45 @@ it$equate.x <- it$equate.y it$label.x[2652:3173] <- it$label.y[2652:3173] it$equate <- it$equate.x -it$label <- it$label.x +it$label <- it$label.x it <- it[, c("item", "equate", "label")] it <- it[gtools::mixedorder(it$item), ] rownames(it) <- NULL # remove gremlins -it[121, 3] <- "Draw a 4-inch circle on a piece of paper. Does your child use child-safe scissors to cut it out staying within a 1/4 inch of the lines? (Carefully watch your child's use of scissors for safety reasons.)" +it[ + 121, + 3 +] <- "Draw a 4-inch circle on a piece of paper. Does your child use child-safe scissors to cut it out staying within a 1/4 inch of the lines? (Carefully watch your child's use of scissors for safety reasons.)" it[251, 3] <- "Can your child count past '40'?" -it[252, 3] <- "Does your child correctly spell 3-letter words? For example, 'cat', 'dog', 'pen'." -it[253, 3] <- "Can your child tell you all 12 months of the year? Mark 'Sometimes' if your child can tell you more than 6 months of the year." +it[ + 252, + 3 +] <- "Does your child correctly spell 3-letter words? For example, 'cat', 'dog', 'pen'." +it[ + 253, + 3 +] <- "Can your child tell you all 12 months of the year? Mark 'Sometimes' if your child can tell you more than 6 months of the year." it[255, 3] <- "Can your child count to 100 by 10's?" -it[2781, 3] <- "Does your child stop what he/she is doing when you say 'Stop!' even if just for a second?" +it[ + 2781, + 3 +] <- "Does your child stop what he/she is doing when you say 'Stop!' even if just for a second?" it[2782, 3] <- "Does your child make a gesture to indicate 'No'?" -it[2853, 3] <- "Can your child greet people either by giving his/her hand or saying 'hello'?" +it[ + 2853, + 3 +] <- "Can your child greet people either by giving his/her hand or saying 'hello'?" it[2972, 3] <- "Three-hole board - one in, two trials." it[2973, 3] <- "Three-hole board - three in." -write.table(x = it, file = "data-raw/data/itemtable_20200424.txt", - quote = FALSE, sep = "\t", na = "", row.names = FALSE, - fileEncoding = "UTF-8") - +write.table( + x = it, + file = "data-raw/data/itemtable_20200424.txt", + quote = FALSE, + sep = "\t", + na = "", + row.names = FALSE, + fileEncoding = "UTF-8" +) diff --git a/data-raw/data/SF_LF_Phase 2_Item Ordering.txt b/data-raw/data/SF_LF_Phase 2_Item Ordering.txt index ae09b7c0..edab13a6 100644 --- a/data-raw/data/SF_LF_Phase 2_Item Ordering.txt +++ b/data-raw/data/SF_LF_Phase 2_Item Ordering.txt @@ -82,7 +82,7 @@ Start Item? Phase 2 order Phase 1 order tau label Domain gsed2 variable name old 18-20 months SF081 SF78 51,44 Can your child stack at least two objects on top of each other, such as bottle tops, blocks, stones, etc.? motor gpamoc078 iyomoc030 SF082 SF85 52,51 Can your child greet people either by giving his/her hand or saying Hello? sem gpasec085 mdtsed017 SF083 SF79 52,82 Can your child kick a ball or other round object forward using his/her foot? motor gpamoc079 cromoc025 - SF084 SF88 53,7 Can your child say five or more separate words (e.g., names like 'Mama' or objects like 'ball')? lang gpaclc088 croclc023 + SF084 SF89 53,7 Can your child say five or more separate words (e.g., names like 'Mama' or objects like 'ball')? lang gpaclc089 croclc023 21-23 months SF085 SF81 54,64 Can your child follow directions with more than one step? For example, 'Go to the kitchen and bring me a spoon'? cog gpalgc081 iyolgc017 SF086 SF96 55,69 Can your child correctly name at least one family member other than mom and dad (e.g., name of brother, sister, aunt, uncle)? lang gpaclc096 croclc028 SF087 SF99 55,74 Can your child identify at least seven objects? For example, when you ask 'where is the ball/spoon/cup/cloth/door/plate/bucket etc.' does your child look at or point to (or even name) the objects? lang gpalgc099 iyolgc022 @@ -101,7 +101,7 @@ Start Item? Phase 2 order Phase 1 order tau label Domain gsed2 variable name old 27-29 months SF100 SF91 60,45 Can your child speak using short sentences of two words that go together (e.g., 'Mama go' or 'Dada eat'? lang gpaclc091 croclc024 SF101 SF110 60,6 Can your child unscrew the lid from a bottle or jar? motor gpamoc110 cromoc033 SF102 SF130 61,82 Does your child help out around the house with simple chores, even if he/she doesn't do them well? sem gpasec130 mdtsed029 - SF103 SF89 62,7 Is your child able to go poo or pee without having accidents (wetting or soiling themselves)? life gpasec089 mdtsed019 + SF103 SF88 62,7 Is your child able to go poo or pee without having accidents (wetting or soiling themselves)? life gpasec088 mdtsed019 30-32 months SF104 SF112 62,71 Can your child speak using sentences of three or more words that go together (e.g., 'I want water' or 'The house is big')? lang gpaclc112 croclc029 SF105 SF100 62,74 Can your child name at least two body parts (e.g., arm, eye, or nose)? lang gpaclc100 croclc038 SF106 SF104 63,04 Can your child remove an item of clothing (e.g., take off his/her shirt)? life gpamoc104 cromoc035 diff --git a/data-raw/data/ageforms_2023-01-13.xlsx b/data-raw/data/ageforms_2023-01-13.xlsx deleted file mode 100644 index 6127d449..00000000 Binary files a/data-raw/data/ageforms_2023-01-13.xlsx and /dev/null differ diff --git a/data-raw/data/ageforms_2025-07-15.xlsx b/data-raw/data/ageforms_2025-07-15.xlsx new file mode 100644 index 00000000..9c6467eb Binary files /dev/null and b/data-raw/data/ageforms_2025-07-15.xlsx differ diff --git a/data-raw/data/items/itemnames_translate.txt b/data-raw/data/items/itemnames_translate.txt new file mode 100644 index 00000000..c9ea9d66 --- /dev/null +++ b/data-raw/data/items/itemnames_translate.txt @@ -0,0 +1,621 @@ +phase1 phase2 gsed gsed2 gsed3 short1 short2 instrument seq_phase1 seq_phase2 label +Ma_LF_A03 Ma_LF_A01 mdtsed003 gtogmd003 gl1gmd001 A03 A01 LF 3 1 A1 Moves body in reaction to caregiver +Ma_LF_A02 Ma_LF_A02 mdtsed004 gtogmd002 gl1gmd002 A02 A02 LF 2 2 A2 Moves body, kicking legs and moving arms equally on his/her own +Ma_LF_A06 Ma_LF_A03 mdtgmd004 gtogmd006 gl1gmd003 A06 A03 LF 6 3 A3 Pulls to sit - no head lag +Ma_LF_A01 Ma_LF_A04 ddigmd057 gtogmd001 gl1gmd004 A01 A04 LF 1 4 A4 Lifts head in prone 45 degrees (2X) +Ma_LF_A07 Ma_LF_A05 mdtgmd005 gtogmd007 gl1gmd005 A07 A05 LF 7 5 A5 Lifts head, shoulders, chest when prone (2X) +Ma_LF_A04 Ma_LF_A06 mdtfmd003 gtogmd004 gl1gmd006 A04 A06 LF 4 6 A6 Puts hands together in front of face +Ma_LF_A11 Ma_LF_A07 sgrehd012 gtogmd011 gl1gmd007 A11 A07 LF 11 7 A7 Carries object to mouth to explore (2X) +Ma_LF_A08 Ma_LF_A08 by1mdd051 gtogmd008 gl1gmd008 A08 A08 LF 8 8 A8 Reaches for an object (2X) +Ma_LF_A10 Ma_LF_A09 mdtfmd006 gtogmd010 gl1gmd009 A10 A09 LF 10 9 A9 Grasps hold of large object (2X) +Ma_LF_A05 Ma_LF_A10 ddigmd061 gtogmd005 gl1gmd010 A05 A10 LF 5 10 A10 Balances head while supported +Ma_LF_A12 Ma_LF_A11 dmcgmd003 gtogmd012 gl1gmd011 A12 A11 LF 12 11 A11 Sits supported (with help) (2X) +Ma_LF_A09 Ma_LF_A12 sgrred010 gtogmd009 gl1gmd012 A09 A12 LF 9 12 A12 Resists object being taken away (2X) +Ma_LF_A16 Ma_LF_A13 mdtfmd008 gtogmd016 gl1gmd013 A16 A13 LF 16 13 A13 Sees a small object (2X) +Ma_LF_A13 Ma_LF_A14 by1pdd023 gtogmd013 gl1gmd014 A13 A14 LF 13 14 A14 Sits momentarily (on his/her own) (2X) +Ma_LF_A18 Ma_LF_A15 mdtgmd009 gtogmd018 gl1gmd015 A18 A15 LF 18 15 A15 Sits without help (short time) (2X) +Ma_LF_A20 Ma_LF_A16 mdtfmd007 gtogmd020 gl1gmd016 A20 A16 LF 20 16 A16 Picks object from ground (2X) +Ma_LF_A15 Ma_LF_A17 by1pdd028 gtogmd015 gl1gmd017 A15 A17 LF 15 17 A17 Rolls from back to stomach (2X) +Ma_LF_A22 Ma_LF_A18 mdtgmd010 gtogmd022 gl1gmd018 A22 A18 LF 22 18 A18 Sits by self well (2X) +Ma_LF_A17 Ma_LF_A19 denfmd009 gtogmd017 gl1gmd019 A17 A19 LF 17 19 A19 Rakes (grasps with 3 or 4 fingers) a small object (2X) +Ma_LF_A19 Ma_LF_A20 sgrgmd022 gtogmd019 gl1gmd020 A19 A20 LF 19 20 A20 Turns on floor (2X) +Ma_LF_A26 Ma_LF_A21 kdigmd031 gtogmd026 gl1gmd021 A26 A21 LF 26 21 A21 Moves from lying to sitting +Ma_LF_A27 Ma_LF_A22 kdigmd001 gtogmd027 gl1gmd022 A27 A22 LF 27 22 A22 Stands with support (2X) +Ma_LF_A14 Ma_LF_A23 by1mdd064 gtogmd014 gl1gmd023 A14 A23 LF 14 23 A23 Reaches for a second object (2X) +Ma_LF_A23 Ma_LF_A24 dmcgmd005 gtogmd023 gl1gmd024 A23 A24 LF 23 24 A24 Crawls (2X) +Ma_LF_A25 Ma_LF_A25 mdtgmd012 gtogmd025 gl1gmd025 A25 A25 LF 25 25 A25 Pulls up to standing position (2X) +Ma_LF_A21 Ma_LF_A26 mdtfmd009 gtogmd021 gl1gmd026 A21 A26 LF 21 26 A26 Shifts object from 1 hand to the other (2X) +Ma_LF_A24 Ma_LF_A27 ddifmd010 gtogmd024 gl1gmd027 A24 A27 LF 24 27 A27 Picks up small object between thumb and finger (2X) +Ma_LF_A29 Ma_LF_A28 kdigmd005 gtogmd029 gl1gmd028 A29 A28 LF 29 28 A28 Walks when 1 hand held (2X) +Ma_LF_A28 Ma_LF_A29 dmcgmd009 gtogmd028 gl1gmd029 A28 A29 LF 28 29 A29 Stands alone for 5 seconds or more if put in standing position (2X) +Ma_LF_A30 Ma_LF_A30 ddifmm012 gtogmd030 gl1gmd030 A30 A30 LF 30 30 "A30 Plays ""give-and-take"" (3X)" +Ma_LF_A32 Ma_LF_A31 grigmd203 gtogmd032 gl1gmd031 A32 A31 LF 32 31 A31 Takes few steps alone (2X) +Ma_LF_A36 Ma_LF_A32 mdtgmd018 gtogmd036 gl1gmd032 A36 A32 LF 36 32 A32 Walks +Ma_LF_A37 Ma_LF_A33 mdtgmd019 gtogmd037 gl1gmd033 A37 A33 LF 37 33 A33 Runs (basic), may fall over (2X) +Ma_LF_A34 Ma_LF_A34 mdtgmd017 gtogmd034 gl1gmd034 A34 A34 LF 34 34 A34 Stoops and recovers (2X) +Ma_LF_A31 Ma_LF_A35 kdifmd002 gtogmd031 gl1gmd035 A31 A35 LF 31 35 A35 Releases ball purposefully (2X) +Ma_LF_A38 Ma_LF_A36 mdtgmd021 gtogmd038 gl1gmd036 A38 A36 LF 38 36 A36 Runs well (2X) +Ma_LF_A33 Ma_LF_A37 kdigmd003 gtogmd033 gl1gmd037 A33 A37 LF 33 37 A37 Kicks a ball from stationary position (2X) +Ma_LF_A39 Ma_LF_A38 mdtgmd024 gtogmd039 gl1gmd038 A39 A38 LF 39 38 A38 Runs and kicks a ball well (2X) +Ma_LF_A40 Ma_LF_A39 mdtgmd022 gtogmd040 gl1gmd039 A40 A39 LF 40 39 A39 Kneels and then stands, without using hands (2X) +Ma_LF_A45 Ma_LF_A40 mdtgmd031 gtogmd045 gl1gmd040 A45 A40 LF 45 40 A40 Hops forward on 1 foot 3 steps (2X) +Ma_LF_A42 Ma_LF_A41 kdigmd008 gtogmd042 gl1gmd041 A42 A41 LF 42 41 A41 Jumps with both feet together (2X) +Ma_LF_A43 Ma_LF_A42 mdtgmd029 gtogmd043 gl1gmd042 A43 A42 LF 43 42 A42 Jumps over a piece of paper (widthways) (2X) +Ma_LF_A48 Ma_LF_A43 kdigmd015 gtogmd048 gl1gmd043 A48 A43 LF 48 43 A43 Walks along line heel-to-toe (2X) +Ma_LF_A41 Ma_LF_A44 mdtgmd023 gtogmd041 gl1gmd044 A41 A44 LF 41 44 A44 Throws beanbag onto a cloth (3X) +Ma_LF_A44 Ma_LF_A45 mdtgmd027 gtogmd044 gl1gmd045 A44 A45 LF 44 45 A45 Stands on 1 foot < 5 seconds (2X) +Ma_LF_A47 Ma_LF_A46 mdtgmd030 gtogmd047 gl1gmd046 A47 A46 LF 47 46 A46 Walks on tiptoes 6 or more steps +Ma_LF_A35 Ma_LF_A47 kdigmd034 gtogmd035 gl1gmd047 A35 A47 LF 35 47 A47 Moves from sitting to standing without using hands +Ma_LF_A46 Ma_LF_A48 mdtgmd032 gtogmd046 gl1gmd048 A46 A48 LF 46 48 A48 Stands on 1 foot > 5 seconds (2X) +Ma_LF_A49 Ma_LF_A49 mdtgmd033 gtogmd049 gl1gmd049 A49 A49 LF 49 49 A49 Throws ball up into the air and catches it (3X) +Ma_LF_B04 Ma_LF_B01 mdtlgd002 gtolgd004 gl1lgd001 B04 B01 LF 53 50 B1 Makes sounds or vocalizes (2X) +Ma_LF_B01 Ma_LF_B02 ddicmm029 gtolgd001 gl1lgd002 B01 B02 LF 50 51 B2 Reacts when spoken to (2X) +Ma_LF_B02 Ma_LF_B03 ddicmm030 gtolgd002 gl1lgd003 B02 B03 LF 51 52 B3 Smiles in response (2X) +Ma_LF_B06 Ma_LF_B04 mdtlgd003 gtolgd006 gl1lgd004 B06 B04 LF 55 53 B4 Laughs (2X) +Ma_LF_B03 Ma_LF_B05 mdtsed005 gtolgd003 gl1lgd005 B03 B05 LF 52 54 B5 Calms and quiets with caregiver +Ma_LF_B07 Ma_LF_B06 sgrred006 gtolgd007 gl1lgd006 B07 B06 LF 56 55 B6 Vocalizes when spoken to +Ma_LF_B05 Ma_LF_B07 denlgd007 gtolgd005 gl1lgd007 B05 B07 LF 54 56 B7 Turns to voice (2X) +Ma_LF_B09 Ma_LF_B08 ddicmm034 gtolgd009 gl1lgd008 B09 B08 LF 58 57 B8 Babbles while playing +Ma_LF_B08 Ma_LF_B09 dmclgd002 gtolgd008 gl1lgd009 B08 B09 LF 57 58 B9 Repeats syllables +Ma_LF_B12 Ma_LF_B10 dmclgd005 gtolgd012 gl1lgd010 B12 B10 LF 61 59 B10 Uses gestures to communicate +Ma_LF_B10 Ma_LF_B11 mdtlgd007 gtolgd010 gl1lgd011 B10 B11 LF 59 60 B11 Uses 2 - 4 syllable babble +Ma_LF_B13 Ma_LF_B12 by1mdd089 gtolgd013 gl1lgd012 B13 B12 LF 62 61 B12 Responds to verbal request (2X) +Ma_LF_B14 Ma_LF_B13 dmclgd006 gtolgd014 gl1lgd013 B14 B13 LF 63 62 B13 Uses 1 definite word +Ma_LF_B11 Ma_LF_B14 mdtlgd008 gtolgd011 gl1lgd014 B11 B14 LF 60 63 B14 Understands when being cautioned (2X) +Ma_LF_B15 Ma_LF_B15 by1mdd106 gtolgd015 gl1lgd015 B15 B15 LF 64 64 B15 Imitates simple words (2X) +Ma_LF_B20 Ma_LF_B16 mdtlgd010 gtolgd020 gl1lgd016 B20 B16 LF 69 65 B16 Follows simple commands (1 step) (2X) +Ma_LF_B21 Ma_LF_B17 by2mdd099 gtolgd021 gl1lgd017 B21 B17 LF 70 66 B17 Points to 2 pictures +Ma_LF_B18 Ma_LF_B18 ddicmd141 gtolgd018 gl1lgd018 B18 B18 LF 67 67 B18 Identifies 2 objects you name (2X) +Ma_LF_B26 Ma_LF_B19 mdtlgd016 gtolgd026 gl1lgd019 B26 B19 LF 75 68 B19 Identifies 5 objects you name (2X) +Ma_LF_B17 Ma_LF_B20 by1mdd117 gtolgd017 gl1lgd020 B17 B20 LF 66 69 B20 Identifies 1 item of clothing +Ma_LF_B22 Ma_LF_B21 by3red022 gtolgd022 gl1lgd021 B22 B21 LF 71 70 B21 Identifies 3 items of clothing +Ma_LF_B29 Ma_LF_B22 mdtlgd018 gtolgd029 gl1lgd022 B29 B22 LF 78 71 B22 Points to 1 or more body parts (2X) +Ma_LF_B25 Ma_LF_B23 ddicmd044 gtolgd025 gl1lgd023 B25 B23 LF 74 72 B23 Points at 5 pictures in book +Ma_LF_B19 Ma_LF_B24 by3cgd059 gtolgd019 gl1lgd024 B19 B24 LF 68 73 B24 Shows interest in story +Ma_LF_B23 Ma_LF_B25 mdtlgd015 gtolgd023 gl1lgd025 B23 B25 LF 72 74 B25 Follows 2-step commands (2X) +Ma_LF_B24 Ma_LF_B26 ddicmm041 gtolgd024 gl1lgd026 B24 B26 LF 73 75 B26 Says sentences with 2 words together +Ma_LF_B33 Ma_LF_B27 grihsd223 gtolgd033 gl1lgd027 B33 B27 LF 82 76 B27 Names 4 pictures +Ma_LF_B16 Ma_LF_B28 grihsd208 gtolgd016 gl1lgd028 B16 B28 LF 65 77 B28 Uses 5 clear words +Ma_LF_B32 Ma_LF_B29 by3cgd064 gtolgd032 gl1lgd029 B32 B29 LF 81 78 B29 Matches pictures +Ma_LF_B27 Ma_LF_B30 mdtlgd019 gtolgd027 gl1lgd030 B27 B30 LF 76 79 B30 Names 5 objects (2X) +Ma_LF_B36 Ma_LF_B31 by3exd029 gtolgd036 gl1lgd031 B36 B31 LF 85 80 B31 Uses multiple-word utterances +Ma_LF_B28 Ma_LF_B32 mdtlgd017 gtolgd028 gl1lgd032 B28 B32 LF 77 81 B32 Speaks clearly in sentences +Ma_LF_B31 Ma_LF_B33 mdtlgd021 gtolgd031 gl1lgd033 B31 B33 LF 80 82 B33 Knows actions or functions of 3 or more objects +Ma_LF_B38 Ma_LF_B34 by3red028 gtolgd038 gl1lgd034 B38 B34 LF 87 83 B34 Points to parts of whole objects +Ma_LF_B30 Ma_LF_B35 mdtlgd020 gtolgd030 gl1lgd035 B30 B35 LF 79 84 B35 Says first name (2X) +Ma_LF_B35 Ma_LF_B36 mdtlgd023 gtolgd035 gl1lgd036 B35 B36 LF 84 85 B36 Names 10 objects (2X) +Ma_LF_B47 Ma_LF_B37 teplgd018 gtolgd047 gl1lgd037 B47 B37 LF 96 86 "B27 Understands ""more"" (2X)" +Ma_LF_B43 Ma_LF_B38 teplgd032 gtolgd043 gl1lgd038 B43 B38 LF 92 87 B38 Identifies 2 or more colours (2X) +Ma_LF_B45 Ma_LF_B39 grihsd303 gtolgd045 gl1lgd039 B45 B39 LF 94 88 B39 Knows use of objects (2X) +Ma_LF_B49 Ma_LF_B40 teplgd031 gtolgd049 gl1lgd040 B49 B40 LF 98 89 B40 Names at least 2 colours (2X) +Ma_LF_B34 Ma_LF_B41 by3red029 gtolgd034 gl1lgd041 B34 B41 LF 83 90 B41 Identifies 5 action pictures +Ma_LF_B48 Ma_LF_B42 teplgd034 gtolgd048 gl1lgd042 B48 B42 LF 97 91 B42 Identifies at least 2 shapes (2X) +Ma_LF_B37 Ma_LF_B43 ddicmm047 gtolgd037 gl1lgd043 B37 B43 LF 86 92 B43 Talks easily about daily events +Ma_LF_B42 Ma_LF_B44 teplgd035 gtolgd042 gl1lgd044 B42 B44 LF 91 93 B44 Describes picture (2X) +Ma_LF_B39 Ma_LF_B45 teplgd281 gtolgd039 gl1lgd045 B39 B45 LF 88 94 B45 Gives logical response to a question (2X) +Ma_LF_B40 Ma_LF_B46 mdtlgd024 gtolgd040 gl1lgd046 B40 B46 LF 89 95 B46 Categorizes things +Ma_LF_B41 Ma_LF_B47 by3cgd068 gtolgd041 gl1lgd047 B41 B47 LF 90 96 B47 Matches 3 colours (2X) +Ma_LF_B44 Ma_LF_B48 mdtlgd029 gtolgd044 gl1lgd048 B44 B48 LF 93 97 "B48 Understands adjective ""faster"" (2X)" +Ma_LF_B46 Ma_LF_B49 by3exd037 gtolgd046 gl1lgd049 B46 B49 LF 95 98 B49 Names actions (5) +Ma_LF_B50 Ma_LF_B50 sbiwmd007 gtolgd050 gl1lgd050 B50 B50 LF 99 99 B50 Taps with 2 blocks +Ma_LF_B51 Ma_LF_B51 sbiwmd008 gtolgd051 gl1lgd051 B51 B51 LF 100 100 B51 Taps with 4 blocks +Ma_LF_B52 Ma_LF_B52 sbiwmd009 gtolgd052 gl1lgd052 B52 B52 LF 101 101 B52 Taps with 8 blocks +Ma_LF_C01 Ma_LF_C01 ddifmd001 gtofmd001 gl1fmd001 C01 C01 LF 102 102 C1 Fixates eyes (2X) +Ma_LF_C02 Ma_LF_C02 mdtlgd001 gtofmd002 gl1fmd002 C02 C02 LF 103 103 C2 Responds to sound (2X) +Ma_LF_C03 Ma_LF_C03 mdtfmd002 gtofmd003 gl1fmd003 C03 C03 LF 104 104 C3 Fixes and follows - 180 degrees +Ma_LF_C07 Ma_LF_C04 sgrred018 gtofmd007 gl1fmd004 C07 C04 LF 108 105 C4 Manipulates cup OR spoon in play +Ma_LF_C04 Ma_LF_C05 by1mdd072 gtofmd004 gl1fmd005 C04 C05 LF 105 106 C5 Shows interest in making a sound (2X) +Ma_LF_C06 Ma_LF_C06 by1mdd062 gtofmd006 gl1fmd006 C06 C06 LF 107 107 C6 Turns head towards fallen object (2X) +Ma_LF_C05 Ma_LF_C07 by1mdd058 gtofmd005 gl1fmd007 C05 C07 LF 106 108 C7 Discriminates strangers +Ma_LF_C10 Ma_LF_C08 by1mdd088 gtofmd010 gl1fmd008 C10 C08 LF 111 109 C8 Picks up cup to get block +Ma_LF_C13 Ma_LF_C09 mdtfmd012 gtofmd013 gl1fmd009 C13 C09 LF 114 110 C9 Finds toy under cloth (2X) +Ma_LF_C09 Ma_LF_C10 by1mdd080 gtofmd009 gl1fmd010 C09 C10 LF 110 111 C10 Pulls string to get object (2X) +Ma_LF_C08 Ma_LF_C11 by1mdd073 gtofmd008 gl1fmd011 C08 C11 LF 109 112 C11 Lifts cup by the handle (2X) +Ma_LF_C11 Ma_LF_C12 denfmd014 gtofmd011 gl1fmd012 C11 C12 LF 112 113 C12 Puts block in cup (2X) +Ma_LF_C12 Ma_LF_C13 denfmd013 gtofmd012 gl1fmd013 C12 C13 LF 113 114 C13 Bangs 2 objects together +Ma_LF_C14 Ma_LF_C14 by1mdd104 gtofmd014 gl1fmd014 C14 C14 LF 115 115 C14 Pats toy to make noise (2X +Ma_LF_C17 Ma_LF_C15 dmcfmd009 gtofmd017 gl1fmd015 C17 C15 LF 118 116 C15 Makes marks with crayon (2X) +Ma_LF_C15 Ma_LF_C16 by1mdd100 gtofmd015 gl1fmd016 C15 C16 LF 116 117 C16 Puts 3 or more blocks in cup +Ma_LF_C23 Ma_LF_C17 mdtfmd016 gtofmd023 gl1fmd017 C23 C17 LF 124 118 C17 Puts blocks in jar +Ma_LF_C21 Ma_LF_C18 by1mdd108 gtofmd021 gl1fmd018 C21 C18 LF 122 119 C18 Puts 1 peg in again (2X) +Ma_LF_C20 Ma_LF_C19 denfmd015 gtofmd020 gl1fmd019 C20 C19 LF 121 120 C19 Scribbles in any way (2X) +Ma_LF_C22 Ma_LF_C20 gricgd023 gtofmd022 gl1fmd020 C22 C20 LF 123 121 C20 Accepts third block without dropping (2X) +Ma_LF_C27 Ma_LF_C21 by3cgd048 gtofmd027 gl1fmd021 C27 C21 LF 128 122 C21 Uses objects in play by him-/herself (2X) +Ma_LF_C18 Ma_LF_C22 dmcsld019 gtofmd018 gl1fmd022 C18 C22 LF 119 123 C22 Manages a cup well +Ma_LF_C19 Ma_LF_C23 by1mdd098 gtofmd019 gl1fmd023 C19 C23 LF 120 124 C23 Holds crayon with fingers, not fist (2X) +Ma_LF_C16 Ma_LF_C24 by1mdd097 gtofmd016 gl1fmd024 C16 C24 LF 117 125 C24 Repeats something when encouraged (2X) +Ma_LF_C25 Ma_LF_C25 mdtfmd017 gtofmd025 gl1fmd025 C25 C25 LF 126 126 C25 Dumps blocks out of jar purposefully (2X) +Ma_LF_C24 Ma_LF_C26 ddifmd013 gtofmd024 gl1fmd026 C24 C26 LF 125 127 C26 Builds tower of 2 blocks (2X) +Ma_LF_C32 Ma_LF_C27 mdtfmd021 gtofmd032 gl1fmd027 C32 C27 LF 133 128 C27 Puts pegs in board < 2 minutes (2X) +Ma_LF_C28 Ma_LF_C28 by1mdd119 gtofmd028 gl1fmd028 C28 C28 LF 129 129 C28 Builds tower of 3 blocks (2X) +Ma_LF_C26 Ma_LF_C29 by1mdd131 gtofmd026 gl1fmd029 C26 C29 LF 127 130 C29 Finds object under 2 alternating cups (3X) +Ma_LF_C33 Ma_LF_C30 gricgd213 gtofmd033 gl1fmd030 C33 C30 LF 134 131 C30 Inserts 2 shapes in board (2X) +Ma_LF_C35 Ma_LF_C31 by3cgd056 gtofmd035 gl1fmd031 C35 C31 LF 136 132 C31 Inserts 3 shapes in board in 2 minutes (2X) +Ma_LF_C31 Ma_LF_C32 by3cgd053 gtofmd031 gl1fmd032 C31 C32 LF 132 133 C32 Uses objects in play with someone (2X) +Ma_LF_C30 Ma_LF_C33 mdtfmd019 gtofmd030 gl1fmd033 C30 C33 LF 131 134 C33 Scribbles on paper (circular scribble) +Ma_LF_C37 Ma_LF_C34 mdtfmd023 gtofmd037 gl1fmd034 C37 C34 LF 138 135 C34 Builds tower of 6 blocks (2X) +Ma_LF_C29 Ma_LF_C35 mdtfmd022 gtofmd029 gl1fmd035 C29 C35 LF 130 136 "C35 Understands the concept of ""1"" (2X)" +Ma_LF_C36 Ma_LF_C36 by3cgd060 gtofmd036 gl1fmd036 C36 C36 LF 137 137 C36 Inserts 3 shapes in rotated board in 2 minutes (2X) +Ma_LF_C43 Ma_LF_C37 by3fmd044 gtofmd043 gl1fmd037 C43 C37 LF 144 138 C37 Builds truck/lorry of blocks (2X) +Ma_LF_C40 Ma_LF_C38 mdtfmd025 gtofmd040 gl1fmd038 C40 C38 LF 141 139 C38 Unscrews and screws lid of jar (2X) +Ma_LF_C41 Ma_LF_C39 by3cgd065 gtofmd041 gl1fmd039 C41 C39 LF 142 140 C39 Engages in representational play +Ma_LF_C39 Ma_LF_C40 sbivsd003 gtofmd039 gl1fmd040 C39 C40 LF 140 141 C40 Inserts 3 shapes in 15 seconds (2X) +Ma_LF_C42 Ma_LF_C41 by3cgd067 gtofmd042 gl1fmd041 C42 C41 LF 143 142 C41 Copies 2-part activity (3X) +Ma_LF_C38 Ma_LF_C42 mdtfmd024 gtofmd038 gl1fmd042 C38 C42 LF 139 143 C42 Puts pegs in board in < 30 seconds (2X) +Ma_LF_C45 Ma_LF_C43 griehd301 gtofmd045 gl1fmd043 C45 C43 LF 146 144 C43 Draws horizontal line (2X) +Ma_LF_C34 Ma_LF_C44 by3cgd089 gtofmd034 gl1fmd044 C34 C44 LF 135 145 "C44 Understands ""more"" (3X-5X)" +Ma_LF_C44 Ma_LF_C45 ddifmd023 gtofmd044 gl1fmd045 C44 C45 LF 145 146 C45 Imitates building bridge (2X) +Ma_LF_C46 Ma_LF_C46 mdtfmd028 gtofmd046 gl1fmd046 C46 C46 LF 147 147 C46 Picks longest stick 3 of 3 (3X-5X) +Ma_LF_C49 Ma_LF_C47 ddifmd026 gtofmd049 gl1fmd047 C49 C47 LF 150 148 C47 Copies a circle +Ma_LF_C48 Ma_LF_C48 by3fmd050 gtofmd048 gl1fmd048 C48 C48 LF 149 149 C48 Builds wall of blocks (2X) +Ma_LF_C51 Ma_LF_C49 by3cgd073 gtofmd051 gl1fmd049 C51 C49 LF 152 150 C49 Understands concept of size (2X) +Ma_LF_C47 Ma_LF_C50 mdtlgd031 gtofmd047 gl1fmd050 C47 C50 LF 148 151 C50 Understands prepositions (2X) +Ma_LF_C50 Ma_LF_C51 mdtfmd033 gtofmd050 gl1fmd051 C50 C51 LF 151 152 C51 Copies a cross or plus sign (2X) +Ma_LF_C54 Ma_LF_C52 mdtlgd033 gtofmd054 gl1fmd052 C54 C52 LF 155 153 C52 Counts 3 or more objects +Ma_LF_C53 Ma_LF_C53 mdtfmd034 gtofmd053 gl1fmd053 C53 C53 LF 154 154 C53 Copies a square (2X) +Ma_LF_C52 Ma_LF_C54 denfmd024 gtofmd052 gl1fmd054 C52 C54 LF 153 155 C54 Draws 3 or more body parts +Ma_SF_C04 Ma_SF_C01 mdtsed001 gpasec004 gs1sec001 SF004 SF001 SF 4 1 SF001 Does your child smile? +Ma_SF_C06 Ma_SF_C02 cromoc008 gpamoc006 gs1moc002 SF006 SF002 SF 6 2 SF002 When lying on his/her back, does your child move his/her arms and legs? +Ma_SF_C15 Ma_SF_C03 crosec002 gpasec015 gs1sec003 SF015 SF003 SF 15 3 SF003 Does your child look at your face when you speak to him/her? +Ma_SF_C01 Ma_SF_C04 gsdlac001 gpalac001 gs1lgc004 SF001 SF004 SF 1 4 SF004 Does your child cry when he/she is hungry, wet, tired, or wants to be held? +Ma_SF_C03 Ma_SF_C05 gsdfmc003 gpafmc003 gs1moc005 SF003 SF005 SF 3 5 SF005 Does your child grasp your finger if you touch her hand? +Ma_SF_C02 Ma_SF_C06 gsdcgc002 gpacgc002 gs1cgc006 SF002 SF006 SF 2 6 SF006 Does your child look at and focus on objects in front of him/her? +Ma_SF_C11 Ma_SF_C07 cromoc007 gpamoc011 gs1moc007 SF011 SF007 SF 11 7 SF007 Does your child bring his/her hand to his/her mouth? +Ma_SF_C05 Ma_SF_C08 iyomoc001 gpamoc005 gs1moc008 SF005 SF008 SF 5 8 SF008 Does your child try to move his/her head (or eyes) to follow an object or person? +Ma_SF_C10 Ma_SF_C09 iyosec004 gpasec010 gs1sec009 SF010 SF009 SF 10 9 SF009 Does your child smile when you smile or talk with him/her? +Ma_SF_C07 Ma_SF_C10 croclc001 gpaclc007 gs1lgc010 SF007 SF010 SF 7 10 SF010 Does your child look at a person when that person starts talking or making noise? +Ma_SF_C16 Ma_SF_C11 iyosec001 gpasec016 gs1sec011 SF016 SF011 SF 16 11 SF011 Does your child stop crying or calm down when you come to the room after being out of sight, or when you pick him or her up? +Ma_SF_C12 Ma_SF_C12 iyolgc002 gpalgc012 gs1lgc012 SF012 SF012 SF 12 12 SF012 When you talk to your child, does he/she smile, make noises, or move arms, legs or trunk in response? +Ma_SF_C14 Ma_SF_C13 iyosec002 gpasec014 gs1sec013 SF014 SF013 SF 14 13 SF013 When you are about to pick up your child, does he/she act happy or excited? +Ma_SF_C21 Ma_SF_C14 iyolgc001 gpalgc021 gs1lgc014 SF021 SF014 SF 21 14 SF014 Does your child turn his/her head towards your voice or some noise? +Ma_SF_C26 Ma_SF_C15 cromoc006 gpamoc026 gs1moc015 SF026 SF015 SF 26 15 SF015 Does your child grasp onto a small object (e.g., your finger, a spoon) when put in his/her hand? +Ma_SF_C09 Ma_SF_C16 gsdlac004 gpalac009 gs1lgc016 SF009 SF016 SF 9 16 SF016 Does your child make sounds other than crying? +Ma_SF_C20 Ma_SF_C17 crosec004 gpasec020 gs1sec017 SF020 SF017 SF 20 17 SF017 Does your child sometimes suck his/her thumb or fingers? +Ma_SF_C17 Ma_SF_C18 iyomoc002 gpamoc017 gs1moc018 SF017 SF018 SF 17 18 SF018 While your child is on his/her back, can he/she bring his/her hands together such that hands touch each other ? +Ma_SF_C25 Ma_SF_C19 iyosec005 gpasec025 gs1sec019 SF025 SF019 SF 25 19 SF019 Does your child move excitedly, kick legs, move arms or trunk, or make coo noises when a known person enters the room or speaks to them? +Ma_SF_C19 Ma_SF_C20 iyolgc005 gpalgc019 gs1lgc020 SF019 SF020 SF 19 20 SF020 Does your child make noise or gesture to get your attention? +Ma_SF_C31 Ma_SF_C21 iyosec003 gpasec031 gs1sec021 SF031 SF021 SF 31 21 SF021 If you play a game with your child, does he/she respond with interest? For example, if you play peek-a-boo, pat-a-cake, wave bye-bye, etc. does your child smile, widen their eyes, kick or move arms or vocalize? +Ma_SF_C33 Ma_SF_C22 croclc014 gpaclc033 gs1sec022 SF033 SF022 SF 33 22 SF022 Does your child recognize you or other family members (e.g., smile when they enter a room or move toward them)? +Ma_SF_C23 Ma_SF_C23 croclc006 gpaclc023 gs1lgc023 SF023 SF023 SF 23 23 SF023 Does your child laugh? +Ma_SF_C32 Ma_SF_C24 crosec003 gpasec032 gs1sec024 SF032 SF024 SF 32 24 SF024 Does your child smile or become excited when seeing someone familiar? +Ma_SF_C13 Ma_SF_C25 gsdgmc005 gpagmc013 gs1moc025 SF013 SF025 SF 13 25 SF025 When your child is on his/her stomach, can he/she turn his/her head to the side? +Ma_SF_C22 Ma_SF_C26 iyolgc003 gpalgc022 gs1lgc026 SF022 SF026 SF 22 26 SF026 Does your child make sounds other than crying when LOOKING at toys or people? +Ma_SF_C45 Ma_SF_C27 iyosec006 gpasec045 gs1sec027 SF045 SF027 SF 45 27 SF027 Is your child interested when he/she sees other children playing? Does she or he watch, smile, or look excited? +Ma_SF_C08 Ma_SF_C28 cromoc001 gpamoc008 gs1moc028 SF008 SF028 SF 8 28 SF028 Does your child hold his/her hands in fists all the time? +Ma_SF_C24 Ma_SF_C29 iyomoc004 gpamoc024 gs1moc029 SF024 SF029 SF 24 29 SF029 Can your child hold his/her head steady for at least a few seconds, without it flopping to the side? +Ma_SF_C37 Ma_SF_C30 cromoc002 gpamoc037 gs1moc030 SF037 SF030 SF 37 30 SF030 When held in a sitting position, can the child hold his/her head steady and straight? +Ma_SF_C18 Ma_SF_C31 gsdgmc006 gpagmc018 gs1moc031 SF018 SF031 SF 18 31 SF031 When your child is on his/her stomach, can he/she hold his/her head up off the ground? +Ma_SF_C34 Ma_SF_C32 croclc004 gpaclc034 gs1cgc032 SF034 SF032 SF 34 32 SF032 Does your child show interest in new objects that are put in front of him/her by reaching out for them? +Ma_SF_C29 Ma_SF_C33 iyomoc005 gpamoc029 gs1moc033 SF029 SF033 SF 29 33 SF033 When he/she is on his/her tummy, can your child hold his/her head straight up, looking around for more than a few seconds? He/she can rest on his/her arms while doing this. +Ma_SF_C30 Ma_SF_C34 gsdgmc007 gpagmc030 gs1moc034 SF030 SF034 SF 30 34 SF034 Can your child roll from his/her back to stomach or stomach to his/her side? +Ma_SF_C35 Ma_SF_C35 iyomoc007 gpamoc035 gs1moc035 SF035 SF035 SF 35 35 SF035 Can your child reach for AND HOLD an object, at least for a few seconds? +Ma_SF_C39 Ma_SF_C36 mdtsed006 gpasec039 gs1lic036 SF039 SF036 SF 39 36 SF036 Can your child eat food from your fingers or off a spoon you hold? +Ma_SF_C27 Ma_SF_C37 iyolgc004 gpalgc027 gs1lgc037 SF027 SF037 SF 27 37 "SF037 Does your child make single sounds like ""buh"" or ""duh"" or ""muh""?" +Ma_SF_C44 Ma_SF_C38 iyomoc008 gpamoc044 gs1moc038 SF044 SF038 SF 44 38 SF038 Can your child sit with support, either leaning against something (furniture or person), or by leaning forward on his or her hands? +Ma_SF_C28 Ma_SF_C39 iyomoc006 gpamoc028 gs1moc039 SF028 SF039 SF 28 39 SF039 Does your child try to reach for objects that are in front of him/her by extending one or both arms? +Ma_SF_C40 Ma_SF_C40 cromoc012 gpamoc040 gs1moc040 SF040 SF040 SF 40 40 SF040 Can your child pick up a small object (e.g., a small toy or small stone) using just one hand? +Ma_SF_C42 Ma_SF_C41 cromoc005 gpamoc042 gs1moc041 SF042 SF041 SF 42 41 SF041 When lying on his/her stomach, can your child hold his/her head and chest off the ground using only his/her hands and arms for support? +Ma_SF_C41 Ma_SF_C42 iyomoc009 gpamoc041 gs1cgc042 SF041 SF042 SF 41 42 SF042 If an object falls to the ground out of view, does your child look for it? +Ma_SF_C43 Ma_SF_C43 cromoc009 gpamoc043 gs1moc043 SF043 SF043 SF 43 43 SF043 When lying on his/her back, does the child grab his/her feet? +Ma_SF_C38 Ma_SF_C44 cromoc010 gpamoc038 gs1moc044 SF038 SF044 SF 38 44 SF044 Can your child roll from his/her back to stomach, or stomach to back, on his/her own? +Ma_SF_C47 Ma_SF_C45 croclc007 gpaclc047 gs1moc045 SF047 SF045 SF 47 45 SF045 Does your child play by tapping an object on the ground or a table? +Ma_SF_C46 Ma_SF_C46 croclc008 gpaclc046 gs1cgc046 SF046 SF046 SF 46 46 SF046 Does the child look for an object of interest when it is removed from sight or hidden from him/her (e.g., put under a cover, behind another object)? +Ma_SF_C49 Ma_SF_C47 cromoc011 gpamoc049 gs1moc047 SF049 SF047 SF 49 47 SF047 Can your child hold him/herself in a sitting position without help or support for longer than a few seconds? +Ma_SF_C48 Ma_SF_C48 croclc011 gpaclc048 gs1moc048 SF048 SF048 SF 48 48 SF048 Does your child intentionally move or change his/her position to get objects that are out of reach? +Ma_SF_C51 Ma_SF_C49 iyolgc006 gpalgc051 gs1lgc049 SF051 SF049 SF 51 49 SF049 Does your child make two similar sounds together like baba, mumu, pepe, didi (single consonant vowel combinations)? +Ma_SF_C36 Ma_SF_C50 aqigmc012 gpagmc036 gs1moc050 SF036 SF050 SF 36 50 SF050 When you put your child on the floor, can she lean on her hands while sitting? +Ma_SF_C52 Ma_SF_C51 iyomoc012 gpamoc052 gs1moc051 SF052 SF051 SF 52 51 SF051 Can your child pass a small object from one hand to the other? +Ma_SF_C50 Ma_SF_C52 iyomoc011 gpamoc050 gs1moc052 SF050 SF052 SF 50 52 SF052 Can your child bang objects together, or bang an object on the table or on the ground? +Ma_SF_C64 Ma_SF_C53 mdtsed012 gpasec064 gs1lic053 SF064 SF053 SF 64 53 SF053 Can your child pick up small bits of food and feed him/her-self using his/her hand? +Ma_SF_C58 Ma_SF_C54 cromoc022 gpamoc058 gs1moc054 SF058 SF054 SF 58 54 SF054 Can your child pick up and drop a small object (e.g., a small toy or small stone) into a bucket or bowl while sitting? +Ma_SF_C54 Ma_SF_C55 cromoc015 gpamoc054 gs1moc055 SF054 SF055 SF 54 55 SF055 Can your child maintain a standing position while holding on to a person or object (e.g., wall or furniture)? +Ma_SF_C53 Ma_SF_C56 cromoc019 gpamoc053 gs1moc056 SF053 SF056 SF 53 56 SF056 Can your child pick up a small object (e.g., a piece of food, small toy or small stone) with just his/her thumb and one finger? +Ma_SF_C56 Ma_SF_C57 iyomoc016 gpamoc056 gs1moc057 SF056 SF057 SF 56 57 SF057 Can your child pull themselves up from the floor while holding onto something? For example, can they pull themselves up using a chair, a person, or some other object? +Ma_SF_C59 Ma_SF_C58 crosec014 gpalgc059 gs1lgc058 SF059 SF058 SF 59 58 "SF058 Does your child stop what he/she is doing when you say ""Stop!"" even if just for a second?" +Ma_SF_C60 Ma_SF_C59 cromoc018 gpamoc060 gs1moc059 SF060 SF059 SF 60 59 SF059 Can your child walk several steps while holding on to a person or object (e.g., wall or furniture)? +Ma_SF_C55 Ma_SF_C60 aqigmc021 gpagmc055 gs1moc060 SF055 SF060 SF 55 60 SF060 While holding onto furniture, can your child bend down and pick up a small object from the floor and then return to a standing position? +Ma_SF_C57 Ma_SF_C61 aqigmc020 gpagmc057 gs1moc061 SF057 SF061 SF 57 61 SF061 While holding onto furniture, does your child squat with control (without falling or flopping down)? +Ma_SF_C68 Ma_SF_C62 mdtlgd009 gpalgc068 gs1lgc062 SF068 SF062 SF 68 62 "SF062 Does your child make a gesture to indicate ""No"" (e.g., shaking head)?" +Ma_SF_C82 Ma_SF_C63 mdtsed016 gpasec082 gs1sec063 SF082 SF063 SF 82 63 SF063 Even if your child is unable to do singing games, does he/she enjoy them and want to be a part of them? +Ma_SF_C61 Ma_SF_C64 iyomoc020 gpamoc061 gs1moc064 SF061 SF064 SF 61 64 SF064 Can your child stand up without holding onto anything, even if just for a few seconds? +Ma_SF_C75 Ma_SF_C65 mdtsed013 gpasec075 gs1lic065 SF075 SF065 SF 75 65 SF065 Does your child put his/her hands out to have them washed? +Ma_SF_C62 Ma_SF_C66 cromoc017 gpamoc062 gs1moc066 SF062 SF066 SF 62 66 SF066 Can your child maintain a standing position on his/her own, without holding on or receiving support? +Ma_SF_C74 Ma_SF_C67 vinxxc007 gpaxxc074 gs1lic067 SF074 SF067 SF 74 67 SF067 Can your child drink from an open cup without help? +Ma_SF_C65 Ma_SF_C68 iyomoc022 gpamoc065 gs1moc068 SF065 SF068 SF 65 68 SF068 Can your child climb onto an object (rock, porch, step, chair, bed, low table, etc.)? +Ma_SF_C63 Ma_SF_C69 iyomoc021 gpamoc063 gs1moc069 SF063 SF069 SF 63 69 SF069 Can your child make any light marks on paper or in dirt with a crayon or a stick? +Ma_SF_C70 Ma_SF_C70 iyomoc023 gpamoc070 gs1moc070 SF070 SF070 SF 70 70 SF070 Can your child bend down or squat to pick up an object from the floor and then stand up again, without help from a person or object? +Ma_SF_C72 Ma_SF_C71 iyolgc013 gpalgc072 gs1lgc071 SF072 SF071 SF 72 71 SF071 Can your child follow a simple spoken command or direction without you making a gesture? +Ma_SF_C73 Ma_SF_C72 vinxxc006 gpaxxc073 gs1lgc072 SF073 SF072 SF 73 72 SF072 Can your child fetch something when asked? +Ma_SF_C86 Ma_SF_C73 mdtsed018 gpasec086 gs1sec073 SF086 SF073 SF 86 73 SF073 Does your child share with others (e.g., food)? +Ma_SF_C66 Ma_SF_C74 iyomoc024 gpamoc066 gs1moc074 SF066 SF074 SF 66 74 SF074 Can your child take several steps (3-5) forward without holding onto any person or object, even if they fall down immediately afterward? +Ma_SF_C76 Ma_SF_C75 iyomoc028 gpamoc076 gs1moc075 SF076 SF075 SF 76 75 SF075 While standing, can your child purposefully throw the ball and not just drop it? +Ma_SF_C69 Ma_SF_C76 aqigmc026 gpagmc069 gs1moc076 SF069 SF076 SF 69 76 SF076 Can your child stand up from sitting by himself and take several steps forward? +Ma_SF_C94 Ma_SF_C77 mdtsed021 gpasec094 gs1lic077 SF094 SF077 SF 94 77 SF077 Can your child break off a piece of food and feed it to him/her-self? +Ma_SF_C71 Ma_SF_C78 iyomoc025 gpamoc071 gs1moc078 SF071 SF078 SF 71 78 SF078 Can your child make a scribble on paper, or in dirt, in a back and forth manner? For example, can he or she move the pen or pencil or stick back and forth? +Ma_SF_C67 Ma_SF_C79 aqigmc027 gpagmc067 gs1moc079 SF067 SF079 SF 67 79 SF079 Can your child move around by walking, rather than by crawling on his hands and knees? +Ma_SF_C77 Ma_SF_C80 iyomoc027 gpamoc077 gs1moc080 SF077 SF080 SF 77 80 SF080 Can your child walk well, with coordination, without falling down often? With one foot in front of the other (rather than shifting weight side to side, stiff- legged)? +Ma_SF_C78 Ma_SF_C81 iyomoc030 gpamoc078 gs1moc081 SF078 SF081 SF 78 81 SF081 Can your child stack at least two objects on top of each other, such as bottle tops, blocks, stones, etc.? +Ma_SF_C85 Ma_SF_C82 mdtsed017 gpasec085 gs1sec082 SF085 SF082 SF 85 82 "SF082 Can your child greet people either by giving his/her hand or saying ""hello""? (use local examples of greeting)" +Ma_SF_C79 Ma_SF_C83 cromoc025 gpamoc079 gs1moc083 SF079 SF083 SF 79 83 SF083 Can your child kick a ball or other round object forward using his/her foot? +Ma_SF_C89 Ma_SF_C84 croclc023 gpaclc089 gs1lgc084 SF089 SF084 SF 89 84 "SF084 Can your child say five or more separate words (e.g., names like ""Mama"" or objects like ""ball"")?" +Ma_SF_C81 Ma_SF_C85 iyolgc017 gpalgc081 gs1cgc085 SF081 SF085 SF 81 85 SF085 Can your child follow directions with more than one step? For example, 'Go to the kitchen and bring me a spoon'? +Ma_SF_C96 Ma_SF_C86 croclc028 gpaclc096 gs1lgc086 SF096 SF086 SF 96 86 SF086 Can your child correctly name at least one family member other than mom and dad (e.g., name of brother, sister, aunt, uncle)? +Ma_SF_C99 Ma_SF_C87 iyolgc022 gpalgc099 gs1lgc087 SF099 SF087 SF 99 87 SF087 Can your child identify at least seven objects? For example, when you ask 'where is the ball/spoon/cup/cloth/door/plate/bucket etc.' does your child look at or point to (or even name) the objects? +Ma_SF_C93 Ma_SF_C88 croclc025 gpaclc093 gs1lgc088 SF093 SF088 SF 93 88 SF088 Can your child ask for something (e.g., food, water) by name when he/she wants it? +Ma_SF_C84 Ma_SF_C89 iyomoc032 gpamoc084 gs1moc089 SF084 SF089 SF 84 89 SF089 Can your child run well, without falling or bumping into objects? +Ma_SF_C92 Ma_SF_C90 vinxxc048 gpaxxc092 gs1lic090 SF092 SF090 SF 92 90 SF090 Can your child wash hands by him/herself? +Ma_SF_C80 Ma_SF_C91 iyomoc031 gpamoc080 gs1moc091 SF080 SF091 SF 80 91 SF091 While standing, can your child kick a ball by swinging his/her leg forward? +Ma_SF_C87 Ma_SF_C92 vinxxc021 gpaxxc087 gs1lic092 SF087 SF092 SF 87 92 SF092 Does your child dry hands by herself/himself after you have washed them? +Ma_SF_C95 Ma_SF_C93 mdtsed023 gpasec095 gs1sec093 SF095 SF093 SF 95 93 SF093 Does your child show independence (e.g., wants to go and visit a friend's house)? +Ma_SF_C101 Ma_SF_C94 croclc034 gpaclc101 gs1lgc094 SF101 SF094 SF 101 94 SF094 If you show your child an object he/she knows well (e.g., a cup or animal), can he/she consistently name it? +Ma_SF_C83 Ma_SF_C95 cromoc029 gpamoc083 gs1moc095 SF083 SF095 SF 83 95 SF095 Can your child stack three or more small objects (e.g., blocks, cups, bottle caps) on top of each other? +Ma_SF_C97 Ma_SF_C96 cromoc031 gpamoc097 gs1moc096 SF097 SF096 SF 97 96 SF096 Can your child walk on an uneven surface (e.g., a bumpy or steep road) without falling? +Ma_SF_C102 Ma_SF_C97 iyolgc023 gpalgc102 gs1lgc097 SF102 SF097 SF 102 97 SF097 Does your child usually communicate with words what he/she wants in a way that is understandable to others? +Ma_SF_C90 Ma_SF_C98 aqicmc033 gpacmc090 gs1lgc098 SF090 SF098 SF 90 98 "SF098 Can your child say ten or more words in addition to ""Mama"" and ""Dada""?" +Ma_SF_C98 Ma_SF_C99 iyolgc021 gpalgc098 gs1lgc099 SF098 SF099 SF 98 99 "SF099 When looking at pictures, if you say to your child ""what is this?"", can they say the name of the object that you point to?" +Ma_SF_C91 Ma_SF_C100 croclc024 gpaclc091 gs1lgc100 SF091 SF100 SF 91 100 SF100 Can your child speak using short sentences of two words that go together (e.g., 'Mama go' or 'Dada eat'? +Ma_SF_C110 Ma_SF_C101 cromoc033 gpamoc110 gs1moc101 SF110 SF101 SF 110 101 SF101 Can your child unscrew the lid from a bottle or jar? +Ma_SF_C130 Ma_SF_C102 mdtsed029 gpasec130 gs1sec102 SF130 SF102 SF 130 102 SF102 Does your child help out around the house with simple chores, even if he/she doesn't do them well? (use local examples of chores) +Ma_SF_C88 Ma_SF_C103 mdtsed019 gpasec088 gs1lic103 SF088 SF103 SF 88 103 SF103 Is your child able to go poo or pee without having accidents (wetting or soiling themselves)? +Ma_SF_C112 Ma_SF_C104 croclc029 gpaclc112 gs1lgc104 SF112 SF104 SF 112 104 "SF104 Can your child speak using sentences of three or more words that go together (e.g., ""I want water"" or ""The house is big"")?" +Ma_SF_C100 Ma_SF_C105 croclc038 gpaclc100 gs1lgc105 SF100 SF105 SF 100 105 SF105 Can your child name at least two body parts (e.g., arm, eye, or nose)? +Ma_SF_C104 Ma_SF_C106 cromoc035 gpamoc104 gs1lic106 SF104 SF106 SF 104 106 SF106 Can your child remove an item of clothing (e.g., take off his/her shirt)? +Ma_SF_C105 Ma_SF_C107 croclc027 gpaclc105 gs1lgc107 SF105 SF107 SF 105 107 "SF107 Can your child say 15 or more separate words (e.g., names like ""Mama"" or objects like ""ball"")?" +Ma_SF_C106 Ma_SF_C108 cromoc034 gpamoc106 gs1moc108 SF106 SF108 SF 106 108 SF108 Can your child jump with both feet leaving the ground? +Ma_SF_C108 Ma_SF_C109 croclc032 gpaclc108 gs1lgc109 SF108 SF109 SF 108 109 SF109 Can your child tell you or someone familiar his/her own name [nickname] when asked to? +Ma_SF_C115 Ma_SF_C110 croclc042 gpaclc115 gs1lgc110 SF115 SF110 SF 115 110 "SF110 Can your child correctly ask questions using any of the words ""what"", ""which"", ""where"", or ""who""?" +Ma_SF_C137 Ma_SF_C111 mdtsed032 gpasec137 gs1sec111 SF137 SF111 SF 137 111 SF111 Does your child show respect around elders? +Ma_SF_C113 Ma_SF_C112 croclc031 gpaclc113 gs1lgc112 SF113 SF112 SF 113 112 "SF112 Can your child correctly use any of the words ""I,"" ""you,"" ""she,"" or ""he"" (e.g., ""I go to store,"" or ""He eats rice"")?" +Ma_SF_C107 Ma_SF_C113 croclc037 gpaclc107 gs1lgc113 SF107 SF113 SF 107 113 SF113 Can your child sing a short song or repeat parts of a rhyme from memory by him/herself? +Ma_SF_C111 Ma_SF_C114 iyolgc026 gpalgc111 gs1cgc114 SF111 SF114 SF 111 114 "SF114 Does your child know the difference between the words ""big"" and ""small""? For example, if you ask, ""Give me the big spoon"" can your child understand which one to give if there are two different sizes?" +Ma_SF_C116 Ma_SF_C115 croclc046 gpaclc116 gs1lgc115 SF116 SF115 SF 116 115 SF115 Does your child pronounce most of his/her words correctly? +Ma_SF_C134 Ma_SF_C116 mdtsed033 gpasec134 gs1lic116 SF134 SF116 SF 134 116 SF116 Can your child go to the toilet by him/her-self? +Ma_SF_C120 Ma_SF_C117 croclc049 gpaclc120 gs1lgc117 SF120 SF117 SF 120 117 "SF117 If you point to an object, can your child correctly use the words ""on,"" ""in,"" or ""under"" to describe where it is (e.g., ""The cup is on the table"" instead of ""The cup is in the table."")" +Ma_SF_C109 Ma_SF_C118 mdtsed026 gpasec109 gs1lic118 SF109 SF118 SF 109 118 SF118 Can your child put on at least one piece of clothing by himself? +Ma_SF_C119 Ma_SF_C119 croclc039 gpaclc119 gs1lgc119 SF119 SF119 SF 119 119 SF119 Can your child explain in words what common objects like a cup or chair are used for? +Ma_SF_C103 Ma_SF_C120 iyomoc037 gpamoc103 gs1moc120 SF103 SF120 SF 103 120 SF120 Can your child draw a straight line? +Ma_SF_C114 Ma_SF_C121 crosec042 gpasec114 gs1lgc121 SF114 SF121 SF 114 121 "SF121 Can your child say what he/she likes or dislikes (e.g., ""I like sweets"")?" +Ma_SF_C117 Ma_SF_C122 croclc035 gpaclc117 gs1cgc122 SF117 SF122 SF 117 122 SF122 If you show your child two objects or people of different size, can he/she tell you which one is the big one and which is the small one? +Ma_SF_C121 Ma_SF_C123 croclc050 gpaclc121 gs1lgc123 SF121 SF123 SF 121 123 "SF123 Does your child regularly use describing words such as ""fast,"" ""short,"" ""hot,"" ""fat,"" or ""beautiful"" correctly?" +Ma_SF_C123 Ma_SF_C124 mdtsed028 gpasec123 gs1sec124 SF123 SF124 SF 123 124 SF124 Does your child know to keep quiet when the situation requires it? (e.g., at ceremonies, when someone is asleep) +Ma_SF_C124 Ma_SF_C125 croclc051 gpaclc124 gs1lgc125 SF124 SF125 SF 124 125 "SF125 Does your child ask ""why"" questions (e.g., ""Why are you tall?"")?" +Ma_SF_C135 Ma_SF_C126 iyomoc039 gpamoc135 gs1moc126 SF135 SF126 SF 135 126 SF126 Can your child stand on one foot WITHOUT any support for at least a few seconds? +Ma_SF_C126 Ma_SF_C127 croclc043 gpaclc126 gs1cgc127 SF126 SF127 SF 126 127 SF127 If you ask your child to give you three objects (e.g., stones, beans), does the child give you the correct amount? +Ma_SF_C131 Ma_SF_C128 iyolgc029 gpalgc131 gs1cgc128 SF131 SF128 SF 131 128 SF128 Does your child understand the term 'longest'? For example, if you ask him/her to choose 'which is the longest of 3 objects?' (e.g. 3 spoons or sticks), would he/she be able to choose the longest? +Ma_SF_C138 Ma_SF_C129 croclc045 gpaclc138 gs1lgc129 SF138 SF129 SF 138 129 "SF129 Can your child talk about things that have happened in the past using correct language (e.g., ""Yesterday I played with my friend"" or ""Last week she went to the market"")?" +Ma_SF_C127 Ma_SF_C130 iyolgc030 gpalgc127 gs1lgc130 SF127 SF130 SF 127 130 SF130 Can your child tell a story? +Ma_SF_C125 Ma_SF_C131 crosec049 gpasec125 gs1sec131 SF125 SF131 SF 125 131 SF131 Can your child tell you when he/she is happy, angry, or sad? +Ma_SF_C122 Ma_SF_C132 croclc044 gpaclc122 gs1cgc132 SF122 SF132 SF 122 132 SF132 Can the child name at least one color (e.g., red, blue, yellow)? +Ma_SF_C118 Ma_SF_C133 croclc041 gpaclc118 gs1cgc133 SF118 SF133 SF 118 133 SF133 Can your child count objects up to five (e.g., fingers, people)? +Ma_SF_C133 Ma_SF_C134 iyomoc038 gpamoc133 gs1moc134 SF133 SF134 SF 133 134 SF134 If you draw a circle can your child do it, just as you did? +Ma_SF_C128 Ma_SF_C135 crosec059 gpasec128 gs1sec135 SF128 SF135 SF 128 135 SF135 Can your child tell you when others are happy, angry, or sad? +Ma_SF_C139 Ma_SF_C136 croclc048 gpaclc139 gs1lgc136 SF139 SF136 SF 139 136 "SF136 Can your child talk about things that will happen in the future using correct language (e.g., ""Tomorrow he will attend school"" or ""Next week we will go to the market"")?" +Ma_SF_C132 Ma_SF_C137 cromoc039 gpamoc132 gs1moc137 SF132 SF137 SF 132 137 SF137 Can the child fasten and unfasten buttons without help? +Ma_SF_C129 Ma_SF_C138 iyomoc040 gpamoc129 gs1lic138 SF129 SF138 SF 129 138 SF138 Can your child dress him/herself completely (except for shoelaces, buttons and zippers)? +Ma_SF_C136 Ma_SF_C139 crosec051 gpasec136 gs1sec139 SF136 SF139 SF 136 139 "SF139 Can your child say what others like or dislike (e.g., ""Mama doesn't like fruit,"" ""Papa likes football"")?" +bsid_cog01 bsid_cog01 by3cgd001 by3cgd001 by3cgd001 cog01 cog01 BSID NA NA Calms when picked up +bsid_cog02 bsid_cog02 by3cgd002 by3cgd002 by3cgd002 cog02 cog02 BSID NA NA Responds to surroundings: inspects +bsid_cog03 bsid_cog03 by3cgd003 by3cgd003 by3cgd003 cog03 cog03 BSID NA NA Regards 3 sec +bsid_cog04 bsid_cog04 by3cgd004 by3cgd004 by3cgd004 cog04 cog04 BSID NA NA Habituates rattle +bsid_cog05 bsid_cog05 by3cgd005 by3cgd005 by3cgd005 cog05 cog05 BSID NA NA Discriminates between obj +bsid_cog06 bsid_cog06 by3cgd006 by3cgd006 by3cgd006 cog06 cog06 BSID NA NA Recog caregiver +bsid_cog07 bsid_cog07 by3cgd007 by3cgd007 by3cgd007 cog07 cog07 BSID NA NA Becomes excited antic +bsid_cog08 bsid_cog08 by3cgd008 by3cgd008 by3cgd008 cog08 cog08 BSID NA NA Regards object 5 sec +bsid_cog09 bsid_cog09 by3cgd009 by3cgd009 by3cgd009 cog09 cog09 BSID NA NA Reacts disappear face +bsid_cog10 bsid_cog10 by3cgd010 by3cgd010 by3cgd010 cog10 cog10 BSID NA NA Shifts attention +bsid_cog11 bsid_cog11 by3cgd011 by3cgd011 by3cgd011 cog11 cog11 BSID NA NA Shows visual pref +bsid_cog12 bsid_cog12 by3cgd012 by3cgd012 by3cgd012 cog12 cog12 BSID NA NA Habituates to object +bsid_cog13 bsid_cog13 by3cgd013 by3cgd013 by3cgd013 cog13 cog13 BSID NA NA Prefers novel obj +bsid_cog14 bsid_cog14 by3cgd014 by3cgd014 by3cgd014 cog14 cog14 BSID NA NA Habituates pict - balloons +bsid_cog15 bsid_cog15 by3cgd015 by3cgd015 by3cgd015 cog15 cog15 BSID NA NA Prefers novel pict +bsid_cog16 bsid_cog16 by3cgd016 by3cgd016 by3cgd016 cog16 cog16 BSID NA NA Explores object +bsid_cog17 bsid_cog17 by3cgd017 by3cgd017 by3cgd017 cog17 cog17 BSID NA NA Carries object to mouth +bsid_cog18 bsid_cog18 by3cgd018 by3cgd018 by3cgd018 cog18 cog18 BSID NA NA Inspects own hand +bsid_cog19 bsid_cog19 by3cgd019 by3cgd019 by3cgd019 cog19 cog19 BSID NA NA Mirror Image Series: Approaches +bsid_cog20 bsid_cog20 by3cgd020 by3cgd020 by3cgd020 cog20 cog20 BSID NA NA "Responds to surroundings; awareness of novelty" +bsid_cog21 bsid_cog21 by3cgd021 by3cgd021 by3cgd021 cog21 cog21 BSID NA NA Persistent reach +bsid_cog22 bsid_cog22 by3cgd022 by3cgd022 by3cgd022 cog22 cog22 BSID NA NA Mirror Image Series: Responds positively +bsid_cog23 bsid_cog23 by3cgd023 by3cgd023 by3cgd023 cog23 cog23 BSID NA NA Plays with string +bsid_cog24 bsid_cog24 by3cgd024 by3cgd024 by3cgd024 cog24 cog24 BSID NA NA Bangs in play +bsid_cog25 bsid_cog25 by3cgd025 by3cgd025 by3cgd025 cog25 cog25 BSID NA NA Searches for fallen object +bsid_cog26 bsid_cog26 by3cgd026 by3cgd026 by3cgd026 cog26 cog26 BSID NA NA Bell Series: Manipulates +bsid_cog27 bsid_cog27 by3cgd027 by3cgd027 by3cgd027 cog27 cog27 BSID NA NA Picks Up Block Series: Reaches for second block +bsid_cog28 bsid_cog28 by3cgd028 by3cgd028 by3cgd028 cog28 cog28 BSID NA NA Pulls cloth to obtain object +bsid_cog29 bsid_cog29 by3cgd029 by3cgd029 by3cgd029 cog29 cog29 BSID NA NA Pulls string adaptively +bsid_cog30 bsid_cog30 by3cgd030 by3cgd030 by3cgd030 cog30 cog30 BSID NA NA Retains both blocks +bsid_cog31 bsid_cog31 by3cgd031 by3cgd031 by3cgd031 cog31 cog31 BSID NA NA Bell Series: Rings purposely +bsid_cog32 bsid_cog32 by3cgd032 by3cgd032 by3cgd032 cog32 cog32 BSID NA NA Looks at pictures +bsid_cog33 bsid_cog33 by3cgd033 by3cgd033 by3cgd033 cog33 cog33 BSID NA NA Picks Up Block Series: Retains 2 of 3 blocks +bsid_cog34 bsid_cog34 by3cgd034 by3cgd034 by3cgd034 cog34 cog34 BSID NA NA Searches for missing objects +bsid_cog35 bsid_cog35 by3cgd035 by3cgd035 by3cgd035 cog35 cog35 BSID NA NA Takes blocks out of cup +bsid_cog36 bsid_cog36 by3cgd036 by3cgd036 by3cgd036 cog36 cog36 BSID NA NA Block Series: 1 Block +bsid_cog37 bsid_cog37 by3cgd037 by3cgd037 by3cgd037 cog37 cog37 BSID NA NA Picks up Block Series: 3 blocks +bsid_cog38 bsid_cog38 by3cgd038 by3cgd038 by3cgd038 cog38 cog38 BSID NA NA Explores holes in pegboard +bsid_cog39 bsid_cog39 by3cgd039 by3cgd039 by3cgd039 cog39 cog39 BSID NA NA Pushes car +bsid_cog40 bsid_cog40 by3cgd040 by3cgd040 by3cgd040 cog40 cog40 BSID NA NA Finds hidden object +bsid_cog41 bsid_cog41 by3cgd041 by3cgd041 by3cgd041 cog41 cog41 BSID NA NA Suspends ring +bsid_cog42 bsid_cog42 by3cgd042 by3cgd042 by3cgd042 cog42 cog42 BSID NA NA Removes pellet +bsid_cog43 bsid_cog43 by3cgd043 by3cgd043 by3cgd043 cog43 cog43 BSID NA NA Clear Box: Front +bsid_cog44 bsid_cog44 by3cgd044 by3cgd044 by3cgd044 cog44 cog44 BSID NA NA Squeezes object +bsid_cog45 bsid_cog45 by3cgd045 by3cgd045 by3cgd045 cog45 cog45 BSID NA NA Finds hidden object (Reversed) +bsid_cog46 bsid_cog46 by3cgd046 by3cgd046 by3cgd046 cog46 cog46 BSID NA NA Removes lid from bottle +bsid_cog47 bsid_cog47 by3cgd047 by3cgd047 by3cgd047 cog47 cog47 BSID NA NA Pegboard Series: 2 holes +bsid_cog48 bsid_cog48 by3cgd048 by3cgd048 by3cgd048 cog48 cog48 BSID NA NA Relational Play Series: Self +bsid_cog49 bsid_cog49 by3cgd049 by3cgd049 by3cgd049 cog49 cog49 BSID NA NA Pink Board Series: 1 piece +bsid_cog50 bsid_cog50 by3cgd050 by3cgd050 by3cgd050 cog50 cog50 BSID NA NA Finds hidden object (Visible Displacement) +bsid_cog51 bsid_cog51 by3cgd051 by3cgd051 by3cgd051 cog51 cog51 BSID NA NA Blue Board Series: 1 piece +bsid_cog52 bsid_cog52 by3cgd052 by3cgd052 by3cgd052 cog52 cog52 BSID NA NA Clear Box: Sides +bsid_cog53 bsid_cog53 by3cgd053 by3cgd053 by3cgd053 cog53 cog53 BSID NA NA Relational Play Series: Others +bsid_cog54 bsid_cog54 by3cgd054 by3cgd054 by3cgd054 cog54 cog54 BSID NA NA Block Series: 9 Blocks +bsid_cog55 bsid_cog55 by3cgd055 by3cgd055 by3cgd055 cog55 cog55 BSID NA NA Pegboard Series: 6 Pegs +bsid_cog56 bsid_cog56 by3cgd056 by3cgd056 by3cgd056 cog56 cog56 BSID NA NA Pink Board Series: Completes +bsid_cog57 bsid_cog57 by3cgd057 by3cgd057 by3cgd057 cog57 cog57 BSID NA NA Uses pencil to obtain object +bsid_cog58 bsid_cog58 by3cgd058 by3cgd058 by3cgd058 cog58 cog58 BSID NA NA Blue Board Series: 4 Pieces +bsid_cog59 bsid_cog59 by3cgd059 by3cgd059 by3cgd059 cog59 cog59 BSID NA NA Attends to story +bsid_cog60 bsid_cog60 by3cgd060 by3cgd060 by3cgd060 cog60 cog60 BSID NA NA Rotated pink board +bsid_cog61 bsid_cog61 by3cgd061 by3cgd061 by3cgd061 cog61 cog61 BSID NA NA Object assembly (Ball) +bsid_cog62 bsid_cog62 by3cgd062 by3cgd062 by3cgd062 cog62 cog62 BSID NA NA Completes Pegboard: 25 Seconds +bsid_cog63 bsid_cog63 by3cgd063 by3cgd063 by3cgd063 cog63 cog63 BSID NA NA Object assembly (Ice Cream Cone) +bsid_cog64 bsid_cog64 by3cgd064 by3cgd064 by3cgd064 cog64 cog64 BSID NA NA Matches pictures +bsid_cog65 bsid_cog65 by3cgd065 by3cgd065 by3cgd065 cog65 cog65 BSID NA NA Representational play +bsid_cog66 bsid_cog66 by3cgd066 by3cgd066 by3cgd066 cog66 cog66 BSID NA NA Blue Board Series: Completes (75 seconds) +bsid_cog67 bsid_cog67 by3cgd067 by3cgd067 by3cgd067 cog67 cog67 BSID NA NA Imitates a two-step action. +bsid_cog68 bsid_cog68 by3cgd068 by3cgd068 by3cgd068 cog68 cog68 BSID NA NA Matches 3 colors +bsid_cog69 bsid_cog69 by3cgd069 by3cgd069 by3cgd069 cog69 cog69 BSID NA NA Imaginary play +bsid_cog70 bsid_cog70 by3cgd070 by3cgd070 by3cgd070 cog70 cog70 BSID NA NA Understands concept of one +bsid_cog71 bsid_cog71 by3cgd071 by3cgd071 by3cgd071 cog71 cog71 BSID NA NA Multischeme combination play +bsid_cog72 bsid_cog72 by3cgd072 by3cgd072 by3cgd072 cog72 cog72 BSID NA NA Concept Grouping: colour +bsid_cog73 bsid_cog73 by3cgd073 by3cgd073 by3cgd073 cog73 cog73 BSID NA NA Concept Grouping: Size +bsid_cog74 bsid_cog74 by3cgd074 by3cgd074 by3cgd074 cog74 cog74 BSID NA NA Compares masses +bsid_cog75 bsid_cog75 by3cgd075 by3cgd075 by3cgd075 cog75 cog75 BSID NA NA Matches size +bsid_cog76 bsid_cog76 by3cgd076 by3cgd076 by3cgd076 cog76 cog76 BSID NA NA Discriminates pictures +bsid_cog77 bsid_cog77 by3cgd077 by3cgd077 by3cgd077 cog77 cog77 BSID NA NA Simple pattern +bsid_cog78 bsid_cog78 by3cgd078 by3cgd078 by3cgd078 cog78 cog78 BSID NA NA Sorts pegs by colour +bsid_cog79 bsid_cog79 by3cgd079 by3cgd079 by3cgd079 cog79 cog79 BSID NA NA Counts (One-to-one correspondence) +bsid_cog80 bsid_cog80 by3cgd080 by3cgd080 by3cgd080 cog80 cog80 BSID NA NA Discriminates size +bsid_cog81 bsid_cog81 by3cgd081 by3cgd081 by3cgd081 cog81 cog81 BSID NA NA Identifies 3 incomplete pictures +bsid_cog82 bsid_cog82 by3cgd082 by3cgd082 by3cgd082 cog82 cog82 BSID NA NA Object assembly (Dog) +bsid_cog83 bsid_cog83 by3cgd083 by3cgd083 by3cgd083 cog83 cog83 BSID NA NA Discriminates patterns +bsid_cog84 bsid_cog84 by3cgd084 by3cgd084 by3cgd084 cog84 cog84 BSID NA NA Spatial memory +bsid_cog85 bsid_cog85 by3cgd085 by3cgd085 by3cgd085 cog85 cog85 BSID NA NA Counts (Cardinally) +bsid_cog86 bsid_cog86 by3cgd086 by3cgd086 by3cgd086 cog86 cog86 BSID NA NA Number constancy +bsid_cog87 bsid_cog87 by3cgd087 by3cgd087 by3cgd087 cog87 cog87 BSID NA NA Laces card +bsid_cog88 bsid_cog88 by3cgd088 by3cgd088 by3cgd088 cog88 cog88 BSID NA NA Classifies objects +bsid_cog89 bsid_cog89 by3cgd089 by3cgd089 by3cgd089 cog89 cog89 BSID NA NA Understands concept of more +bsid_cog90 bsid_cog90 by3cgd090 by3cgd090 by3cgd090 cog90 cog90 BSID NA NA Repeats number sequences +bsid_cog91 bsid_cog91 by3cgd091 by3cgd091 by3cgd091 cog91 cog91 BSID NA NA Completes patterns +bsid_rc01 bsid_rc01 by3red001 by3red001 by3red001 rc01 rc01 BSID NA NA Regards person momentarily +bsid_rc02 bsid_rc02 by3red002 by3red002 by3red002 rc02 rc02 BSID NA NA Tolerates attention +bsid_rc03 bsid_rc03 by3red003 by3red003 by3red003 rc03 rc03 BSID NA NA Calms when spoken to +bsid_rc04 bsid_rc04 by3red004 by3red004 by3red004 rc04 rc04 BSID NA NA Reacts to sound in environment +bsid_rc05 bsid_rc05 by3red005 by3red005 by3red005 rc05 rc05 BSID NA NA Responds to voice +bsid_rc06 bsid_rc06 by3red006 by3red006 by3red006 rc06 rc06 BSID NA NA Searches with head turn +bsid_rc07 bsid_rc07 by3red007 by3red007 by3red007 rc07 rc07 BSID NA NA Discriminates sounds +bsid_rc08 bsid_rc08 by3red008 by3red008 by3red008 rc08 rc08 BSID NA NA Sustained play with objects +bsid_rc09 bsid_rc09 by3red009 by3red009 by3red009 rc09 rc09 BSID NA NA Responds to name +bsid_rc10 bsid_rc10 by3red010 by3red010 by3red010 rc10 rc10 BSID NA NA Interrupts activity +bsid_rc11 bsid_rc11 by3red011 by3red011 by3red011 rc11 rc11 BSID NA NA Recognizes 2 familiar words +bsid_rc12 bsid_rc12 by3red012 by3red012 by3red012 rc12 rc12 BSID NA NA Responds to no-no +bsid_rc13 bsid_rc13 by3red013 by3red013 by3red013 rc13 rc13 BSID NA NA Attends to other's play routine +bsid_rc14 bsid_rc14 by3red014 by3red014 by3red014 rc14 rc14 BSID NA NA Responds to request for social routines +bsid_rc15 bsid_rc15 by3red015 by3red015 by3red015 rc15 rc15 BSID NA NA Identifies Object Series: 1 correct +bsid_rc16 bsid_rc16 by3red016 by3red016 by3red016 rc16 rc16 BSID NA NA Identifies object in the environment +bsid_rc17 bsid_rc17 by3red017 by3red017 by3red017 rc17 rc17 BSID NA NA Identifies Picture Series: 1 correct +bsid_rc18 bsid_rc18 by3red018 by3red018 by3red018 rc18 rc18 BSID NA NA Understands inhibitory words +bsid_rc19 bsid_rc19 by3red019 by3red019 by3red019 rc19 rc19 BSID NA NA Identifies Object Series: 3 correct +bsid_rc20 bsid_rc20 by3red020 by3red020 by3red020 rc20 rc20 BSID NA NA Follows one-part directions +bsid_rc21 bsid_rc21 by3red021 by3red021 by3red021 rc21 rc21 BSID NA NA Identifies Picture Series: 3 Correct +bsid_rc22 bsid_rc22 by3red022 by3red022 by3red022 rc22 rc22 BSID NA NA Identifies 3 clothing items +bsid_rc23 bsid_rc23 by3red023 by3red023 by3red023 rc23 rc23 BSID NA NA Identifies Action Picture Series: 1 correct +bsid_rc24 bsid_rc24 by3red024 by3red024 by3red024 rc24 rc24 BSID NA NA Identifies 5 parts of the body +bsid_rc25 bsid_rc25 by3red025 by3red025 by3red025 rc25 rc25 BSID NA NA Follows two-part directions +bsid_rc26 bsid_rc26 by3red026 by3red026 by3red026 rc26 rc26 BSID NA NA Identifies Action Picture Series: 3 correct +bsid_rc27 bsid_rc27 by3red027 by3red027 by3red027 rc27 rc27 BSID NA NA Understands use of objects +bsid_rc28 bsid_rc28 by3red028 by3red028 by3red028 rc28 rc28 BSID NA NA Understands part/whole relationships +bsid_rc29 bsid_rc29 by3red029 by3red029 by3red029 rc29 rc29 BSID NA NA Identifies Action Picture Series: 5 correct +bsid_rc30 bsid_rc30 by3red030 by3red030 by3red030 rc30 rc30 BSID NA NA Understands pronouns (him, me, my, you, your) +bsid_rc31 bsid_rc31 by3red031 by3red031 by3red031 rc31 rc31 BSID NA NA Understands labels for sizes +bsid_rc32 bsid_rc32 by3red032 by3red032 by3red032 rc32 rc32 BSID NA NA Understands Preposition Series: 2 correct +bsid_rc33 bsid_rc33 by3red033 by3red033 by3red033 rc33 rc33 BSID NA NA Understands possessives +bsid_rc34 bsid_rc34 by3red034 by3red034 by3red034 rc34 rc34 BSID NA NA Understands verb +ing +bsid_rc35 bsid_rc35 by3red035 by3red035 by3red035 rc35 rc35 BSID NA NA Identifies colours +bsid_rc36 bsid_rc36 by3red036 by3red036 by3red036 rc36 rc36 BSID NA NA Understands label of one +bsid_rc37 bsid_rc37 by3red037 by3red037 by3red037 rc37 rc37 BSID NA NA Understands pronouns (they, he, she) +bsid_rc38 bsid_rc38 by3red038 by3red038 by3red038 rc38 rc38 BSID NA NA Understands pronouns (his, her) +bsid_rc39 bsid_rc39 by3red039 by3red039 by3red039 rc39 rc39 BSID NA NA Understands plurals +bsid_rc40 bsid_rc40 by3red040 by3red040 by3red040 rc40 rc40 BSID NA NA Understands more +bsid_rc41 bsid_rc41 by3red041 by3red041 by3red041 rc41 rc41 BSID NA NA Understands most +bsid_rc42 bsid_rc42 by3red042 by3red042 by3red042 rc42 rc42 BSID NA NA Understands Preposition Series: 4 correct +bsid_rc43 bsid_rc43 by3red043 by3red043 by3red043 rc43 rc43 BSID NA NA Understands negatives in sentences +bsid_rc44 bsid_rc44 by3red044 by3red044 by3red044 rc44 rc44 BSID NA NA Understands past tense +bsid_rc45 bsid_rc45 by3red045 by3red045 by3red045 rc45 rc45 BSID NA NA Understands labels for mass +bsid_rc46 bsid_rc46 by3red046 by3red046 by3red046 rc46 rc46 BSID NA NA Understands least +bsid_rc47 bsid_rc47 by3red047 by3red047 by3red047 rc47 rc47 BSID NA NA Understands less +bsid_rc48 bsid_rc48 by3red048 by3red048 by3red048 rc48 rc48 BSID NA NA Understands descriptive labels +bsid_rc49 bsid_rc49 by3red049 by3red049 by3red049 rc49 rc49 BSID NA NA Identifies categories of objects +bsid_ec01 bsid_ec01 by3exd001 by3exd001 by3exd001 ec01 ec01 BSID NA NA Undifferentiated throaty sounds +bsid_ec02 bsid_ec02 by3exd002 by3exd002 by3exd002 ec02 ec02 BSID NA NA Social smile +bsid_ec03 bsid_ec03 by3exd003 by3exd003 by3exd003 ec03 ec03 BSID NA NA Vocalizes mood +bsid_ec04 bsid_ec04 by3exd004 by3exd004 by3exd004 ec04 ec04 BSID NA NA Undifferentiated nasal sounds +bsid_ec05 bsid_ec05 by3exd005 by3exd005 by3exd005 ec05 ec05 BSID NA NA Social vocalization or laughing +bsid_ec06 bsid_ec06 by3exd006 by3exd006 by3exd006 ec06 ec06 BSID NA NA 2 Vowel sounds +bsid_ec07 bsid_ec07 by3exd007 by3exd007 by3exd007 ec07 ec07 BSID NA NA Gets attention +bsid_ec08 bsid_ec08 by3exd008 by3exd008 by3exd008 ec08 ec08 BSID NA NA 2 Consonant sounds +bsid_ec09 bsid_ec09 by3exd009 by3exd009 by3exd009 ec09 ec09 BSID NA NA Uses gestures +bsid_ec10 bsid_ec10 by3exd010 by3exd010 by3exd010 ec10 ec10 BSID NA NA Consonant-Vowel Combination Series: 1 Combination +bsid_ec11 bsid_ec11 by3exd011 by3exd011 by3exd011 ec11 ec11 BSID NA NA Participates in play routine +bsid_ec12 bsid_ec12 by3exd012 by3exd012 by3exd012 ec12 ec12 BSID NA NA Jabbers expressively +bsid_ec13 bsid_ec13 by3exd013 by3exd013 by3exd013 ec13 ec13 BSID NA NA Consonant-Vowel Combination Series: 4 Combination +bsid_ec14 bsid_ec14 by3exd014 by3exd014 by3exd014 ec14 ec14 BSID NA NA Uses one-word approximations +bsid_ec15 bsid_ec15 by3exd015 by3exd015 by3exd015 ec15 ec15 BSID NA NA Directs attention of other +bsid_ec16 bsid_ec16 by3exd016 by3exd016 by3exd016 ec16 ec16 BSID NA NA Imitates word +bsid_ec17 bsid_ec17 by3exd017 by3exd017 by3exd017 ec17 ec17 BSID NA NA Initiates play interaction +bsid_ec18 bsid_ec18 by3exd018 by3exd018 by3exd018 ec18 ec18 BSID NA NA Uses Words Appropriately Series: 2 words +bsid_ec19 bsid_ec19 by3exd019 by3exd019 by3exd019 ec19 ec19 BSID NA NA Uses word to make wants known +bsid_ec20 bsid_ec20 by3exd020 by3exd020 by3exd020 ec20 ec20 BSID NA NA Names Object Series: 1 Object +bsid_ec21 bsid_ec21 by3exd021 by3exd021 by3exd021 ec21 ec21 BSID NA NA Combines word and gesture +bsid_ec22 bsid_ec22 by3exd022 by3exd022 by3exd022 ec22 ec22 BSID NA NA Names Picture Series: 1 Picture +bsid_ec23 bsid_ec23 by3exd023 by3exd023 by3exd023 ec23 ec23 BSID NA NA Uses Words Appropriately Series: 8 words +bsid_ec24 bsid_ec24 by3exd024 by3exd024 by3exd024 ec24 ec24 BSID NA NA Answers yes or no verbally in response to questions +bsid_ec25 bsid_ec25 by3exd025 by3exd025 by3exd025 ec25 ec25 BSID NA NA Imitates a two-word utterance +bsid_ec26 bsid_ec26 by3exd026 by3exd026 by3exd026 ec26 ec26 BSID NA NA Uses a two-word utterance +bsid_ec27 bsid_ec27 by3exd027 by3exd027 by3exd027 ec27 ec27 BSID NA NA Names Object Series: 3 Object +bsid_ec28 bsid_ec28 by3exd028 by3exd028 by3exd028 ec28 ec28 BSID NA NA Names Picture Series: 5 Pictures +bsid_ec29 bsid_ec29 by3exd029 by3exd029 by3exd029 ec29 ec29 BSID NA NA Uses multiple-word utterances +bsid_ec30 bsid_ec30 by3exd030 by3exd030 by3exd030 ec30 ec30 BSID NA NA Uses pronouns +bsid_ec31 bsid_ec31 by3exd031 by3exd031 by3exd031 ec31 ec31 BSID NA NA Names Action Picture Series: 1 Picture +bsid_ec32 bsid_ec32 by3exd032 by3exd032 by3exd032 ec32 ec32 BSID NA NA Poses multiple-word questions +bsid_ec33 bsid_ec33 by3exd033 by3exd033 by3exd033 ec33 ec33 BSID NA NA Makes a contingent utterance +bsid_ec34 bsid_ec34 by3exd034 by3exd034 by3exd034 ec34 ec34 BSID NA NA Uses verb +ing +bsid_ec35 bsid_ec35 by3exd035 by3exd035 by3exd035 ec35 ec35 BSID NA NA Names Action Picture Series: 3 Pictures +bsid_ec36 bsid_ec36 by3exd036 by3exd036 by3exd036 ec36 ec36 BSID NA NA Uses different word combinations +bsid_ec37 bsid_ec37 by3exd037 by3exd037 by3exd037 ec37 ec37 BSID NA NA Names Action Picture Series: 5 Pictures +bsid_ec38 bsid_ec38 by3exd038 by3exd038 by3exd038 ec38 ec38 BSID NA NA Uses plurals +bsid_ec39 bsid_ec39 by3exd039 by3exd039 by3exd039 ec39 ec39 BSID NA NA Answers what or where questions +bsid_ec40 bsid_ec40 by3exd040 by3exd040 by3exd040 ec40 ec40 BSID NA NA Uses possessives +bsid_ec41 bsid_ec41 by3exd041 by3exd041 by3exd041 ec41 ec41 BSID NA NA Names 4 colours +bsid_ec42 bsid_ec42 by3exd042 by3exd042 by3exd042 ec42 ec42 BSID NA NA Answers questions logically (Related to functions) +bsid_ec43 bsid_ec43 by3exd043 by3exd043 by3exd043 ec43 ec43 BSID NA NA Tells how an object is used +bsid_ec44 bsid_ec44 by3exd044 by3exd044 by3exd044 ec44 ec44 BSID NA NA Uses prepositions +bsid_ec45 bsid_ec45 by3exd045 by3exd045 by3exd045 ec45 ec45 BSID NA NA Uses present progressive form +bsid_ec46 bsid_ec46 by3exd046 by3exd046 by3exd046 ec46 ec46 BSID NA NA Describes Pictures Series: Uses 4-5 word sentences +bsid_ec47 bsid_ec47 by3exd047 by3exd047 by3exd047 ec47 ec47 BSID NA NA Describes Pictures Series: Uses past tense +bsid_ec48 bsid_ec48 by3exd048 by3exd048 by3exd048 ec48 ec48 BSID NA NA Describes Pictures Series: Uses future tense +bsid_fm01 bsid_fm01 by3fmd001 by3fmd001 by3fmd001 fm01 fm01 BSID NA NA Hands are fisted +bsid_fm02 bsid_fm02 by3fmd002 by3fmd002 by3fmd002 fm02 fm02 BSID NA NA Eyes follow moving person +bsid_fm03 bsid_fm03 by3fmd003 by3fmd003 by3fmd003 fm03 fm03 BSID NA NA Eyes follow ring horizontal +bsid_fm04 bsid_fm04 by3fmd004 by3fmd004 by3fmd004 fm04 fm04 BSID NA NA Eyes follow ring vertical +bsid_fm05 bsid_fm05 by3fmd005 by3fmd005 by3fmd005 fm05 fm05 BSID NA NA Attempts to bring hand to mouth +bsid_fm06 bsid_fm06 by3fmd006 by3fmd006 by3fmd006 fm06 fm06 BSID NA NA Retains ring +bsid_fm07 bsid_fm07 by3fmd007 by3fmd007 by3fmd007 fm07 fm07 BSID NA NA Eyes follow ring circular +bsid_fm08 bsid_fm08 by3fmd008 by3fmd008 by3fmd008 fm08 fm08 BSID NA NA Head follow ring +bsid_fm09 bsid_fm09 by3fmd009 by3fmd009 by3fmd009 fm09 fm09 BSID NA NA Eyes follow rolling ball +bsid_fm10 bsid_fm10 by3fmd010 by3fmd010 by3fmd010 fm10 fm10 BSID NA NA Keeps hand open +bsid_fm11 bsid_fm11 by3fmd011 by3fmd011 by3fmd011 fm11 fm11 BSID NA NA Rotates wrist +bsid_fm12 bsid_fm12 by3fmd012 by3fmd012 by3fmd012 fm12 fm12 BSID NA NA Grasps suspended ring +bsid_fm13 bsid_fm13 by3fmd013 by3fmd013 by3fmd013 fm13 fm13 BSID NA NA Blocks series reaches for block +bsid_fm14 bsid_fm14 by3fmd014 by3fmd014 by3fmd014 fm14 fm14 BSID NA NA Touches block +bsid_fm15 bsid_fm15 by3fmd015 by3fmd015 by3fmd015 fm15 fm15 BSID NA NA Block Series: Whole hand grasp +bsid_fm16 bsid_fm16 by3fmd016 by3fmd016 by3fmd016 fm16 fm16 BSID NA NA Reaches unilaterally +bsid_fm17 bsid_fm17 by3fmd017 by3fmd017 by3fmd017 fm17 fm17 BSID NA NA Food Pellet Series: Raking grasp +bsid_fm18 bsid_fm18 by3fmd018 by3fmd018 by3fmd018 fm18 fm18 BSID NA NA Block Series: Partial thumb opposition +bsid_fm19 bsid_fm19 by3fmd019 by3fmd019 by3fmd019 fm19 fm19 BSID NA NA Transfers ring +bsid_fm20 bsid_fm20 by3fmd020 by3fmd020 by3fmd020 fm20 fm20 BSID NA NA Food Pellet Series: Whole hand grasp +bsid_fm21 bsid_fm21 by3fmd021 by3fmd021 by3fmd021 fm21 fm21 BSID NA NA Transfers block +bsid_fm22 bsid_fm22 by3fmd022 by3fmd022 by3fmd022 fm22 fm22 BSID NA NA Block Series: Thumb-fingertip grasp +bsid_fm23 bsid_fm23 by3fmd023 by3fmd023 by3fmd023 fm23 fm23 BSID NA NA Brings spoons or blocks to midline +bsid_fm24 bsid_fm24 by3fmd024 by3fmd024 by3fmd024 fm24 fm24 BSID NA NA Food Pellet Series: Partial thumb opposition +bsid_fm25 bsid_fm25 by3fmd025 by3fmd025 by3fmd025 fm25 fm25 BSID NA NA Lifts cup by the handle +bsid_fm26 bsid_fm26 by3fmd026 by3fmd026 by3fmd026 fm26 fm26 BSID NA NA Food Pellet Series: Thumb-fingertip grasp +bsid_fm27 bsid_fm27 by3fmd027 by3fmd027 by3fmd027 fm27 fm27 BSID NA NA Turns pages of books +bsid_fm28 bsid_fm28 by3fmd028 by3fmd028 by3fmd028 fm28 fm28 BSID NA NA Grasp series: Palmar grasp +bsid_fm29 bsid_fm29 by3fmd029 by3fmd029 by3fmd029 fm29 fm29 BSID NA NA Isolates extended ring finger +bsid_fm30 bsid_fm30 by3fmd030 by3fmd030 by3fmd030 fm30 fm30 BSID NA NA Scribbles spontaneously +bsid_fm31 bsid_fm31 by3fmd031 by3fmd031 by3fmd031 fm31 fm31 BSID NA NA Block Stacking Series: 2 blocks +bsid_fm32 bsid_fm32 by3fmd032 by3fmd032 by3fmd032 fm32 fm32 BSID NA NA Imitates Stroke Series: Random +bsid_fm33 bsid_fm33 by3fmd033 by3fmd033 by3fmd033 fm33 fm33 BSID NA NA Places 10 pellets in bottle (60 seconds) +bsid_fm34 bsid_fm34 by3fmd034 by3fmd034 by3fmd034 fm34 fm34 BSID NA NA Grasp series: Transitional grasp +bsid_fm35 bsid_fm35 by3fmd035 by3fmd035 by3fmd035 fm35 fm35 BSID NA NA Coins in slot +bsid_fm36 bsid_fm36 by3fmd036 by3fmd036 by3fmd036 fm36 fm36 BSID NA NA Connecting Blocks: Apart +bsid_fm37 bsid_fm37 by3fmd037 by3fmd037 by3fmd037 fm37 fm37 BSID NA NA Grasp Series: Intermediate (Tripod) grasp +bsid_fm38 bsid_fm38 by3fmd038 by3fmd038 by3fmd038 fm38 fm38 BSID NA NA Block stacking Series: 6 blocks +bsid_fm39 bsid_fm39 by3fmd039 by3fmd039 by3fmd039 fm39 fm39 BSID NA NA Uses hand to hold paper in place +bsid_fm40 bsid_fm40 by3fmd040 by3fmd040 by3fmd040 fm40 fm40 BSID NA NA Imitates Strokes Series: Horizontal +bsid_fm41 bsid_fm41 by3fmd041 by3fmd041 by3fmd041 fm41 fm41 BSID NA NA Imitates Strokes Series: Vertical +bsid_fm42 bsid_fm42 by3fmd042 by3fmd042 by3fmd042 fm42 fm42 BSID NA NA Connecting Blocks: Together +bsid_fm43 bsid_fm43 by3fmd043 by3fmd043 by3fmd043 fm43 fm43 BSID NA NA Imitates Strokes Series: Circular +bsid_fm44 bsid_fm44 by3fmd044 by3fmd044 by3fmd044 fm44 fm44 BSID NA NA Builds train of blocks +bsid_fm45 bsid_fm45 by3fmd045 by3fmd045 by3fmd045 fm45 fm45 BSID NA NA Strings 3 blocks +bsid_fm46 bsid_fm46 by3fmd046 by3fmd046 by3fmd046 fm46 fm46 BSID NA NA Imitates hand movements +bsid_fm47 bsid_fm47 by3fmd047 by3fmd047 by3fmd047 fm47 fm47 BSID NA NA Snips paper +bsid_fm48 bsid_fm48 by3fmd048 by3fmd048 by3fmd048 fm48 fm48 BSID NA NA Grasp Series: Dynamic grasp +bsid_fm49 bsid_fm49 by3fmd049 by3fmd049 by3fmd049 fm49 fm49 BSID NA NA Tactilely discriminates shapes +bsid_fm50 bsid_fm50 by3fmd050 by3fmd050 by3fmd050 fm50 fm50 BSID NA NA Builds wall +bsid_fm51 bsid_fm51 by3fmd051 by3fmd051 by3fmd051 fm51 fm51 BSID NA NA Cuts paper +bsid_fm52 bsid_fm52 by3fmd052 by3fmd052 by3fmd052 fm52 fm52 BSID NA NA Builds bridge +bsid_fm53 bsid_fm53 by3fmd053 by3fmd053 by3fmd053 fm53 fm53 BSID NA NA Imitates plus sign +bsid_fm54 bsid_fm54 by3fmd054 by3fmd054 by3fmd054 fm54 fm54 BSID NA NA Block stacking Series: 8 blocks +bsid_fm55 bsid_fm55 by3fmd055 by3fmd055 by3fmd055 fm55 fm55 BSID NA NA Cuts on line +bsid_fm56 bsid_fm56 by3fmd056 by3fmd056 by3fmd056 fm56 fm56 BSID NA NA Builds T +bsid_fm57 bsid_fm57 by3fmd057 by3fmd057 by3fmd057 fm57 fm57 BSID NA NA Buttons 1 button +bsid_fm58 bsid_fm58 by3fmd058 by3fmd058 by3fmd058 fm58 fm58 BSID NA NA Builds steps +bsid_fm59 bsid_fm59 by3fmd059 by3fmd059 by3fmd059 fm59 fm59 BSID NA NA Traces designs +bsid_fm60 bsid_fm60 by3fmd060 by3fmd060 by3fmd060 fm60 fm60 BSID NA NA Imitates square +bsid_fm61 bsid_fm61 by3fmd061 by3fmd061 by3fmd061 fm61 fm61 BSID NA NA Copies plus sign +bsid_fm62 bsid_fm62 by3fmd062 by3fmd062 by3fmd062 fm62 fm62 BSID NA NA Tapbs fingers +bsid_fm63 bsid_fm63 by3fmd063 by3fmd063 by3fmd063 fm63 fm63 BSID NA NA Places 20 pellets in bottle +bsid_fm64 bsid_fm64 by3fmd064 by3fmd064 by3fmd064 fm64 fm64 BSID NA NA Cuts circle +bsid_fm65 bsid_fm65 by3fmd065 by3fmd065 by3fmd065 fm65 fm65 BSID NA NA Cuts square +bsid_fm66 bsid_fm66 by3fmd066 by3fmd066 by3fmd066 fm66 fm66 BSID NA NA Copies square +bsid_gsm01 bsid_gsm01 by3gmd001 by3gmd001 by3gmd001 gsm01 gsm01 BSID NA NA Thursts legs in play +bsid_gsm02 bsid_gsm02 by3gmd002 by3gmd002 by3gmd002 gsm02 gsm02 BSID NA NA Thrusts arms in play +bsid_gsm03 bsid_gsm03 by3gmd003 by3gmd003 by3gmd003 gsm03 gsm03 BSID NA NA Controls head while upright series: lifts head +bsid_gsm04 bsid_gsm04 by3gmd004 by3gmd004 by3gmd004 gsm04 gsm04 BSID NA NA Controls head while upright series: 3 secs +bsid_gsm05 bsid_gsm05 by3gmd005 by3gmd005 by3gmd005 gsm05 gsm05 BSID NA NA Turns head to side +bsid_gsm06 bsid_gsm06 by3gmd006 by3gmd006 by3gmd006 gsm06 gsm06 BSID NA NA Makes crawling movements +bsid_gsm07 bsid_gsm07 by3gmd007 by3gmd007 by3gmd007 gsm07 gsm07 BSID NA NA Controls head in dorsal suspension +bsid_gsm08 bsid_gsm08 by3gmd008 by3gmd008 by3gmd008 gsm08 gsm08 BSID NA NA Controls head in ventral suspension +bsid_gsm09 bsid_gsm09 by3gmd009 by3gmd009 by3gmd009 gsm09 gsm09 BSID NA NA Controls head while upright Series: 15 seconds +bsid_gsm10 bsid_gsm10 by3gmd010 by3gmd010 by3gmd010 gsm10 gsm10 BSID NA NA Holds head in midline +bsid_gsm11 bsid_gsm11 by3gmd011 by3gmd011 by3gmd011 gsm11 gsm11 BSID NA NA Holds head upright while carried +bsid_gsm12 bsid_gsm12 by3gmd012 by3gmd012 by3gmd012 gsm12 gsm12 BSID NA NA Controls head while prone Series: 45 degrees +bsid_gsm13 bsid_gsm13 by3gmd013 by3gmd013 by3gmd013 gsm13 gsm13 BSID NA NA Rights head +bsid_gsm14 bsid_gsm14 by3gmd014 by3gmd014 by3gmd014 gsm14 gsm14 BSID NA NA Rolls from side to back +bsid_gsm15 bsid_gsm15 by3gmd015 by3gmd015 by3gmd015 gsm15 gsm15 BSID NA NA Elevates trunk while Prone Series: Elbows and forearms +bsid_gsm16 bsid_gsm16 by3gmd016 by3gmd016 by3gmd016 gsm16 gsm16 BSID NA NA Sits with Support Series: Briefly +bsid_gsm17 bsid_gsm17 by3gmd017 by3gmd017 by3gmd017 gsm17 gsm17 BSID NA NA Controls head while prone Series: 90 degrees +bsid_gsm18 bsid_gsm18 by3gmd018 by3gmd018 by3gmd018 gsm18 gsm18 BSID NA NA Elevates trunk while prone +bsid_gsm19 bsid_gsm19 by3gmd019 by3gmd019 by3gmd019 gsm19 gsm19 BSID NA NA Sits with Support Series: 30 seconds +bsid_gsm20 bsid_gsm20 by3gmd020 by3gmd020 by3gmd020 gsm20 gsm20 BSID NA NA Rolls from back to sides +bsid_gsm21 bsid_gsm21 by3gmd021 by3gmd021 by3gmd021 gsm21 gsm21 BSID NA NA Elevates Trunk while Prone Series: Extended arms +bsid_gsm22 bsid_gsm22 by3gmd022 by3gmd022 by3gmd022 gsm22 gsm22 BSID NA NA Sits with Support Series: 5 seconds +bsid_gsm23 bsid_gsm23 by3gmd023 by3gmd023 by3gmd023 gsm23 gsm23 BSID NA NA Pulls up to sit +bsid_gsm24 bsid_gsm24 by3gmd024 by3gmd024 by3gmd024 gsm24 gsm24 BSID NA NA Grasps foot with hands +bsid_gsm25 bsid_gsm25 by3gmd025 by3gmd025 by3gmd025 gsm25 gsm25 BSID NA NA Rolls from back to stomach +bsid_gsm26 bsid_gsm26 by3gmd026 by3gmd026 by3gmd026 gsm26 gsm26 BSID NA NA Sits without Support Series: 30 seconds +bsid_gsm27 bsid_gsm27 by3gmd027 by3gmd027 by3gmd027 gsm27 gsm27 BSID NA NA Sits without support and holds objects +bsid_gsm28 bsid_gsm28 by3gmd028 by3gmd028 by3gmd028 gsm28 gsm28 BSID NA NA Rotates trunk while seated +bsid_gsm29 bsid_gsm29 by3gmd029 by3gmd029 by3gmd029 gsm29 gsm29 BSID NA NA Makes stepping movements +bsid_gsm30 bsid_gsm30 by3gmd030 by3gmd030 by3gmd030 gsm30 gsm30 BSID NA NA Crawls Series: On stomach +bsid_gsm31 bsid_gsm31 by3gmd031 by3gmd031 by3gmd031 gsm31 gsm31 BSID NA NA Crawls Series: Crawl position +bsid_gsm32 bsid_gsm32 by3gmd032 by3gmd032 by3gmd032 gsm32 gsm32 BSID NA NA Moves from sitting to hands and knees +bsid_gsm33 bsid_gsm33 by3gmd033 by3gmd033 by3gmd033 gsm33 gsm33 BSID NA NA Supports weight +bsid_gsm34 bsid_gsm34 by3gmd034 by3gmd034 by3gmd034 gsm34 gsm34 BSID NA NA Crawls Series: Crawl movement +bsid_gsm35 bsid_gsm35 by3gmd035 by3gmd035 by3gmd035 gsm35 gsm35 BSID NA NA Raises self to standing position +bsid_gsm36 bsid_gsm36 by3gmd036 by3gmd036 by3gmd036 gsm36 gsm36 BSID NA NA Bounces while standing +bsid_gsm37 bsid_gsm37 by3gmd037 by3gmd037 by3gmd037 gsm37 gsm37 BSID NA NA Walks Series: With support +bsid_gsm38 bsid_gsm38 by3gmd038 by3gmd038 by3gmd038 gsm38 gsm38 BSID NA NA Walks sideways with support +bsid_gsm39 bsid_gsm39 by3gmd039 by3gmd039 by3gmd039 gsm39 gsm39 BSID NA NA Sits down with control +bsid_gsm40 bsid_gsm40 by3gmd040 by3gmd040 by3gmd040 gsm40 gsm40 BSID NA NA Stands alone +bsid_gsm41 bsid_gsm41 by3gmd041 by3gmd041 by3gmd041 gsm41 gsm41 BSID NA NA Stands up Series: Alone +bsid_gsm42 bsid_gsm42 by3gmd042 by3gmd042 by3gmd042 gsm42 gsm42 BSID NA NA Walks Series: Alone +bsid_gsm43 bsid_gsm43 by3gmd043 by3gmd043 by3gmd043 gsm43 gsm43 BSID NA NA Walks Series: Alone with coordination +bsid_gsm44 bsid_gsm44 by3gmd044 by3gmd044 by3gmd044 gsm44 gsm44 BSID NA NA Throws ball +bsid_gsm45 bsid_gsm45 by3gmd045 by3gmd045 by3gmd045 gsm45 gsm45 BSID NA NA Squats without support +bsid_gsm46 bsid_gsm46 by3gmd046 by3gmd046 by3gmd046 gsm46 gsm46 BSID NA NA Stands up Series: Mature +bsid_gsm47 bsid_gsm47 by3gmd047 by3gmd047 by3gmd047 gsm47 gsm47 BSID NA NA Walks Up Stairs Series: Both feet on each step, with support. +bsid_gsm48 bsid_gsm48 by3gmd048 by3gmd048 by3gmd048 gsm48 gsm48 BSID NA NA Walks backward 2 steps +bsid_gsm49 bsid_gsm49 by3gmd049 by3gmd049 by3gmd049 gsm49 gsm49 BSID NA NA Walks Down Stairs Series: Both feet on each step, with support +bsid_gsm50 bsid_gsm50 by3gmd050 by3gmd050 by3gmd050 gsm50 gsm50 BSID NA NA Runs with coordination +bsid_gsm51 bsid_gsm51 by3gmd051 by3gmd051 by3gmd051 gsm51 gsm51 BSID NA NA Balances on Right Foot Series: With support +bsid_gsm52 bsid_gsm52 by3gmd052 by3gmd052 by3gmd052 gsm52 gsm52 BSID NA NA Balances on Left Foot Series: With support +bsid_gsm53 bsid_gsm53 by3gmd053 by3gmd053 by3gmd053 gsm53 gsm53 BSID NA NA Walks sideways without support +bsid_gsm54 bsid_gsm54 by3gmd054 by3gmd054 by3gmd054 gsm54 gsm54 BSID NA NA Jumps from bottom step +bsid_gsm55 bsid_gsm55 by3gmd055 by3gmd055 by3gmd055 gsm55 gsm55 BSID NA NA Kicks ball +bsid_gsm56 bsid_gsm56 by3gmd056 by3gmd056 by3gmd056 gsm56 gsm56 BSID NA NA Walks forward on path +bsid_gsm57 bsid_gsm57 by3gmd057 by3gmd057 by3gmd057 gsm57 gsm57 BSID NA NA Walks Up Stairs Series: Both feet on each step, alone. +bsid_gsm58 bsid_gsm58 by3gmd058 by3gmd058 by3gmd058 gsm58 gsm58 BSID NA NA Walks Down Stairs Series: Both feet on each step, alone +bsid_gsm59 bsid_gsm59 by3gmd059 by3gmd059 by3gmd059 gsm59 gsm59 BSID NA NA Jumps Forward Series: 4 inches +bsid_gsm60 bsid_gsm60 by3gmd060 by3gmd060 by3gmd060 gsm60 gsm60 BSID NA NA Balances on right Foot Series: 2 seconds, alone +bsid_gsm61 bsid_gsm61 by3gmd061 by3gmd061 by3gmd061 gsm61 gsm61 BSID NA NA Balances on Left Foot Series: 2 seconds, alone +bsid_gsm62 bsid_gsm62 by3gmd062 by3gmd062 by3gmd062 gsm62 gsm62 BSID NA NA Walks on tiptoes 4 steps +bsid_gsm63 bsid_gsm63 by3gmd063 by3gmd063 by3gmd063 gsm63 gsm63 BSID NA NA Walks backward close to path +bsid_gsm64 bsid_gsm64 by3gmd064 by3gmd064 by3gmd064 gsm64 gsm64 BSID NA NA Walks Up Stairs Series: Alternating feet, alone +bsid_gsm65 bsid_gsm65 by3gmd065 by3gmd065 by3gmd065 gsm65 gsm65 BSID NA NA Imitates postures +bsid_gsm66 bsid_gsm66 by3gmd066 by3gmd066 by3gmd066 gsm66 gsm66 BSID NA NA Stops from a full run +bsid_gsm67 bsid_gsm67 by3gmd067 by3gmd067 by3gmd067 gsm67 gsm67 BSID NA NA Walks Down Stairs Series: Alternating feet, alone +bsid_gsm68 bsid_gsm68 by3gmd068 by3gmd068 by3gmd068 gsm68 gsm68 BSID NA NA Hops 5 feet +bsid_gsm69 bsid_gsm69 by3gmd069 by3gmd069 by3gmd069 gsm69 gsm69 BSID NA NA Balances on Right Foot Series: 8 seconds, alone +bsid_gsm70 bsid_gsm70 by3gmd070 by3gmd070 by3gmd070 gsm70 gsm70 BSID NA NA Balances on Left Foot Series: 8 seconds, alone +bsid_gsm71 bsid_gsm71 by3gmd071 by3gmd071 by3gmd071 gsm71 gsm71 BSID NA NA Walks heel to toe +bsid_gsm72 bsid_gsm72 by3gmd072 by3gmd072 by3gmd072 gsm72 gsm72 BSID NA NA Jumps Forward Series: 24 inches diff --git a/data-raw/data/items/phase2_items.txt b/data-raw/data/items/phase2_items.txt new file mode 100644 index 00000000..aa56b367 --- /dev/null +++ b/data-raw/data/items/phase2_items.txt @@ -0,0 +1,295 @@ +row code label gsed gsed2 p1 p2 instrument domain mode number +1 Ma_LF_A01 A1 Moves body in reaction to caregiver mdtsed003 gtogmd003 lf1 a_d gl1 gm d 1 +2 Ma_LF_A02 A2 Moves body, kicking legs and moving arms equally on his/her own mdtsed004 gtogmd002 lf1 a_d gl1 gm d 2 +3 Ma_LF_A03 A3 Pulls to sit - no head lag mdtgmd004 gtogmd006 lf1 a_d gl1 gm d 3 +4 Ma_LF_A04 A4 Lifts head in prone 45 degrees (2X) ddigmd057 gtogmd001 lf1 a_d gl1 gm d 4 +5 Ma_LF_A05 A5 Lifts head, shoulders, chest when prone (2X) mdtgmd005 gtogmd007 lf1 a_d gl1 gm d 5 +6 Ma_LF_A06 A6 Puts hands together in front of face mdtfmd003 gtogmd004 lf1 a_d gl1 gm d 6 +7 Ma_LF_A07 A7 Carries object to mouth to explore (2X) sgrehd012 gtogmd011 lf1 a_d gl1 gm d 7 +8 Ma_LF_A08 A8 Reaches for an object (2X) by1mdd051 gtogmd008 lf1 a_d gl1 gm d 8 +9 Ma_LF_A09 A9 Grasps hold of large object (2X) mdtfmd006 gtogmd010 lf1 a_d gl1 gm d 9 +10 Ma_LF_A10 A10 Balances head while supported ddigmd061 gtogmd005 lf1 a_d gl1 gm d 10 +11 Ma_LF_A11 A11 Sits supported (with help) (2X) dmcgmd003 gtogmd012 lf1 a_d gl1 gm d 11 +12 Ma_LF_A12 A12 Resists object being taken away (2X) sgrred010 gtogmd009 lf1 a_d gl1 gm d 12 +13 Ma_LF_A13 A13 Sees a small object (2X) mdtfmd008 gtogmd016 lf1 a_d gl1 gm d 13 +14 Ma_LF_A14 A14 Sits momentarily (on his/her own) (2X) by1pdd023 gtogmd013 lf1 a_d gl1 gm d 14 +15 Ma_LF_A15 A15 Sits without help (short time) (2X) mdtgmd009 gtogmd018 lf1 a_d gl1 gm d 15 +16 Ma_LF_A16 A16 Picks object from ground (2X) mdtfmd007 gtogmd020 lf1 a_d gl1 gm d 16 +17 Ma_LF_A17 A17 Rolls from back to stomach (2X) by1pdd028 gtogmd015 lf1 a_d gl1 gm d 17 +18 Ma_LF_A18 A18 Sits by self well (2X) mdtgmd010 gtogmd022 lf1 a_d gl1 gm d 18 +19 Ma_LF_A19 A19 Rakes (grasps with 3 or 4 fingers) a small object (2X) denfmd009 gtogmd017 lf1 a_d gl1 gm d 19 +20 Ma_LF_A20 A20 Turns on floor (2X) sgrgmd022 gtogmd019 lf1 a_d gl1 gm d 20 +21 Ma_LF_A21 A21 Moves from lying to sitting kdigmd031 gtogmd026 lf1 a_d gl1 gm d 21 +22 Ma_LF_A22 A22 Stands with support (2X) kdigmd001 gtogmd027 lf1 a_d gl1 gm d 22 +23 Ma_LF_A23 A23 Reaches for a second object (2X) by1mdd064 gtogmd014 lf1 a_d gl1 gm d 23 +24 Ma_LF_A24 A24 Crawls (2X) dmcgmd005 gtogmd023 lf1 a_d gl1 gm d 24 +25 Ma_LF_A25 A25 Pulls up to standing position (2X) mdtgmd012 gtogmd025 lf1 a_d gl1 gm d 25 +26 Ma_LF_A26 A26 Shifts object from 1 hand to the other (2X) mdtfmd009 gtogmd021 lf1 a_d gl1 gm d 26 +27 Ma_LF_A27 A27 Picks up small object between thumb and finger (2X) ddifmd010 gtogmd024 lf1 a_d gl1 gm d 27 +28 Ma_LF_A28 A28 Walks when 1 hand held (2X) kdigmd005 gtogmd029 lf1 a_d gl1 gm d 28 +29 Ma_LF_A29 A29 Stands alone for 5 seconds or more if put in standing position (2X) dmcgmd009 gtogmd028 lf1 a_d gl1 gm d 29 +30 Ma_LF_A30 "A30 Plays ""give-and-take"" (3X)" ddifmm012 gtogmd030 lf1 a_d gl1 gm d 30 +31 Ma_LF_A31 A31 Takes few steps alone (2X) grigmd203 gtogmd032 lf1 a_d gl1 gm d 31 +32 Ma_LF_A32 A32 Walks mdtgmd018 gtogmd036 lf1 a_d gl1 gm d 32 +33 Ma_LF_A33 A33 Runs (basic), may fall over (2X) mdtgmd019 gtogmd037 lf1 a_d gl1 gm d 33 +34 Ma_LF_A34 A34 Stoops and recovers (2X) mdtgmd017 gtogmd034 lf1 a_d gl1 gm d 34 +35 Ma_LF_A35 A35 Releases ball purposefully (2X) kdifmd002 gtogmd031 lf1 a_d gl1 gm d 35 +36 Ma_LF_A36 A36 Runs well (2X) mdtgmd021 gtogmd038 lf1 a_d gl1 gm d 36 +37 Ma_LF_A37 A37 Kicks a ball from stationary position (2X) kdigmd003 gtogmd033 lf1 a_d gl1 gm d 37 +38 Ma_LF_A38 A38 Runs and kicks a ball well (2X) mdtgmd024 gtogmd039 lf1 a_d gl1 gm d 38 +39 Ma_LF_A39 A39 Kneels and then stands, without using hands (2X) mdtgmd022 gtogmd040 lf1 a_d gl1 gm d 39 +40 Ma_LF_A40 A40 Hops forward on 1 foot 3 steps (2X) mdtgmd031 gtogmd045 lf1 a_d gl1 gm d 40 +41 Ma_LF_A41 A41 Jumps with both feet together (2X) kdigmd008 gtogmd042 lf1 a_d gl1 gm d 41 +42 Ma_LF_A42 A42 Jumps over a piece of paper (widthways) (2X) mdtgmd029 gtogmd043 lf1 a_d gl1 gm d 42 +43 Ma_LF_A43 A43 Walks along line heel-to-toe (2X) kdigmd015 gtogmd048 lf1 a_d gl1 gm d 43 +44 Ma_LF_A44 A44 Throws beanbag onto a cloth (3X) mdtgmd023 gtogmd041 lf1 a_d gl1 gm d 44 +45 Ma_LF_A45 A45 Stands on 1 foot < 5 seconds (2X) mdtgmd027 gtogmd044 lf1 a_d gl1 gm d 45 +46 Ma_LF_A46 A46 Walks on tiptoes 6 or more steps mdtgmd030 gtogmd047 lf1 a_d gl1 gm d 46 +47 Ma_LF_A47 A47 Moves from sitting to standing without using hands kdigmd034 gtogmd035 lf1 a_d gl1 gm d 47 +48 Ma_LF_A48 A48 Stands on 1 foot > 5 seconds (2X) mdtgmd032 gtogmd046 lf1 a_d gl1 gm d 48 +49 Ma_LF_A49 A49 Throws ball up into the air and catches it (3X) mdtgmd033 gtogmd049 lf1 a_d gl1 gm d 49 +50 Ma_LF_B01 B1 Makes sounds or vocalizes (2X) mdtlgd002 gtolgd004 lf1 a_d gl1 lg d 1 +51 Ma_LF_B02 B2 Reacts when spoken to (2X) ddicmm029 gtolgd001 lf1 a_d gl1 lg d 2 +52 Ma_LF_B03 B3 Smiles in response (2X) ddicmm030 gtolgd002 lf1 a_d gl1 lg d 3 +53 Ma_LF_B04 B4 Laughs (2X) mdtlgd003 gtolgd006 lf1 a_d gl1 lg d 4 +54 Ma_LF_B05 B5 Calms and quiets with caregiver mdtsed005 gtolgd003 lf1 a_d gl1 lg d 5 +55 Ma_LF_B06 B6 Vocalizes when spoken to sgrred006 gtolgd007 lf1 a_d gl1 lg d 6 +56 Ma_LF_B07 B7 Turns to voice (2X) denlgd007 gtolgd005 lf1 a_d gl1 lg d 7 +57 Ma_LF_B08 B8 Babbles while playing ddicmm034 gtolgd009 lf1 a_d gl1 lg d 8 +58 Ma_LF_B09 B9 Repeats syllables dmclgd002 gtolgd008 lf1 a_d gl1 lg d 9 +59 Ma_LF_B10 B10 Uses gestures to communicate dmclgd005 gtolgd012 lf1 a_d gl1 lg d 10 +60 Ma_LF_B11 B11 Uses 2 - 4 syllable babble mdtlgd007 gtolgd010 lf1 a_d gl1 lg d 11 +61 Ma_LF_B12 B12 Responds to verbal request (2X) by1mdd089 gtolgd013 lf1 a_d gl1 lg d 12 +62 Ma_LF_B13 B13 Uses 1 definite word dmclgd006 gtolgd014 lf1 a_d gl1 lg d 13 +63 Ma_LF_B14 B14 Understands when being cautioned (2X) mdtlgd008 gtolgd011 lf1 a_d gl1 lg d 14 +64 Ma_LF_B15 B15 Imitates simple words (2X) by1mdd106 gtolgd015 lf1 a_d gl1 lg d 15 +65 Ma_LF_B16 B16 Follows simple commands (1 step) (2X) mdtlgd010 gtolgd020 lf1 a_d gl1 lg d 16 +66 Ma_LF_B17 B17 Points to 2 pictures by2mdd099 gtolgd021 lf1 a_d gl1 lg d 17 +67 Ma_LF_B18 B18 Identifies 2 objects you name (2X) ddicmd141 gtolgd018 lf1 a_d gl1 lg d 18 +68 Ma_LF_B19 B19 Identifies 5 objects you name (2X) mdtlgd016 gtolgd026 lf1 a_d gl1 lg d 19 +69 Ma_LF_B20 B20 Identifies 1 item of clothing by1mdd117 gtolgd017 lf1 a_d gl1 lg d 20 +70 Ma_LF_B21 B21 Identifies 3 items of clothing by3red022 gtolgd022 lf1 a_d gl1 lg d 21 +71 Ma_LF_B22 B22 Points to 1 or more body parts (2X) mdtlgd018 gtolgd029 lf1 a_d gl1 lg d 22 +72 Ma_LF_B23 B23 Points at 5 pictures in book ddicmd044 gtolgd025 lf1 a_d gl1 lg d 23 +73 Ma_LF_B24 B24 Shows interest in story by3cgd059 gtolgd019 lf1 a_d gl1 lg d 24 +74 Ma_LF_B25 B25 Follows 2-step commands (2X) mdtlgd015 gtolgd023 lf1 a_d gl1 lg d 25 +75 Ma_LF_B26 B26 Says sentences with 2 words together ddicmm041 gtolgd024 lf1 a_d gl1 lg d 26 +76 Ma_LF_B27 B27 Names 4 pictures grihsd223 gtolgd033 lf1 a_d gl1 lg d 27 +77 Ma_LF_B28 B28 Uses 5 clear words grihsd208 gtolgd016 lf1 a_d gl1 lg d 28 +78 Ma_LF_B29 B29 Matches pictures by3cgd064 gtolgd032 lf1 a_d gl1 lg d 29 +79 Ma_LF_B30 B30 Names 5 objects (2X) mdtlgd019 gtolgd027 lf1 a_d gl1 lg d 30 +80 Ma_LF_B31 B31 Uses multiple-word utterances by3exd029 gtolgd036 lf1 a_d gl1 lg d 31 +81 Ma_LF_B32 B32 Speaks clearly in sentences mdtlgd017 gtolgd028 lf1 a_d gl1 lg d 32 +82 Ma_LF_B33 B33 Knows actions or functions of 3 or more objects mdtlgd021 gtolgd031 lf1 a_d gl1 lg d 33 +83 Ma_LF_B34 B34 Points to parts of whole objects by3red028 gtolgd038 lf1 a_d gl1 lg d 34 +84 Ma_LF_B35 B35 Says first name (2X) mdtlgd020 gtolgd030 lf1 a_d gl1 lg d 35 +85 Ma_LF_B36 B36 Names 10 objects (2X) mdtlgd023 gtolgd035 lf1 a_d gl1 lg d 36 +86 Ma_LF_B37 "B27 Understands ""more"" (2X)" teplgd018 gtolgd047 lf1 a_d gl1 lg d 37 +87 Ma_LF_B38 B38 Identifies 2 or more colours (2X) teplgd032 gtolgd043 lf1 a_d gl1 lg d 38 +88 Ma_LF_B39 B39 Knows use of objects (2X) grihsd303 gtolgd045 lf1 a_d gl1 lg d 39 +89 Ma_LF_B40 B40 Names at least 2 colours (2X) teplgd031 gtolgd049 lf1 a_d gl1 lg d 40 +90 Ma_LF_B41 B41 Identifies 5 action pictures by3red029 gtolgd034 lf1 a_d gl1 lg d 41 +91 Ma_LF_B42 B42 Identifies at least 2 shapes (2X) teplgd034 gtolgd048 lf1 a_d gl1 lg d 42 +92 Ma_LF_B43 B43 Talks easily about daily events ddicmm047 gtolgd037 lf1 a_d gl1 lg d 43 +93 Ma_LF_B44 B44 Describes picture (2X) teplgd035 gtolgd042 lf1 a_d gl1 lg d 44 +94 Ma_LF_B45 B45 Gives logical response to a question (2X) teplgd281 gtolgd039 lf1 a_d gl1 lg d 45 +95 Ma_LF_B46 B46 Categorizes things mdtlgd024 gtolgd040 lf1 a_d gl1 lg d 46 +96 Ma_LF_B47 B47 Matches 3 colours (2X) by3cgd068 gtolgd041 lf1 a_d gl1 lg d 47 +97 Ma_LF_B48 "B48 Understands adjective ""faster"" (2X)" mdtlgd029 gtolgd044 lf1 a_d gl1 lg d 48 +98 Ma_LF_B49 B49 Names actions (5) by3exd037 gtolgd046 lf1 a_d gl1 lg d 49 +99 Ma_LF_B50 B50 Taps with 2 blocks sbiwmd007 gtolgd050 lf1 a_d gl1 lg d 50 +100 Ma_LF_B51 B51 Taps with 4 blocks sbiwmd008 gtolgd051 lf1 a_d gl1 lg d 51 +101 Ma_LF_B52 B52 Taps with 8 blocks sbiwmd009 gtolgd052 lf1 a_d gl1 lg d 52 +102 Ma_LF_C01 C1 Fixates eyes (2X) ddifmd001 gtofmd001 lf1 a_d gl1 fm d 1 +103 Ma_LF_C02 C2 Responds to sound (2X) mdtlgd001 gtofmd002 lf1 a_d gl1 fm d 2 +104 Ma_LF_C03 C3 Fixes and follows - 180 degrees mdtfmd002 gtofmd003 lf1 a_d gl1 fm d 3 +105 Ma_LF_C04 C4 Manipulates cup OR spoon in play sgrred018 gtofmd007 lf1 a_d gl1 fm d 4 +106 Ma_LF_C05 C5 Shows interest in making a sound (2X) by1mdd072 gtofmd004 lf1 a_d gl1 fm d 5 +107 Ma_LF_C06 C6 Turns head towards fallen object (2X) by1mdd062 gtofmd006 lf1 a_d gl1 fm d 6 +108 Ma_LF_C07 C7 Discriminates strangers by1mdd058 gtofmd005 lf1 a_d gl1 fm d 7 +109 Ma_LF_C08 C8 Picks up cup to get block by1mdd088 gtofmd010 lf1 a_d gl1 fm d 8 +110 Ma_LF_C09 C9 Finds toy under cloth (2X) mdtfmd012 gtofmd013 lf1 a_d gl1 fm d 9 +111 Ma_LF_C10 C10 Pulls string to get object (2X) by1mdd080 gtofmd009 lf1 a_d gl1 fm d 10 +112 Ma_LF_C11 C11 Lifts cup by the handle (2X) by1mdd073 gtofmd008 lf1 a_d gl1 fm d 11 +113 Ma_LF_C12 C12 Puts block in cup (2X) denfmd014 gtofmd011 lf1 a_d gl1 fm d 12 +114 Ma_LF_C13 C13 Bangs 2 objects together denfmd013 gtofmd012 lf1 a_d gl1 fm d 13 +115 Ma_LF_C14 C14 Pats toy to make noise (2X by1mdd104 gtofmd014 lf1 a_d gl1 fm d 14 +116 Ma_LF_C15 C15 Makes marks with crayon (2X) dmcfmd009 gtofmd017 lf1 a_d gl1 fm d 15 +117 Ma_LF_C16 C16 Puts 3 or more blocks in cup by1mdd100 gtofmd015 lf1 a_d gl1 fm d 16 +118 Ma_LF_C17 C17 Puts blocks in jar mdtfmd016 gtofmd023 lf1 a_d gl1 fm d 17 +119 Ma_LF_C18 C18 Puts 1 peg in again (2X) by1mdd108 gtofmd021 lf1 a_d gl1 fm d 18 +120 Ma_LF_C19 C19 Scribbles in any way (2X) denfmd015 gtofmd020 lf1 a_d gl1 fm d 19 +121 Ma_LF_C20 C20 Accepts third block without dropping (2X) gricgd023 gtofmd022 lf1 a_d gl1 fm d 20 +122 Ma_LF_C21 C21 Uses objects in play by him-/herself (2X) by3cgd048 gtofmd027 lf1 a_d gl1 fm d 21 +123 Ma_LF_C22 C22 Manages a cup well dmcsld019 gtofmd018 lf1 a_d gl1 fm d 22 +124 Ma_LF_C23 C23 Holds crayon with fingers, not fist (2X) by1mdd098 gtofmd019 lf1 a_d gl1 fm d 23 +125 Ma_LF_C24 C24 Repeats something when encouraged (2X) by1mdd097 gtofmd016 lf1 a_d gl1 fm d 24 +126 Ma_LF_C25 C25 Dumps blocks out of jar purposefully (2X) mdtfmd017 gtofmd025 lf1 a_d gl1 fm d 25 +127 Ma_LF_C26 C26 Builds tower of 2 blocks (2X) ddifmd013 gtofmd024 lf1 a_d gl1 fm d 26 +128 Ma_LF_C27 C27 Puts pegs in board < 2 minutes (2X) mdtfmd021 gtofmd032 lf1 a_d gl1 fm d 27 +129 Ma_LF_C28 C28 Builds tower of 3 blocks (2X) by1mdd119 gtofmd028 lf1 a_d gl1 fm d 28 +130 Ma_LF_C29 C29 Finds object under 2 alternating cups (3X) by1mdd131 gtofmd026 lf1 a_d gl1 fm d 29 +131 Ma_LF_C30 C30 Inserts 2 shapes in board (2X) gricgd213 gtofmd033 lf1 a_d gl1 fm d 30 +132 Ma_LF_C31 C31 Inserts 3 shapes in board in 2 minutes (2X) by3cgd056 gtofmd035 lf1 a_d gl1 fm d 31 +133 Ma_LF_C32 C32 Uses objects in play with someone (2X) by3cgd053 gtofmd031 lf1 a_d gl1 fm d 32 +134 Ma_LF_C33 C33 Scribbles on paper (circular scribble) mdtfmd019 gtofmd030 lf1 a_d gl1 fm d 33 +135 Ma_LF_C34 C34 Builds tower of 6 blocks (2X) mdtfmd023 gtofmd037 lf1 a_d gl1 fm d 34 +136 Ma_LF_C35 "C35 Understands the concept of ""1"" (2X)" mdtfmd022 gtofmd029 lf1 a_d gl1 fm d 35 +137 Ma_LF_C36 C36 Inserts 3 shapes in rotated board in 2 minutes (2X) by3cgd060 gtofmd036 lf1 a_d gl1 fm d 36 +138 Ma_LF_C37 C37 Builds truck/lorry of blocks (2X) by3fmd044 gtofmd043 lf1 a_d gl1 fm d 37 +139 Ma_LF_C38 C38 Unscrews and screws lid of jar (2X) mdtfmd025 gtofmd040 lf1 a_d gl1 fm d 38 +140 Ma_LF_C39 C39 Engages in representational play by3cgd065 gtofmd041 lf1 a_d gl1 fm d 39 +141 Ma_LF_C40 C40 Inserts 3 shapes in 15 seconds (2X) sbivsd003 gtofmd039 lf1 a_d gl1 fm d 40 +142 Ma_LF_C41 C41 Copies 2-part activity (3X) by3cgd067 gtofmd042 lf1 a_d gl1 fm d 41 +143 Ma_LF_C42 C42 Puts pegs in board in < 30 seconds (2X) mdtfmd024 gtofmd038 lf1 a_d gl1 fm d 42 +144 Ma_LF_C43 C43 Draws horizontal line (2X) griehd301 gtofmd045 lf1 a_d gl1 fm d 43 +145 Ma_LF_C44 "C44 Understands ""more"" (3X-5X)" by3cgd089 gtofmd034 lf1 a_d gl1 fm d 44 +146 Ma_LF_C45 C45 Imitates building bridge (2X) ddifmd023 gtofmd044 lf1 a_d gl1 fm d 45 +147 Ma_LF_C46 C46 Picks longest stick 3 of 3 (3X-5X) mdtfmd028 gtofmd046 lf1 a_d gl1 fm d 46 +148 Ma_LF_C47 C47 Copies a circle ddifmd026 gtofmd049 lf1 a_d gl1 fm d 47 +149 Ma_LF_C48 C48 Builds wall of blocks (2X) by3fmd050 gtofmd048 lf1 a_d gl1 fm d 48 +150 Ma_LF_C49 C49 Understands concept of size (2X) by3cgd073 gtofmd051 lf1 a_d gl1 fm d 49 +151 Ma_LF_C50 C50 Understands prepositions (2X) mdtlgd031 gtofmd047 lf1 a_d gl1 fm d 50 +152 Ma_LF_C51 C51 Copies a cross or plus sign (2X) mdtfmd033 gtofmd050 lf1 a_d gl1 fm d 51 +153 Ma_LF_C52 C52 Counts 3 or more objects mdtlgd033 gtofmd054 lf1 a_d gl1 fm d 52 +154 Ma_LF_C53 C53 Copies a square (2X) mdtfmd034 gtofmd053 lf1 a_d gl1 fm d 53 +155 Ma_LF_C54 C54 Draws 3 or more body parts denfmd024 gtofmd052 lf1 a_d gl1 fm d 54 +156 Ma_SF_C001 Does your child smile? mdtsed001 gpasec004 sf1 __c gs1 se c 1 +157 Ma_SF_C002 When lying on his/her back, does your child move his/her arms and legs? cromoc008 gpamoc006 sf1 __c gs1 mo c 2 +158 Ma_SF_C003 Does your child look at your face when you speak to him/her? crosec002 gpasec015 sf1 __c gs1 se c 3 +159 Ma_SF_C004 Does your child cry when he/she is hungry, wet, tired, or wants to be held? gsdlac001 gpalac001 sf1 __c gs1 lg c 4 +160 Ma_SF_C005 Does your child grasp your finger if you touch her hand? gsdfmc003 gpafmc003 sf1 __c gs1 mo c 5 +161 Ma_SF_C006 Does your child look at and focus on objects in front of him/her? gsdcgc002 gpacgc002 sf1 __c gs1 cg c 6 +162 Ma_SF_C007 Does your child bring his/her hand to his/her mouth? cromoc007 gpamoc011 sf1 __c gs1 mo c 7 +163 Ma_SF_C008 Does your child try to move his/her head (or eyes) to follow an object or person? iyomoc001 gpamoc005 sf1 __c gs1 mo c 8 +164 Ma_SF_C009 Does your child smile when you smile or talk with him/her? iyosec004 gpasec010 sf1 __c gs1 se c 9 +165 Ma_SF_C010 Does your child look at a person when that person starts talking or making noise? croclc001 gpaclc007 sf1 __c gs1 lg c 10 +166 Ma_SF_C011 Does your child stop crying or calm down when you come to the room after being out of sight, or when you pick him or her up? iyosec001 gpasec016 sf1 __c gs1 se c 11 +167 Ma_SF_C012 When you talk to your child, does he/she smile, make noises, or move arms, legs or trunk in response? iyolgc002 gpalgc012 sf1 __c gs1 lg c 12 +168 Ma_SF_C013 When you are about to pick up your child, does he/she act happy or excited? iyosec002 gpasec014 sf1 __c gs1 se c 13 +169 Ma_SF_C014 Does your child turn his/her head towards your voice or some noise? iyolgc001 gpalgc021 sf1 __c gs1 lg c 14 +170 Ma_SF_C015 Does your child grasp onto a small object (e.g., your finger, a spoon) when put in his/her hand? cromoc006 gpamoc026 sf1 __c gs1 mo c 15 +171 Ma_SF_C016 Does your child make sounds other than crying? gsdlac004 gpalac009 sf1 __c gs1 lg c 16 +172 Ma_SF_C017 Does your child sometimes suck his/her thumb or fingers? crosec004 gpasec020 sf1 __c gs1 se c 17 +173 Ma_SF_C018 While your child is on his/her back, can he/she bring his/her hands together such that hands touch each other ? iyomoc002 gpamoc017 sf1 __c gs1 mo c 18 +174 Ma_SF_C019 Does your child move excitedly, kick legs, move arms or trunk, or make coo noises when a known person enters the room or speaks to them? iyosec005 gpasec025 sf1 __c gs1 se c 19 +175 Ma_SF_C020 Does your child make noise or gesture to get your attention? iyolgc005 gpalgc019 sf1 __c gs1 lg c 20 +176 Ma_SF_C021 If you play a game with your child, does he/she respond with interest? For example, if you play peek-a-boo, pat-a-cake, wave bye-bye, etc. does your child smile, widen their eyes, kick or move arms or vocalize? iyosec003 gpasec031 sf1 __c gs1 se c 21 +177 Ma_SF_C022 Does your child recognize you or other family members (e.g., smile when they enter a room or move toward them)? croclc014 gpaclc033 sf1 __c gs1 se c 22 +178 Ma_SF_C023 Does your child laugh? croclc006 gpaclc023 sf1 __c gs1 lg c 23 +179 Ma_SF_C024 Does your child smile or become excited when seeing someone familiar? crosec003 gpasec032 sf1 __c gs1 se c 24 +180 Ma_SF_C025 When your child is on his/her stomach, can he/she turn his/her head to the side? gsdgmc005 gpagmc013 sf1 __c gs1 mo c 25 +181 Ma_SF_C026 Does your child make sounds other than crying when LOOKING at toys or people? iyolgc003 gpalgc022 sf1 __c gs1 lg c 26 +182 Ma_SF_C027 Is your child interested when he/she sees other children playing? Does she or he watch, smile, or look excited? iyosec006 gpasec045 sf1 __c gs1 se c 27 +183 Ma_SF_C028 Does your child hold his/her hands in fists all the time? cromoc001 gpamoc008 sf1 __c gs1 mo c 28 +184 Ma_SF_C029 Can your child hold his/her head steady for at least a few seconds, without it flopping to the side? iyomoc004 gpamoc024 sf1 __c gs1 mo c 29 +185 Ma_SF_C030 When held in a sitting position, can the child hold his/her head steady and straight? cromoc002 gpamoc037 sf1 __c gs1 mo c 30 +186 Ma_SF_C031 When your child is on his/her stomach, can he/she hold his/her head up off the ground? gsdgmc006 gpagmc018 sf1 __c gs1 mo c 31 +187 Ma_SF_C032 Does your child show interest in new objects that are put in front of him/her by reaching out for them? croclc004 gpaclc034 sf1 __c gs1 cg c 32 +188 Ma_SF_C033 When he/she is on his/her tummy, can your child hold his/her head straight up, looking around for more than a few seconds? He/she can rest on his/her arms while doing this. iyomoc005 gpamoc029 sf1 __c gs1 mo c 33 +189 Ma_SF_C034 Can your child roll from his/her back to stomach or stomach to his/her side? gsdgmc007 gpagmc030 sf1 __c gs1 mo c 34 +190 Ma_SF_C035 Can your child reach for AND HOLD an object, at least for a few seconds? iyomoc007 gpamoc035 sf1 __c gs1 mo c 35 +191 Ma_SF_C036 Can your child eat food from your fingers or off a spoon you hold? mdtsed006 gpasec039 sf1 __c gs1 li c 36 +192 Ma_SF_C037 "Does your child make single sounds like ""buh"" or ""duh"" or ""muh""?" iyolgc004 gpalgc027 sf1 __c gs1 lg c 37 +193 Ma_SF_C038 Can your child sit with support, either leaning against something (furniture or person), or by leaning forward on his or her hands? iyomoc008 gpamoc044 sf1 __c gs1 mo c 38 +194 Ma_SF_C039 Does your child try to reach for objects that are in front of him/her by extending one or both arms? iyomoc006 gpamoc028 sf1 __c gs1 mo c 39 +195 Ma_SF_C040 Can your child pick up a small object (e.g., a small toy or small stone) using just one hand? cromoc012 gpamoc040 sf1 __c gs1 mo c 40 +196 Ma_SF_C041 When lying on his/her stomach, can your child hold his/her head and chest off the ground using only his/her hands and arms for support? cromoc005 gpamoc042 sf1 __c gs1 mo c 41 +197 Ma_SF_C042 If an object falls to the ground out of view, does your child look for it? iyomoc009 gpamoc041 sf1 __c gs1 cg c 42 +198 Ma_SF_C043 When lying on his/her back, does the child grab his/her feet? cromoc009 gpamoc043 sf1 __c gs1 mo c 43 +199 Ma_SF_C044 Can your child roll from his/her back to stomach, or stomach to back, on his/her own? cromoc010 gpamoc038 sf1 __c gs1 mo c 44 +200 Ma_SF_C045 Does your child play by tapping an object on the ground or a table? croclc007 gpaclc047 sf1 __c gs1 mo c 45 +201 Ma_SF_C046 Does the child look for an object of interest when it is removed from sight or hidden from him/her (e.g., put under a cover, behind another object)? croclc008 gpaclc046 sf1 __c gs1 cg c 46 +202 Ma_SF_C047 Can your child hold him/herself in a sitting position without help or support for longer than a few seconds? cromoc011 gpamoc049 sf1 __c gs1 mo c 47 +203 Ma_SF_C048 Does your child intentionally move or change his/her position to get objects that are out of reach? croclc011 gpaclc048 sf1 __c gs1 mo c 48 +204 Ma_SF_C049 Does your child make two similar sounds together like baba, mumu, pepe, didi (single consonant vowel combinations)? iyolgc006 gpalgc051 sf1 __c gs1 lg c 49 +205 Ma_SF_C050 When you put your child on the floor, can she lean on her hands while sitting? aqigmc012 gpagmc036 sf1 __c gs1 mo c 50 +206 Ma_SF_C051 Can your child pass a small object from one hand to the other? iyomoc012 gpamoc052 sf1 __c gs1 mo c 51 +207 Ma_SF_C052 Can your child bang objects together, or bang an object on the table or on the ground? iyomoc011 gpamoc050 sf1 __c gs1 mo c 52 +208 Ma_SF_C053 Can your child pick up small bits of food and feed him/her-self using his/her hand? mdtsed012 gpasec064 sf1 __c gs1 li c 53 +209 Ma_SF_C054 Can your child pick up and drop a small object (e.g., a small toy or small stone) into a bucket or bowl while sitting? cromoc022 gpamoc058 sf1 __c gs1 mo c 54 +210 Ma_SF_C055 Can your child maintain a standing position while holding on to a person or object (e.g., wall or furniture)? cromoc015 gpamoc054 sf1 __c gs1 mo c 55 +211 Ma_SF_C056 Can your child pick up a small object (e.g., a piece of food, small toy or small stone) with just his/her thumb and one finger? cromoc019 gpamoc053 sf1 __c gs1 mo c 56 +212 Ma_SF_C057 Can your child pull themselves up from the floor while holding onto something? For example, can they pull themselves up using a chair, a person, or some other object? iyomoc016 gpamoc056 sf1 __c gs1 mo c 57 +213 Ma_SF_C058 "Does your child stop what he/she is doing when you say ""Stop!"" even if just for a second?" crosec014 gpalgc059 sf1 __c gs1 lg c 58 +214 Ma_SF_C059 Can your child walk several steps while holding on to a person or object (e.g., wall or furniture)? cromoc018 gpamoc060 sf1 __c gs1 mo c 59 +215 Ma_SF_C060 While holding onto furniture, can your child bend down and pick up a small object from the floor and then return to a standing position? aqigmc021 gpagmc055 sf1 __c gs1 mo c 60 +216 Ma_SF_C061 While holding onto furniture, does your child squat with control (without falling or flopping down)? aqigmc020 gpagmc057 sf1 __c gs1 mo c 61 +217 Ma_SF_C062 "Does your child make a gesture to indicate ""No"" (e.g., shaking head)?" mdtlgd009 gpalgc068 sf1 __c gs1 lg c 62 +218 Ma_SF_C063 Even if your child is unable to do singing games, does he/she enjoy them and want to be a part of them? mdtsed016 gpasec082 sf1 __c gs1 se c 63 +219 Ma_SF_C064 Can your child stand up without holding onto anything, even if just for a few seconds? iyomoc020 gpamoc061 sf1 __c gs1 mo c 64 +220 Ma_SF_C065 Does your child put his/her hands out to have them washed? mdtsed013 gpasec075 sf1 __c gs1 li c 65 +221 Ma_SF_C066 Can your child maintain a standing position on his/her own, without holding on or receiving support? cromoc017 gpamoc062 sf1 __c gs1 mo c 66 +222 Ma_SF_C067 Can your child drink from an open cup without help? vinxxc007 gpaxxc074 sf1 __c gs1 li c 67 +223 Ma_SF_C068 Can your child climb onto an object (rock, porch, step, chair, bed, low table, etc.)? iyomoc022 gpamoc065 sf1 __c gs1 mo c 68 +224 Ma_SF_C069 Can your child make any light marks on paper or in dirt with a crayon or a stick? iyomoc021 gpamoc063 sf1 __c gs1 mo c 69 +225 Ma_SF_C070 Can your child bend down or squat to pick up an object from the floor and then stand up again, without help from a person or object? iyomoc023 gpamoc070 sf1 __c gs1 mo c 70 +226 Ma_SF_C071 Can your child follow a simple spoken command or direction without you making a gesture? iyolgc013 gpalgc072 sf1 __c gs1 lg c 71 +227 Ma_SF_C072 Can your child fetch something when asked? vinxxc006 gpaxxc073 sf1 __c gs1 lg c 72 +228 Ma_SF_C073 Does your child share with others (e.g., food)? mdtsed018 gpasec086 sf1 __c gs1 se c 73 +229 Ma_SF_C074 Can your child take several steps (3-5) forward without holding onto any person or object, even if they fall down immediately afterward? iyomoc024 gpamoc066 sf1 __c gs1 mo c 74 +230 Ma_SF_C075 While standing, can your child purposefully throw the ball and not just drop it? iyomoc028 gpamoc076 sf1 __c gs1 mo c 75 +231 Ma_SF_C076 Can your child stand up from sitting by himself and take several steps forward? aqigmc026 gpagmc069 sf1 __c gs1 mo c 76 +232 Ma_SF_C077 Can your child break off a piece of food and feed it to him/her-self? mdtsed021 gpasec094 sf1 __c gs1 li c 77 +233 Ma_SF_C078 Can your child make a scribble on paper, or in dirt, in a back and forth manner? For example, can he or she move the pen or pencil or stick back and forth? iyomoc025 gpamoc071 sf1 __c gs1 mo c 78 +234 Ma_SF_C079 Can your child move around by walking, rather than by crawling on his hands and knees? aqigmc027 gpagmc067 sf1 __c gs1 mo c 79 +235 Ma_SF_C080 Can your child walk well, with coordination, without falling down often? With one foot in front of the other (rather than shifting weight side to side, stiff- legged)? iyomoc027 gpamoc077 sf1 __c gs1 mo c 80 +236 Ma_SF_C081 Can your child stack at least two objects on top of each other, such as bottle tops, blocks, stones, etc.? iyomoc030 gpamoc078 sf1 __c gs1 mo c 81 +237 Ma_SF_C082 "Can your child greet people either by giving his/her hand or saying ""hello""? (use local examples of greeting)" mdtsed017 gpasec085 sf1 __c gs1 se c 82 +238 Ma_SF_C083 Can your child kick a ball or other round object forward using his/her foot? cromoc025 gpamoc079 sf1 __c gs1 mo c 83 +239 Ma_SF_C084 "Can your child say five or more separate words (e.g., names like ""Mama"" or objects like ""ball"")?" croclc023 gpaclc089 sf1 __c gs1 lg c 84 +240 Ma_SF_C085 Can your child follow directions with more than one step? For example, 'Go to the kitchen and bring me a spoon'? iyolgc017 gpalgc081 sf1 __c gs1 cg c 85 +241 Ma_SF_C086 Can your child correctly name at least one family member other than mom and dad (e.g., name of brother, sister, aunt, uncle)? croclc028 gpaclc096 sf1 __c gs1 lg c 86 +242 Ma_SF_C087 Can your child identify at least seven objects? For example, when you ask 'where is the ball/spoon/cup/cloth/door/plate/bucket etc.' does your child look at or point to (or even name) the objects? iyolgc022 gpalgc099 sf1 __c gs1 lg c 87 +243 Ma_SF_C088 Can your child ask for something (e.g., food, water) by name when he/she wants it? croclc025 gpaclc093 sf1 __c gs1 lg c 88 +244 Ma_SF_C089 Can your child run well, without falling or bumping into objects? iyomoc032 gpamoc084 sf1 __c gs1 mo c 89 +245 Ma_SF_C090 Can your child wash hands by him/herself? vinxxc048 gpaxxc092 sf1 __c gs1 li c 90 +246 Ma_SF_C091 While standing, can your child kick a ball by swinging his/her leg forward? iyomoc031 gpamoc080 sf1 __c gs1 mo c 91 +247 Ma_SF_C092 Does your child dry hands by herself/himself after you have washed them? vinxxc021 gpaxxc087 sf1 __c gs1 li c 92 +248 Ma_SF_C093 Does your child show independence (e.g., wants to go and visit a friend's house)? mdtsed023 gpasec095 sf1 __c gs1 se c 93 +249 Ma_SF_C094 If you show your child an object he/she knows well (e.g., a cup or animal), can he/she consistently name it? croclc034 gpaclc101 sf1 __c gs1 lg c 94 +250 Ma_SF_C095 Can your child stack three or more small objects (e.g., blocks, cups, bottle caps) on top of each other? cromoc029 gpamoc083 sf1 __c gs1 mo c 95 +251 Ma_SF_C096 Can your child walk on an uneven surface (e.g., a bumpy or steep road) without falling? cromoc031 gpamoc097 sf1 __c gs1 mo c 96 +252 Ma_SF_C097 Does your child usually communicate with words what he/she wants in a way that is understandable to others? iyolgc023 gpalgc102 sf1 __c gs1 lg c 97 +253 Ma_SF_C098 "Can your child say ten or more words in addition to ""Mama"" and ""Dada""?" aqicmc033 gpacmc090 sf1 __c gs1 lg c 98 +254 Ma_SF_C099 "When looking at pictures, if you say to your child ""what is this?"", can they say the name of the object that you point to?" iyolgc021 gpalgc098 sf1 __c gs1 lg c 99 +255 Ma_SF_C100 Can your child speak using short sentences of two words that go together (e.g., 'Mama go' or 'Dada eat'? croclc024 gpaclc091 sf1 __c gs1 lg c 100 +256 Ma_SF_C101 Can your child unscrew the lid from a bottle or jar? cromoc033 gpamoc110 sf1 __c gs1 mo c 101 +257 Ma_SF_C102 Does your child help out around the house with simple chores, even if he/she doesn't do them well? (use local examples of chores) mdtsed029 gpasec130 sf1 __c gs1 se c 102 +258 Ma_SF_C103 Is your child able to go poo or pee without having accidents (wetting or soiling themselves)? mdtsed019 gpasec088 sf1 __c gs1 li c 103 +259 Ma_SF_C104 "Can your child speak using sentences of three or more words that go together (e.g., ""I want water"" or ""The house is big"")?" croclc029 gpaclc112 sf1 __c gs1 lg c 104 +260 Ma_SF_C105 Can your child name at least two body parts (e.g., arm, eye, or nose)? croclc038 gpaclc100 sf1 __c gs1 lg c 105 +261 Ma_SF_C106 Can your child remove an item of clothing (e.g., take off his/her shirt)? cromoc035 gpamoc104 sf1 __c gs1 li c 106 +262 Ma_SF_C107 "Can your child say 15 or more separate words (e.g., names like ""Mama"" or objects like ""ball"")?" croclc027 gpaclc105 sf1 __c gs1 lg c 107 +263 Ma_SF_C108 Can your child jump with both feet leaving the ground? cromoc034 gpamoc106 sf1 __c gs1 mo c 108 +264 Ma_SF_C109 Can your child tell you or someone familiar his/her own name [nickname] when asked to? croclc032 gpaclc108 sf1 __c gs1 lg c 109 +265 Ma_SF_C110 "Can your child correctly ask questions using any of the words ""what"", ""which"", ""where"", or ""who""?" croclc042 gpaclc115 sf1 __c gs1 lg c 110 +266 Ma_SF_C111 Does your child show respect around elders? mdtsed032 gpasec137 sf1 __c gs1 se c 111 +267 Ma_SF_C112 "Can your child correctly use any of the words ""I,"" ""you,"" ""she,"" or ""he"" (e.g., ""I go to store,"" or ""He eats rice"")?" croclc031 gpaclc113 sf1 __c gs1 lg c 112 +268 Ma_SF_C113 Can your child sing a short song or repeat parts of a rhyme from memory by him/herself? croclc037 gpaclc107 sf1 __c gs1 lg c 113 +269 Ma_SF_C114 "Does your child know the difference between the words ""big"" and ""small""? For example, if you ask, ""Give me the big spoon"" can your child understand which one to give if there are two different sizes?" iyolgc026 gpalgc111 sf1 __c gs1 cg c 114 +270 Ma_SF_C115 Does your child pronounce most of his/her words correctly? croclc046 gpaclc116 sf1 __c gs1 lg c 115 +271 Ma_SF_C116 Can your child go to the toilet by him/her-self? mdtsed033 gpasec134 sf1 __c gs1 li c 116 +272 Ma_SF_C117 "If you point to an object, can your child correctly use the words ""on,"" ""in,"" or ""under"" to describe where it is (e.g., ""The cup is on the table"" instead of ""The cup is in the table."")" croclc049 gpaclc120 sf1 __c gs1 lg c 117 +273 Ma_SF_C118 Can your child put on at least one piece of clothing by himself? mdtsed026 gpasec109 sf1 __c gs1 li c 118 +274 Ma_SF_C119 Can your child explain in words what common objects like a cup or chair are used for? croclc039 gpaclc119 sf1 __c gs1 lg c 119 +275 Ma_SF_C120 Can your child draw a straight line? iyomoc037 gpamoc103 sf1 __c gs1 mo c 120 +276 Ma_SF_C121 "Can your child say what he/she likes or dislikes (e.g., ""I like sweets"")?" crosec042 gpasec114 sf1 __c gs1 lg c 121 +277 Ma_SF_C122 If you show your child two objects or people of different size, can he/she tell you which one is the big one and which is the small one? croclc035 gpaclc117 sf1 __c gs1 cg c 122 +278 Ma_SF_C123 "Does your child regularly use describing words such as ""fast,"" ""short,"" ""hot,"" ""fat,"" or ""beautiful"" correctly?" croclc050 gpaclc121 sf1 __c gs1 lg c 123 +279 Ma_SF_C124 Does your child know to keep quiet when the situation requires it? (e.g., at ceremonies, when someone is asleep) mdtsed028 gpasec123 sf1 __c gs1 se c 124 +280 Ma_SF_C125 "Does your child ask ""why"" questions (e.g., ""Why are you tall?"")?" croclc051 gpaclc124 sf1 __c gs1 lg c 125 +281 Ma_SF_C126 Can your child stand on one foot WITHOUT any support for at least a few seconds? iyomoc039 gpamoc135 sf1 __c gs1 mo c 126 +282 Ma_SF_C127 If you ask your child to give you three objects (e.g., stones, beans), does the child give you the correct amount? croclc043 gpaclc126 sf1 __c gs1 cg c 127 +283 Ma_SF_C128 Does your child understand the term 'longest'? For example, if you ask him/her to choose 'which is the longest of 3 objects?' (e.g. 3 spoons or sticks), would he/she be able to choose the longest? iyolgc029 gpalgc131 sf1 __c gs1 cg c 128 +284 Ma_SF_C129 "Can your child talk about things that have happened in the past using correct language (e.g., ""Yesterday I played with my friend"" or ""Last week she went to the market"")?" croclc045 gpaclc138 sf1 __c gs1 lg c 129 +285 Ma_SF_C130 Can your child tell a story? iyolgc030 gpalgc127 sf1 __c gs1 lg c 130 +286 Ma_SF_C131 Can your child tell you when he/she is happy, angry, or sad? crosec049 gpasec125 sf1 __c gs1 se c 131 +287 Ma_SF_C132 Can the child name at least one color (e.g., red, blue, yellow)? croclc044 gpaclc122 sf1 __c gs1 cg c 132 +288 Ma_SF_C133 Can your child count objects up to five (e.g., fingers, people)? croclc041 gpaclc118 sf1 __c gs1 cg c 133 +289 Ma_SF_C134 If you draw a circle can your child do it, just as you did? iyomoc038 gpamoc133 sf1 __c gs1 mo c 134 +290 Ma_SF_C135 Can your child tell you when others are happy, angry, or sad? crosec059 gpasec128 sf1 __c gs1 se c 135 +291 Ma_SF_C136 "Can your child talk about things that will happen in the future using correct language (e.g., ""Tomorrow he will attend school"" or ""Next week we will go to the market"")?" croclc048 gpaclc139 sf1 __c gs1 lg c 136 +292 Ma_SF_C137 Can the child fasten and unfasten buttons without help? cromoc039 gpamoc132 sf1 __c gs1 mo c 137 +293 Ma_SF_C138 Can your child dress him/herself completely (except for shoelaces, buttons and zippers)? iyomoc040 gpamoc129 sf1 __c gs1 li c 138 +294 Ma_SF_C139 "Can your child say what others like or dislike (e.g., ""Mama doesn't like fruit,"" ""Papa likes football"")?" crosec051 gpasec136 sf1 __c gs1 se c 139 \ No newline at end of file diff --git a/data-raw/data/itemtable_20221201.txt b/data-raw/data/itemtable_20221201.txt index 7e5a684f..a6da7144 100644 --- a/data-raw/data/itemtable_20221201.txt +++ b/data-raw/data/itemtable_20221201.txt @@ -1753,7 +1753,7 @@ gpaclc034 Does your child show interest in new objects that are put in front of gpaclc046 Does the child look for an object of interest when it is removed from sight or hidden from him/her (e.g., put under a cover, behind another object)? gpaclc047 Does your child play by tapping an object on the ground or a table? gpaclc048 Does your child intentionally move or change his/her position to get objects that are out of reach? -gpaclc088 Can your child say five or more separate words (e.g., names like 'Mama' or objects like 'ball')? +gpaclc089 Can your child say five or more separate words (e.g., names like 'Mama' or objects like 'ball')? gpaclc091 Can your child speak using short sentences of two words that go together (e.g., 'Mama go' or 'Dada eat'? gpaclc093 Can your child ask for something (e.g., food, water) by name when he/she wants it? gpaclc096 Can your child correctly name at least one family member other than mom and dad (e.g., name of brother, sister, aunt, uncle)? @@ -1868,7 +1868,7 @@ gpasec075 Does your child put his/her hands out to have them washed? gpasec082 Even if your child is unable to do singing games, does he/she enjoy them and want to be a part of them? gpasec085 Can your child greet people either by giving his/her hand or saying Hello? gpasec086 Does your child share with others (e.g., food)? -gpasec089 Is your child able to go poo or pee without having accidents (wetting or soiling themselves)? +gpasec088 Is your child able to go poo or pee without having accidents (wetting or soiling themselves)? gpasec094 Can your child break off pieces of food and feed them to him/her-self? gpasec095 Does your child show independence (e.g., wants to go and visit a friends house)? gpasec109 Can your child put on at least one piece of clothing by himself? @@ -3045,7 +3045,7 @@ rapclc037 Does your child show interest in new objects that are put in front of rapclc044 Does your child play by tapping an object on the ground or a table? rapclc046 Does your child intentionally move or change his/her position to get objects that are out of reach? rapclc052 Does the child look for an object of interest when it is removed from sight or hidden from him/her? -rapclc088 Can your child say five or more separate words? +rapclc089 Can your child say five or more separate words? rapclc091 Can your child speak using short sentences of two words that go together? rapclc093 Can your child ask for something by name when he/she wants it? rapclc096 Can your child correctly name at least one family member other than mom and dad? diff --git a/data-raw/data/keys/293_0.txt b/data-raw/data/keys/293_0.txt index e8f07254..c9fbfa0d 100644 --- a/data-raw/data/keys/293_0.txt +++ b/data-raw/data/keys/293_0.txt @@ -85,8 +85,8 @@ key item tau 293_0 gpasec085 52.79 293_0 gpasec086 49.84 293_0 gpaxxc087 57.19 -293_0 gpaclc088 53.97 -293_0 gpasec089 63.17 +293_0 gpasec088 63.17 +293_0 gpaclc089 53.97 293_0 gpacmc090 60.22 293_0 gpaclc091 60.86 293_0 gpaxxc092 56.72 diff --git a/data-raw/data/keys/294_0.txt b/data-raw/data/keys/294_0.txt index 6103435f..1fd51a2c 100644 --- a/data-raw/data/keys/294_0.txt +++ b/data-raw/data/keys/294_0.txt @@ -7,7 +7,7 @@ key item tau 294_0 gpaclc046 33.46 294_0 gpaclc047 33.39 294_0 gpaclc048 34.47 -294_0 gpaclc088 53.7 +294_0 gpaclc089 53.7 294_0 gpaclc091 60.45 294_0 gpaclc093 55.77 294_0 gpaclc096 55.69 @@ -122,7 +122,7 @@ key item tau 294_0 gpasec082 45.57 294_0 gpasec085 52.51 294_0 gpasec086 49.62 -294_0 gpasec089 62.7 +294_0 gpasec088 62.7 294_0 gpasec094 49.68 294_0 gpasec095 56.85 294_0 gpasec109 67.15 diff --git a/data-raw/data/keys/ecd294_0.txt b/data-raw/data/keys/294_0_ecd.txt similarity index 100% rename from data-raw/data/keys/ecd294_0.txt rename to data-raw/data/keys/294_0_ecd.txt diff --git a/data-raw/data/keys/by3_extension_gsed_key.txt b/data-raw/data/keys/by3_extension_gsed_key.txt new file mode 100644 index 00000000..ac75d967 --- /dev/null +++ b/data-raw/data/keys/by3_extension_gsed_key.txt @@ -0,0 +1,173 @@ +key item tau +extends 293_0 by3cgd006 12.98 +extends 293_0 by3cgd007 18.15 +extends 293_0 by3cgd008 19.49 +extends 293_0 by3cgd009 19.62 +extends 293_0 by3cgd010 23.97 +extends 293_0 by3cgd016 22.24 +extends 293_0 by3cgd023 27.32 +extends 293_0 by3cgd024 33.79 +extends 293_0 by3cgd025 28.75 +extends 293_0 by3cgd026 29.64 +extends 293_0 by3cgd027 33.18 +extends 293_0 by3cgd032 34.83 +extends 293_0 by3cgd033 38.29 +extends 293_0 by3cgd034 39.21 +extends 293_0 by3cgd035 43.51 +extends 293_0 by3cgd036 41.91 +extends 293_0 by3cgd039 51.77 +extends 293_0 by3cgd040 49.29 +extends 293_0 by3cgd042 48.45 +extends 293_0 by3cgd043 53.12 +extends 293_0 by3cgd044 54.01 +extends 293_0 by3cgd046 58.93 +extends 293_0 by3cgd047 49.73 +extends 293_0 by3cgd051 56.67 +extends 293_0 by3cgd052 59.03 +extends 293_0 by3cgd055 53.52 +extends 293_0 by3cgd056 65.87 +extends 293_0 by3cgd058 63.46 +extends 293_0 by3cgd059 63.15 +extends 293_0 by3cgd060 69.79 +extends 293_0 by3cgd061 66.61 +extends 293_0 by3cgd062 64.29 +extends 293_0 by3cgd063 68.75 +extends 293_0 by3cgd064 69.56 +extends 293_0 by3cgd065 71.13 +extends 293_0 by3cgd066 72.74 +extends 293_0 by3cgd067 72.53 +extends 293_0 by3cgd068 84.21 +extends 293_0 by3cgd069 76.01 +extends 293_0 by3cgd073 79.68 +extends 293_0 by3cgd074 79.91 +extends 293_0 by3cgd078 89.58 +extends 293_0 by3cgd079 88.41 +extends 293_0 by3cgd080 92.82 +extends 293_0 by3exd003 14.08 +extends 293_0 by3exd004 17.31 +extends 293_0 by3exd014 49.94 +extends 293_0 by3exd015 47.01 +extends 293_0 by3exd018 55.76 +extends 293_0 by3exd020 60.44 +extends 293_0 by3exd021 59.71 +extends 293_0 by3exd022 61.13 +extends 293_0 by3exd023 65.86 +extends 293_0 by3exd024 61.77 +extends 293_0 by3exd025 67.73 +extends 293_0 by3exd027 67.08 +extends 293_0 by3exd029 72.5 +extends 293_0 by3exd030 72.29 +extends 293_0 by3exd031 72.77 +extends 293_0 by3exd032 77.02 +extends 293_0 by3exd034 78.86 +extends 293_0 by3exd035 78.63 +extends 293_0 by3exd037 83.3 +extends 293_0 by3exd038 86.33 +extends 293_0 by3exd039 82.48 +extends 293_0 by3exd040 82.22 +extends 293_0 by3exd041 96.61 +extends 293_0 by3exd042 85.38 +extends 293_0 by3exd043 87.33 +extends 293_0 by3exd045 86.64 +extends 293_0 by3fmd007 26.59 +extends 293_0 by3fmd011 24.08 +extends 293_0 by3fmd012 24.32 +extends 293_0 by3fmd013 27.25 +extends 293_0 by3fmd014 27.42 +extends 293_0 by3fmd015 27.25 +extends 293_0 by3fmd017 30.33 +extends 293_0 by3fmd018 33.51 +extends 293_0 by3fmd020 33.12 +extends 293_0 by3fmd022 38.1 +extends 293_0 by3fmd024 37.13 +extends 293_0 by3fmd026 40.14 +extends 293_0 by3fmd027 48.61 +extends 293_0 by3fmd028 44.24 +extends 293_0 by3fmd029 48.8 +extends 293_0 by3fmd030 47.69 +extends 293_0 by3fmd031 54.19 +extends 293_0 by3fmd032 53.53 +extends 293_0 by3fmd033 58.93 +extends 293_0 by3fmd035 53.39 +extends 293_0 by3fmd036 58.46 +extends 293_0 by3fmd038 65.59 +extends 293_0 by3fmd040 72.09 +extends 293_0 by3fmd041 73.5 +extends 293_0 by3fmd042 73.21 +extends 293_0 by3fmd043 74.93 +extends 293_0 by3fmd044 72.88 +extends 293_0 by3fmd045 71.64 +extends 293_0 by3fmd046 78.73 +extends 293_0 by3fmd049 80.83 +extends 293_0 by3fmd050 79.16 +extends 293_0 by3fmd051 86.04 +extends 293_0 by3fmd052 78.99 +extends 293_0 by3fmd053 85.74 +extends 293_0 by3fmd054 75.87 +extends 293_0 by3fmd055 92.33 +extends 293_0 by3fmd057 86.47 +extends 293_0 by3fmd061 92.14 +extends 293_0 by3gmd005 19.7 +extends 293_0 by3gmd007 21.19 +extends 293_0 by3gmd009 19.21 +extends 293_0 by3gmd012 19.65 +extends 293_0 by3gmd015 24.56 +extends 293_0 by3gmd016 23.06 +extends 293_0 by3gmd017 24.93 +extends 293_0 by3gmd018 32.84 +extends 293_0 by3gmd019 26.5 +extends 293_0 by3gmd021 30.69 +extends 293_0 by3gmd022 27.81 +extends 293_0 by3gmd026 30.4 +extends 293_0 by3gmd027 31.8 +extends 293_0 by3gmd028 33.67 +extends 293_0 by3gmd030 38.02 +extends 293_0 by3gmd031 38.27 +extends 293_0 by3gmd032 39.31 +extends 293_0 by3gmd033 42.06 +extends 293_0 by3gmd034 39.33 +extends 293_0 by3gmd035 40.31 +extends 293_0 by3gmd036 43.08 +extends 293_0 by3gmd037 42.57 +extends 293_0 by3gmd038 44.49 +extends 293_0 by3gmd039 42.3 +extends 293_0 by3gmd040 46.45 +extends 293_0 by3gmd041 49.65 +extends 293_0 by3gmd042 49.21 +extends 293_0 by3gmd043 50.87 +extends 293_0 by3gmd044 50.37 +extends 293_0 by3gmd045 49.22 +extends 293_0 by3gmd046 51.83 +extends 293_0 by3gmd047 54.24 +extends 293_0 by3gmd048 58.1 +extends 293_0 by3gmd049 56.5 +extends 293_0 by3gmd050 57.12 +extends 293_0 by3gmd051 60.86 +extends 293_0 by3gmd052 61.93 +extends 293_0 by3gmd058 71.25 +extends 293_0 by3gmd059 74.66 +extends 293_0 by3gmd060 74.61 +extends 293_0 by3gmd063 74.49 +extends 293_0 by3red006 19.24 +extends 293_0 by3red007 22.8 +extends 293_0 by3red008 25.95 +extends 293_0 by3red015 50.04 +extends 293_0 by3red016 55.82 +extends 293_0 by3red017 53.17 +extends 293_0 by3red019 57.13 +extends 293_0 by3red020 58.26 +extends 293_0 by3red021 57.52 +extends 293_0 by3red022 61.38 +extends 293_0 by3red023 62.3 +extends 293_0 by3red024 62.33 +extends 293_0 by3red025 64.95 +extends 293_0 by3red026 68.01 +extends 293_0 by3red027 74.27 +extends 293_0 by3red028 74 +extends 293_0 by3red029 73.38 +extends 293_0 by3red030 72.89 +extends 293_0 by3red031 76 +extends 293_0 by3red035 93.36 +extends 293_0 by3red036 79.51 +extends 293_0 by3red038 84.28 +extends 293_0 by3red039 87.89 diff --git a/data-raw/data/keys/gsed1912_mul.txt b/data-raw/data/keys/gsed1912_mul.txt new file mode 100644 index 00000000..c7def25b --- /dev/null +++ b/data-raw/data/keys/gsed1912_mul.txt @@ -0,0 +1,139 @@ +key item tau +gsed1912 mulcgd010 29.5 +gsed1912 mulcgd020 29.24 +gsed1912 mulcgd040 33.5 +gsed1912 mulcgd070 38.31 +gsed1912 mulcgd090 42.89 +gsed1912 mulcgd091 47.21 +gsed1912 mulcgd110 46.68 +gsed1912 mulcgd120 47.84 +gsed1912 mulcgd160 52.68 +gsed1912 mulcgd161 56.25 +gsed1912 mulcgd163 61.49 +gsed1912 mulcgd200 63.63 +gsed1912 mulcgd210 64.69 +gsed1912 mulcgd220 68.89 +gsed1912 mulcgd230 65.29 +gsed1912 mulcgd240 68.66 +gsed1912 mulcgd250 67.84 +gsed1912 mulcgd270 71.1 +gsed1912 mulcgd280 72.07 +gsed1912 mulcgd290 69.28 +gsed1912 mulcgd291 70.53 +gsed1912 mulcgd300 71.56 +gsed1912 mulcgd301 73.28 +gsed1912 mulcgd302 74.44 +gsed1912 mulcgd310 76.16 +gsed1912 mulcgd320 74.09 +gsed1912 mulcgd321 75.68 +gsed1912 mulcgd330 74.48 +gsed1912 mulcgd331 76.07 +gsed1912 mulexd080 48.35 +gsed1912 mulexd110 47.19 +gsed1912 mulexd111 50.78 +gsed1912 mulexd112 55.36 +gsed1912 mulexd130 51.77 +gsed1912 mulexd140 57.15 +gsed1912 mulexd150 57.56 +gsed1912 mulexd151 63.94 +gsed1912 mulexd152 67.83 +gsed1912 mulexd160 60.53 +gsed1912 mulexd170 60.22 +gsed1912 mulexd181 68.44 +gsed1912 mulexd182 70.28 +gsed1912 mulexd183 72.56 +gsed1912 mulexd201 66.62 +gsed1912 mulexd210 65.5 +gsed1912 mulexd220 65.07 +gsed1912 mulexd230 70.04 +gsed1912 mulexd240 72.93 +gsed1912 mulexd241 73.56 +gsed1912 mulexd242 74.3 +gsed1912 mulexd243 75.75 +gsed1912 mulexd244 77.75 +gsed1912 mulexd250 70.87 +gsed1912 mulexd260 75 +gsed1912 mulexd261 76.47 +gsed1912 mulexd262 77.08 +gsed1912 mulexd270 76.01 +gsed1912 mulexd271 77.03 +gsed1912 mulexd272 78.17 +gsed1912 mulexd280 77.6 +gsed1912 mulfmd070 37.5 +gsed1912 mulfmd080 43.79 +gsed1912 mulfmd090 41.59 +gsed1912 mulfmd100 43.35 +gsed1912 mulfmd101 48.19 +gsed1912 mulfmd120 46.05 +gsed1912 mulfmd121 52.24 +gsed1912 mulfmd130 43.67 +gsed1912 mulfmd140 48.85 +gsed1912 mulfmd150 52.22 +gsed1912 mulfmd160 54.08 +gsed1912 mulfmd161 62.47 +gsed1912 mulfmd170 58.74 +gsed1912 mulfmd181 70.43 +gsed1912 mulfmd200 67.93 +gsed1912 mulfmd210 69.87 +gsed1912 mulfmd220 72.11 +gsed1912 mulfmd221 75.59 +gsed1912 mulfmd230 72.27 +gsed1912 mulfmd231 75 +gsed1912 mulfmd240 68.76 +gsed1912 mulfmd260 73.97 +gsed1912 mulfmd261 75.8 +gsed1912 mulfmd270 74.26 +gsed1912 mulfmd280 77.58 +gsed1912 mulfmd300 76.33 +gsed1912 mulfmd301 77.4 +gsed1912 mulfmd302 78.28 +gsed1912 mulgmd070 35.23 +gsed1912 mulgmd090 38.28 +gsed1912 mulgmd110 39.81 +gsed1912 mulgmd120 45.67 +gsed1912 mulgmd130 44.19 +gsed1912 mulgmd140 49.13 +gsed1912 mulgmd150 49.12 +gsed1912 mulgmd160 50.79 +gsed1912 mulgmd170 51.9 +gsed1912 mulgmd180 50.67 +gsed1912 mulgmd190 50.06 +gsed1912 mulgmd200 53.39 +gsed1912 mulgmd210 53.72 +gsed1912 mulgmd240 61.71 +gsed1912 mulgmd270 64.47 +gsed1912 mulgmd280 67.17 +gsed1912 mulgmd290 69.37 +gsed1912 mulgmd300 70.22 +gsed1912 mulgmd320 68.18 +gsed1912 mulred040 32.02 +gsed1912 mulred060 32.57 +gsed1912 mulred110 48.38 +gsed1912 mulred150 51.83 +gsed1912 mulred160 57.72 +gsed1912 mulred180 56.78 +gsed1912 mulred181 60.05 +gsed1912 mulred182 61.55 +gsed1912 mulred190 56.16 +gsed1912 mulred200 59.29 +gsed1912 mulred223 75.26 +gsed1912 mulred230 61.06 +gsed1912 mulred231 63.83 +gsed1912 mulred240 64.58 +gsed1912 mulred250 67.37 +gsed1912 mulred260 68.3 +gsed1912 mulred270 73.83 +gsed1912 mulred280 68.41 +gsed1912 mulred290 71.14 +gsed1912 mulred291 72.88 +gsed1912 mulred292 74.35 +gsed1912 mulred293 76.27 +gsed1912 mulred300 75.58 +gsed1912 mulred301 76.07 +gsed1912 mulred302 76.89 +gsed1912 mulred303 77.43 +gsed1912 mulred304 78.87 +gsed1912 mulred320 76.89 +gsed1912 mulred321 78.12 +gsed1912 mulred330 76.21 +gsed1912 mulred331 78.31 diff --git a/data-raw/data/keys/ecd2206.txt b/data-raw/data/keys/gsed2206_ecd.txt similarity index 100% rename from data-raw/data/keys/ecd2206.txt rename to data-raw/data/keys/gsed2206_ecd.txt diff --git a/data-raw/data/keys/ecd2208.txt b/data-raw/data/keys/gsed2208_ecd.txt similarity index 100% rename from data-raw/data/keys/ecd2208.txt rename to data-raw/data/keys/gsed2208_ecd.txt diff --git a/data-raw/data/keys/items_sf.txt b/data-raw/data/keys/gsed2208_gs1_gs2.txt similarity index 100% rename from data-raw/data/keys/items_sf.txt rename to data-raw/data/keys/gsed2208_gs1_gs2.txt diff --git a/data-raw/data/keys/gsed2212_gh1.txt b/data-raw/data/keys/gsed2212_gh1.txt new file mode 100644 index 00000000..d0b3d87b --- /dev/null +++ b/data-raw/data/keys/gsed2212_gh1.txt @@ -0,0 +1,56 @@ +key item tau +gsed2212 gh1sec001 1.1 +gsed2212 gh1sec002 3.6 +gsed2212 gh1lgc003 4.57 +gsed2212 gh1cgc004 6.9 +gsed2212 gh1moc005 7.47 +gsed2212 gh1sec006 8.26 +gsed2212 gh1lgc007 8.32 +gsed2212 gh1lgc008 9.3 +gsed2212 gh1sec009 10.86 +gsed2212 gh1lgc010 12.61 +gsed2212 gh1sec011 15.39 +gsed2212 gh1moc012 15.66 +gsed2212 gh1lgc013 16.03 +gsed2212 gh1sec014 16.04 +gsed2212 gh1sec015 17.39 +gsed2212 gh1lgc016 17.42 +gsed2212 gh1sec017 17.81 +gsed2212 gh1sec018 20.2 +gsed2212 gh1moc019 21.12 +gsed2212 gh1moc020 23.05 +gsed2212 gh1cgc021 25.64 +gsed2212 gh1moc022 26.7 +gsed2212 gh1lic023 28.54 +gsed2212 gh1moc024 28.69 +gsed2212 gh1moc025 28.92 +gsed2212 gh1moc026 29.53 +gsed2212 gh1moc027 30.2 +gsed2212 gh1cgc028 31.41 +gsed2212 gh1moc029 31.59 +gsed2212 gh1lic030 35.45 +gsed2212 gh1moc031 37.43 +gsed2212 gh1moc032 37.63 +gsed2212 gh1moc033 40.1 +gsed2212 gh1lgc034 41.17 +gsed2212 gh1moc035 42.33 +gsed2212 gh1lgc036 44.73 +gsed2212 gh1moc037 46.34 +gsed2212 gh1lic038 47.23 +gsed2212 gh1moc039 47.58 +gsed2212 gh1moc040 48.06 +gsed2212 gh1moc041 48.78 +gsed2212 gh1lgc042 49.34 +gsed2212 gh1sec043 49.84 +gsed2212 gh1moc044 50.23 +gsed2212 gh1moc045 50.6 +gsed2212 gh1moc046 51.66 +gsed2212 gh1lgc047 53.97 +gsed2212 gh1lgc048 56.1 +gsed2212 gh1moc049 56.68 +gsed2212 gh1lic050 56.72 +gsed2212 gh1lgc051 57.49 +gsed2212 gh1lgc052 60.22 +gsed2212 gh1lgc053 63.18 +gsed2212 gh1moc054 64.14 +gsed2212 gh1lgc055 65.72 diff --git a/data-raw/data/keys/gsed2212_gs1_gl1.txt b/data-raw/data/keys/gsed2212_gs1_gl1.txt new file mode 100644 index 00000000..63538d2f --- /dev/null +++ b/data-raw/data/keys/gsed2212_gs1_gl1.txt @@ -0,0 +1,295 @@ +key item tau label instrument domain mode number +gsed2212 gs1sec001 1.1 Does your child smile? gs1 se c 001 +gsed2212 gs1moc002 3.22 When lying on his/her back, does your child move his/her arms and legs? gs1 mo c 002 +gsed2212 gs1sec003 3.6 Does your child look at your face when you speak to him/her? gs1 se c 003 +gsed2212 gs1lgc004 4.57 Does your child cry when he/she is hungry, wet, tired, or wants to be held? gs1 lg c 004 +gsed2212 gs1moc005 5.77 Does your child grasp your finger if you touch her hand? gs1 mo c 005 +gsed2212 gs1cgc006 6.9 Does your child look at and focus on objects in front of him/her? gs1 cg c 006 +gsed2212 gs1moc007 7.47 Does your child bring his/her hand to his/her mouth? gs1 mo c 007 +gsed2212 gs1moc008 8.14 Does your child try to move his/her head (or eyes) to follow an object or person? gs1 mo c 008 +gsed2212 gs1sec009 8.26 Does your child smile when you smile or talk with him/her? gs1 se c 009 +gsed2212 gs1lgc010 8.32 Does your child look at a person when that person starts talking or making noise? gs1 lg c 010 +gsed2212 gs1sec011 8.88 Does your child stop crying or calm down when you come to the room after being out of sight, or when you pick him or her up? gs1 se c 011 +gsed2212 gs1lgc012 9.3 When you talk to your child, does he/she smile, make noises, or move arms, legs or trunk in response? gs1 lg c 012 +gsed2212 gs1sec013 10.86 When you are about to pick up your child, does he/she act happy or excited? gs1 se c 013 +gsed2212 gs1lgc014 12.61 Does your child turn his/her head towards your voice or some noise? gs1 lg c 014 +gsed2212 gs1moc015 13.24 Does your child grasp onto a small object (e.g., your finger, a spoon) when put in his/her hand? gs1 mo c 015 +gsed2212 gs1lgc016 15.25 Does your child make sounds other than crying? gs1 lg c 016 +gsed2212 gs1sec017 15.39 Does your child sometimes suck his/her thumb or fingers? gs1 se c 017 +gsed2212 gs1moc018 15.66 While your child is on his/her back, can he/she bring his/her hands together? gs1 mo c 018 +gsed2212 gs1sec019 16.04 Does your child move excitedly, kick legs, move arms or trunk, or make coo noises when a known person enters the room or speaks to them? gs1 se c 019 +gsed2212 gs1lgc020 16.03 Does your child make noise or gesture to get your attention? gs1 lg c 020 +gsed2212 gs1sec021 16.98 If you play a game with your child, does he/she respond with interest? For example, if you play peek-a-boo, pat-a-cake, wave bye-bye, etc. does your child smile, widen their eyes, kick or move arms or vocalize? gs1 se c 021 +gsed2212 gs1sec022 17.39 Does your child recognize you or other family members (e.g., smile when they enter a room or move toward them)? gs1 se c 022 +gsed2212 gs1lgc023 17.42 Does your child laugh? gs1 lg c 023 +gsed2212 gs1sec024 17.81 Does your child smile or become excited when seeing someone familiar? gs1 se c 024 +gsed2212 gs1moc025 18.65 When your child is on his/her stomach, can he/she turn his/her head to the side? gs1 mo c 025 +gsed2212 gs1lgc026 18.79 Does your child make sounds when LOOKING at toys or people (not crying)? gs1 lg c 026 +gsed2212 gs1sec027 20.2 Is your child interested when he/she sees other children playing? Does she or he watch, smile, or look excited? gs1 se c 027 +gsed2212 gs1moc028 NA Does your child hold his/her hands in fists all the time? gs1 mo c 028 +gsed2212 gs1moc029 21.12 Can your child hold his/her head steady for at least a few seconds, without it flopping to the side? gs1 mo c 029 +gsed2212 gs1moc030 23.05 When held in a sitting position, can the child hold his/her head steady and straight? gs1 mo c 030 +gsed2212 gs1moc031 23.41 When your child is on his/her stomach, can he/she hold his/her head up off the ground? gs1 mo c 031 +gsed2212 gs1cgc032 25.64 Does your child show interest in new objects that are put in front of him/her by reaching out for them? gs1 cg c 032 +gsed2212 gs1moc033 26.7 When he/she is on his/her tummy, can your child hold his/her head straight up, looking around for more than a few seconds? He/she can rest on his/her arms while doing this. gs1 mo c 033 +gsed2212 gs1moc034 27.52 Can your child roll from his/her back to stomach or stomach to his/her side? gs1 mo c 034 +gsed2212 gs1moc035 28.36 Can your child reach for AND HOLD an object, at least for a few seconds? gs1 mo c 035 +gsed2212 gs1lic036 28.54 Can your child eat food from your fingers or off a spoon you hold? gs1 li c 036 +gsed2212 gs1lgc037 28.43 Does your child make single sounds like 'buh' or 'duh' or 'muh'? gs1 lg c 037 +gsed2212 gs1moc038 28.92 Can your child sit with support, either leaning against something (furniture or person), or by leaning forward on his or her hands? gs1 mo c 038 +gsed2212 gs1moc039 28.69 Does your child try to reach for objects that are in front of him/her by extending one or both arms? gs1 mo c 039 +gsed2212 gs1moc040 28.89 Can your child pick up a small object (e.g., a small toy or small stone) using just one hand? gs1 mo c 040 +gsed2212 gs1moc041 29.53 When lying on his/her stomach, can your child hold his/her head and chest off the ground using only his/her hands and arms for support? gs1 mo c 041 +gsed2212 gs1cgc042 29.66 If an object falls to the ground out of view, does your child look for it? gs1 cg c 042 +gsed2212 gs1moc043 30.2 When lying on his/her back, does the child grab his/her feet? gs1 mo c 043 +gsed2212 gs1moc044 30.14 Can your child roll from his/her back to stomach, or stomach to back, on his/her own? gs1 mo c 044 +gsed2212 gs1moc045 31.35 Does your child play by tapping an object on the ground or a table? gs1 mo c 045 +gsed2212 gs1cgc046 31.41 Does the child look for an object of interest when it is removed from sight or hidden from him/her (e.g., put under a cover, behind another object)? gs1 cg c 046 +gsed2212 gs1moc047 31.59 Can your child hold him/herself in a sitting position without help or support for longer than a few seconds? gs1 mo c 047 +gsed2212 gs1moc048 32.53 Does your child intentionally move or change his/her position to get objects that are out of reach? gs1 mo c 048 +gsed2212 gs1lgc049 32.63 Does your child make two similar sounds together like baba, mumu, pepe, didi (single consonant vowel combinations)? gs1 lg c 049 +gsed2212 gs1moc050 32.59 When you put your child on the floor, can she lean on her hands while sitting? (If she already sits up straight without leaning on her hands, mark 'yes' for this item.). gs1 mo c 050 +gsed2212 gs1moc051 34.68 Can your child pass a small object from one hand to the other? gs1 mo c 051 +gsed2212 gs1moc052 36.65 Can your child bang objects together, or bang an object on the table or on the ground? gs1 mo c 052 +gsed2212 gs1lic053 35.45 Can your child pick up small bits of food and feed him/her-self using his/her hand? gs1 li c 053 +gsed2212 gs1moc054 37.63 Can your child pick up and drop a small object (e.g., a small toy or small stone) into a bucket or bowl while sitting? gs1 mo c 054 +gsed2212 gs1moc055 37.43 Can your child maintain a standing position while holding on to a person or object (e.g., wall or furniture)? gs1 mo c 055 +gsed2212 gs1moc056 38.39 Can your child pick up a small object (e.g., a piece of food, small toy or small stone) with just his/her thumb and one finger? gs1 mo c 056 +gsed2212 gs1moc057 40.1 Can your child pull themselves up from the floor while holding onto something? For example, can they pull themselves up using a chair, a person, or some other object? gs1 mo c 057 +gsed2212 gs1lgc058 41.17 Does your child stop what he/she is doing when you say 'Stop!' even if just for a second? gs1 lg c 058 +gsed2212 gs1moc059 42.33 Can your child walk several steps while holding on to a person or object (e.g., wall or furniture)? gs1 mo c 059 +gsed2212 gs1moc060 43.21 While holding onto furniture, does your child bend down and pick up a small object from the floor and then return to a standing position? gs1 mo c 060 +gsed2212 gs1moc061 43.47 While holding onto furniture, does your child squat with control (without falling or flopping down)? gs1 mo c 061 +gsed2212 gs1lgc062 44.73 Does your child make a gesture to indicate 'No' (e.g., shaking head)? gs1 lg c 062 +gsed2212 gs1sec063 45.7 Even if your child is unable to do singing games, does he/she enjoy them and want to be a part of them? gs1 se c 063 +gsed2212 gs1moc064 46.34 Can your child stand up without holding onto anything, even if just for a few seconds? gs1 mo c 064 +gsed2212 gs1lic065 47.23 Does your child put his/her hands out to have them washed? gs1 li c 065 +gsed2212 gs1moc066 47.58 Can your child maintain a standing position on his/her own, without holding on or receiving support? gs1 mo c 066 +gsed2212 gs1lic067 48.15 Can your child drink from an open cup without help? gs1 li c 067 +gsed2212 gs1moc068 48.06 Can your child climb onto an object (rock, porch, step, chair, bed, low table, etc.)? gs1 mo c 068 +gsed2212 gs1moc069 48.78 Can your child make any light marks on paper or in dirt with a crayon or a stick? gs1 mo c 069 +gsed2212 gs1moc070 48.97 Can your child bend down or squat to pick up an object from the floor and then stand up again, without help from a person or object? gs1 mo c 070 +gsed2212 gs1lgc071 49.34 Can your child follow a simple spoken command or direction without you making a gesture? gs1 lg c 071 +gsed2212 gs1lgc072 49.36 Can your child fetch something when asked? gs1 lg c 072 +gsed2212 gs1sec073 49.84 Does your child share with others (e.g., food)? gs1 se c 073 +gsed2212 gs1moc074 49.6 Can your child take several steps (3-5) forward without holding onto any person or object, even if they fall down immediately afterward? gs1 mo c 074 +gsed2212 gs1moc075 49.9 While standing, can your child purposefully throw the ball and not just drop it? gs1 mo c 075 +gsed2212 gs1moc076 50.17 Can your child stand up from sitting by himself and take several steps forward? gs1 mo c 076 +gsed2212 gs1lic077 49.99 Can your child break off pieces of food and feed them to him/her-self? gs1 li c 077 +gsed2212 gs1moc078 50.23 Can your child make a scribble on paper, or in dirt, in a back and forth manner? For example, can he or she move the pen or pencil or stick back and forth? gs1 mo c 078 +gsed2212 gs1moc079 50.6 Can your child move around by walking, rather than by crawling on his hands and knees? gs1 mo c 079 +gsed2212 gs1moc080 51.49 Can your child walk well, with coordination, without falling down often? With one foot in front of the other (rather than shifting weight side to side, stiff- legged)? gs1 mo c 080 +gsed2212 gs1moc081 51.66 Can your child stack at least two objects on top of each other, such as bottle tops, blocks, stones, etc.? gs1 mo c 081 +gsed2212 gs1sec082 52.79 Can your child greet people either by giving his/her hand or saying Hello? gs1 se c 082 +gsed2212 gs1moc083 53.05 Can your child kick a ball or other round object forward using his/her foot? gs1 mo c 083 +gsed2212 gs1lgc084 53.97 Can your child say five or more separate words (e.g., names like 'Mama' or objects like 'ball')? gs1 lg c 084 +gsed2212 gs1cgc085 54.92 Can your child follow directions with more than one step? For example, 'Go to the kitchen and bring me a spoon'? gs1 cg c 085 +gsed2212 gs1lgc086 56.03 Can your child correctly name at least one family member other than mom and dad (e.g., name of brother, sister, aunt, uncle)? gs1 lg c 086 +gsed2212 gs1lgc087 56.1 Can your child identify at least seven objects? For example, when you ask 'where is the ball/spoon/cup/cloth/door/plate/bucket etc.' does your child look at or point to (or even name) the objects? gs1 lg c 087 +gsed2212 gs1lgc088 56.1 Can your child ask for something (e.g., food, water) by name when he/she wants it? gs1 lg c 088 +gsed2212 gs1moc089 56.68 Can your child run well, without falling or bumping into objects? gs1 mo c 089 +gsed2212 gs1lic090 56.72 Can your child wash hands by him/herself? gs1 li c 090 +gsed2212 gs1moc091 57.08 While standing, can your child kick a ball by swinging his/her leg forward? gs1 mo c 091 +gsed2212 gs1lic092 57.19 Does your child dry hands by herself/himself after you have washed them? gs1 li c 092 +gsed2212 gs1sec093 57.23 Does your child show independence (e.g., wants to go and visit a friends house)? gs1 se c 093 +gsed2212 gs1lgc094 57.49 If you show your child an object he/she knows well (e.g., a cup or animal), can he/she consistently name it? gs1 lg c 094 +gsed2212 gs1moc095 58 Can your child stack three or more small objects (e.g., blocks, cups, bottle caps) on top of each other? gs1 mo c 095 +gsed2212 gs1moc096 59.32 Can your child walk on an uneven surface (e.g., a bumpy or steep road) without falling? gs1 mo c 096 +gsed2212 gs1lgc097 59.88 Does your child usually communicate with words what he/she wants in a way that is understandable to others? gs1 lg c 097 +gsed2212 gs1lgc098 60.22 Can your child say ten or more words in addition to 'Mama' and 'Dada'? gs1 lg c 098 +gsed2212 gs1lgc099 60.55 When looking at pictures, if you say to your child 'what is this?', can they say the name of the object that you point to? gs1 lg c 099 +gsed2212 gs1lgc100 60.86 Can your child speak using short sentences of two words that go together (e.g., 'Mama go' or 'Dada eat'? gs1 lg c 100 +gsed2212 gs1moc101 61.06 Can your child unscrew the lid from a bottle or jar? gs1 mo c 101 +gsed2212 gs1sec102 62.29 Does your child help out around the house with simple chores, even if he/she doesn't do them well? gs1 se c 102 +gsed2212 gs1lic103 63.17 Is your child able to go poo or pee without having accidents (wetting or soiling themselves)? gs1 li c 103 +gsed2212 gs1lgc104 63.18 Can your child speak using sentences of three or more words that go together (e.g., 'I want water' or 'The house is big')? gs1 lg c 104 +gsed2212 gs1lgc105 63.2 Can your child name at least two body parts (e.g., arm, eye, or nose)? gs1 lg c 105 +gsed2212 gs1lic106 63.53 Can your child remove an item of clothing (e.g., take off his/her shirt)? gs1 li c 106 +gsed2212 gs1lgc107 63.57 Can your child say 15 or more separate words (e.g., names like 'Mama' or objects like 'ball')? gs1 lg c 107 +gsed2212 gs1moc108 64.14 Can your child jump with both feet leaving the ground? gs1 mo c 108 +gsed2212 gs1lgc109 64.35 Can your child tell you or someone familiar his/her own name [nickname] when asked to? gs1 lg c 109 +gsed2212 gs1lgc110 64.82 Can your child correctly ask questions using any of the words 'what,' 'which,' 'where,' or 'who'? gs1 lg c 110 +gsed2212 gs1sec111 65.55 Does your child show respect around elders? gs1 se c 111 +gsed2212 gs1lgc112 65.72 Can your child correctly use any of the words 'I,' 'you,' 'she,' or 'he' (e.g., 'I go to store,' or 'He eats rice')? gs1 lg c 112 +gsed2212 gs1lgc113 65.81 Can your child sing a short song or repeat parts of a rhyme from memory by him/herself? gs1 lg c 113 +gsed2212 gs1cgc114 65.97 Does your child know the difference between the words 'big' and 'small'? For example, if you ask, 'Give me the big spoon' can your child understand which one to give if there are two different sizes? gs1 cg c 114 +gsed2212 gs1lgc115 66.09 Does your child pronounce most of his/her words correctly? gs1 lg c 115 +gsed2212 gs1lic116 66.16 Can your child go to the toilet by him/her-self? gs1 li c 116 +gsed2212 gs1lgc117 67.69 If you point to an object, can your child correctly use the words 'on,' 'in,' or 'under' to describe where it is (e.g., 'The cup is on the table' instead of 'The cup is in the table.') gs1 lg c 117 +gsed2212 gs1lic118 67.7 Can your child put on at least one piece of clothing by himself? gs1 li c 118 +gsed2212 gs1lgc119 67.74 Can your child explain in words what common objects like a cup or chair are used for? gs1 lg c 119 +gsed2212 gs1moc120 68.37 Can your child draw a straight line? gs1 mo c 120 +gsed2212 gs1lgc121 69.48 Can your child say what he/she likes or dislikes (e.g., 'I like sweets')? gs1 lg c 121 +gsed2212 gs1cgc122 69.55 If you show your child two objects or people of different size, can he/she tell you which one is the big one and which is the small one? gs1 cg c 122 +gsed2212 gs1lgc123 69.72 Does your child regularly use describing words such as 'fast,' 'short,' 'hot,' 'fat,' or 'beautiful' correctly? gs1 lg c 123 +gsed2212 gs1sec124 70.54 Does your child know to keep quiet when the situation requires it? (e.g., at ceremonies, when someone is asleep) gs1 se c 124 +gsed2212 gs1lgc125 71.94 Does your child ask 'why' questions (e.g., 'Why are you tall?')? gs1 lg c 125 +gsed2212 gs1moc126 72.23 Can your child stand on one foot WITHOUT any support for at least a few seconds? gs1 mo c 126 +gsed2212 gs1cgc127 72.24 If you ask your child to give you three objects (e.g., stones, beans), does the child give you the correct amount? gs1 cg c 127 +gsed2212 gs1cgc128 72.48 Does your child understand the term 'longest'? For example, if you ask him/her to choose 'which is the longest of 3 objects?' (e.g. 3 spoons or sticks), would he/she be able to choose the longest? gs1 cg c 128 +gsed2212 gs1lgc129 72.64 Can your child talk about things that have happened in the past using correct language (e.g., 'Yesterday I played with my friend' or 'Last week she went to the market')? gs1 lg c 129 +gsed2212 gs1lgc130 74.03 Can your child tell a story? gs1 lg c 130 +gsed2212 gs1sec131 74.11 Can your child tell you when he/she is happy, angry, or sad? gs1 se c 131 +gsed2212 gs1cgc132 74.43 Can the child name at least one color (e.g., red, blue, yellow)? gs1 cg c 132 +gsed2212 gs1cgc133 74.57 Can your child count objects up to five (e.g., fingers, people)? gs1 cg c 133 +gsed2212 gs1moc134 74.67 If you draw a circle can your child do it, just as you did? gs1 mo c 134 +gsed2212 gs1sec135 74.75 Can your child tell you when others are happy, angry, or sad? gs1 se c 135 +gsed2212 gs1lgc136 74.91 Can your child talk about things that will happen in the future using correct language (e.g., 'Tomorrow he will attend school' or 'Next week we will go to the market')? gs1 lg c 136 +gsed2212 gs1moc137 75.89 Can the child fasten and unfasten buttons without help? gs1 mo c 137 +gsed2212 gs1lic138 76.6 Can your child dress him/herself completely (except for shoelaces, buttons and zippers)? gs1 li c 138 +gsed2212 gs1sec139 79.27 Can your child say what others like or dislike (e.g., 'Mama doesn't like fruit,' Papa likes football)? gs1 se c 139 +gsed2212 gl1gmd001 8.78 Moves body in reaction to caregiver gl1 gm d 001 +gsed2212 gl1gmd002 9 Moves body, kicking legs and moving arms equally on his/her own gl1 gm d 002 +gsed2212 gl1gmd003 21.55 Pulls to sit - no head lag gl1 gm d 003 +gsed2212 gl1gmd004 20 Lifts head in prone 45 degrees gl1 gm d 004 +gsed2212 gl1gmd005 26.63 Lifts head, shoulders, chest when prone (2X) gl1 gm d 005 +gsed2212 gl1gmd006 16.86 Puts hands together in front of face gl1 gm d 006 +gsed2212 gl1gmd007 23 Carries object to mouth to explore (2X) gl1 gm d 007 +gsed2212 gl1gmd008 26.65 Reaches for an object (2X) gl1 gm d 008 +gsed2212 gl1gmd009 21.19 Grasps hold of large object (2X) gl1 gm d 009 +gsed2212 gl1gmd010 17.69 Balances head while supported gl1 gm d 010 +gsed2212 gl1gmd011 25.14 Sits supported (with help) (2X) gl1 gm d 011 +gsed2212 gl1gmd012 22.15 Resists object being taken away (2X) gl1 gm d 012 +gsed2212 gl1gmd013 27.94 Sees a small object gl1 gm d 013 +gsed2212 gl1gmd014 30.36 Sits momentarily (on his/her own) gl1 gm d 014 +gsed2212 gl1gmd015 29.69 Sits without help (short time) (2X) gl1 gm d 015 +gsed2212 gl1gmd016 27.94 Picks object from ground (2X) gl1 gm d 016 +gsed2212 gl1gmd017 33.98 Rolls from back to stomach (2X) gl1 gm d 017 +gsed2212 gl1gmd018 30.14 Sits by self well (2X) gl1 gm d 018 +gsed2212 gl1gmd019 34.37 Rakes (grasps with 3 or 4 fingers) a small object (2X) gl1 gm d 019 +gsed2212 gl1gmd020 35.57 Turns on floor (2X) gl1 gm d 020 +gsed2212 gl1gmd021 40 Moves from lying to sitting gl1 gm d 021 +gsed2212 gl1gmd022 37.41 Stands with support (2X) gl1 gm d 022 +gsed2212 gl1gmd023 35.97 Reaches for a second object (2X) gl1 gm d 023 +gsed2212 gl1gmd024 38.99 Crawls (2X) gl1 gm d 024 +gsed2212 gl1gmd025 40.48 Pulls up to standing position gl1 gm d 025 +gsed2212 gl1gmd026 39.97 Shifts object from 1 hand to the other (2X) gl1 gm d 026 +gsed2212 gl1gmd027 36.8 Picks up small object between thumb and finger (2X) gl1 gm d 027 +gsed2212 gl1gmd028 44.33 Walks when 1 hand held gl1 gm d 028 +gsed2212 gl1gmd029 47.33 Stands alone for 5 seconds or more if put in standing position (2X) gl1 gm d 029 +gsed2212 gl1gmd030 48.19 Plays "give-and-take" (3X) gl1 gm d 030 +gsed2212 gl1gmd031 48.46 Takes few steps alone (2X) gl1 gm d 031 +gsed2212 gl1gmd032 46.83 Walks gl1 gm d 032 +gsed2212 gl1gmd033 54.44 Runs (basic), may fall over (2X) gl1 gm d 033 +gsed2212 gl1gmd034 50.31 Stoops and recovers (2X) gl1 gm d 034 +gsed2212 gl1gmd035 50 Releases ball purposefully gl1 gm d 035 +gsed2212 gl1gmd036 81.44 Runs well (2X) gl1 gm d 036 +gsed2212 gl1gmd037 56.07 Kicks a ball from stationary position (2X) gl1 gm d 037 +gsed2212 gl1gmd038 61.2 Runs and kicks a ball well (2X) gl1 gm d 038 +gsed2212 gl1gmd039 69.42 Kneels and then stands, without using hands (2X) gl1 gm d 039 +gsed2212 gl1gmd040 69.89 Hops forward on 1 foot 3 steps (2X) gl1 gm d 040 +gsed2212 gl1gmd041 72.36 Jumps with both feet together (2X) gl1 gm d 041 +gsed2212 gl1gmd042 70.84 Jumps over a piece of paper (widthways) (2X) gl1 gm d 042 +gsed2212 gl1gmd043 71.83 Walks along line heel- to- toe (2X) gl1 gm d 043 +gsed2212 gl1gmd044 73.16 Throws bean bag onto a cloth (3X) gl1 gm d 044 +gsed2212 gl1gmd045 74.83 Stands on 1 foot <= 5 seconds (2X) gl1 gm d 045 +gsed2212 gl1gmd046 78.74 Walks on tiptoes 6 or more steps (2X) gl1 gm d 046 +gsed2212 gl1gmd047 69.41 Moves from sitting to standing without using hands gl1 gm d 047 +gsed2212 gl1gmd048 83.19 Stands on 1 foot > 5 seconds (2X) gl1 gm d 048 +gsed2212 gl1gmd049 85.38 Throws ball up into the air and catches it (3X) gl1 gm d 049 +gsed2212 gl1lgd001 19.12 Makes sounds or vocalizes (2X) gl1 lg d 001 +gsed2212 gl1lgd002 8.47 Reacts when spoken to (2X) gl1 lg d 002 +gsed2212 gl1lgd003 13.22 Smiles in response (2X) gl1 lg d 003 +gsed2212 gl1lgd004 24.62 Laughs (2X) gl1 lg d 004 +gsed2212 gl1lgd005 5.33 Calms and quiets with caregiver gl1 lg d 005 +gsed2212 gl1lgd006 23.47 Vocalizes when spoken to gl1 lg d 006 +gsed2212 gl1lgd007 25.43 Turns to voice (2X) gl1 lg d 007 +gsed2212 gl1lgd008 34.77 Babbles while playing gl1 lg d 008 +gsed2212 gl1lgd009 35.25 Repeats syllables gl1 lg d 009 +gsed2212 gl1lgd010 46.44 Uses gestures to communicate gl1 lg d 010 +gsed2212 gl1lgd011 46.62 Uses 2 - 4 syllable babble gl1 lg d 011 +gsed2212 gl1lgd012 50.16 Responds to verbal request (2X) gl1 lg d 012 +gsed2212 gl1lgd013 50.92 Uses 1 definite word gl1 lg d 013 +gsed2212 gl1lgd014 52.67 Understands when being cautioned (2X) gl1 lg d 014 +gsed2212 gl1lgd015 53.15 Imitates simple words gl1 lg d 015 +gsed2212 gl1lgd016 53.81 Follows simple commands (1 step) (2X) gl1 lg d 016 +gsed2212 gl1lgd017 57.89 Points to 2 pictures gl1 lg d 017 +gsed2212 gl1lgd018 54.92 Identifies 2 objects you name (2X) gl1 lg d 018 +gsed2212 gl1lgd019 56.94 Identifies 5 objects you name (2X) gl1 lg d 019 +gsed2212 gl1lgd020 58.67 Identifies 1 item of clothing gl1 lg d 020 +gsed2212 gl1lgd021 62.34 Identifies 3 items of clothing gl1 lg d 021 +gsed2212 gl1lgd022 59.7 Points to 1 or more body parts (2X) gl1 lg d 022 +gsed2212 gl1lgd023 60.6 Points at 5 pictures in book gl1 lg d 023 +gsed2212 gl1lgd024 53.24 Shows Interest in story gl1 lg d 024 +gsed2212 gl1lgd025 61.32 Follows 2-step commands (2X) gl1 lg d 025 +gsed2212 gl1lgd026 63.12 Says sentences with 2 words together gl1 lg d 026 +gsed2212 gl1lgd027 63.45 Names 4 pictures gl1 lg d 027 +gsed2212 gl1lgd028 63.56 Uses 5 clear words gl1 lg d 028 +gsed2212 gl1lgd029 64.44 Matches pictures gl1 lg d 029 +gsed2212 gl1lgd030 65.66 Names 5 objects (2X) gl1 lg d 030 +gsed2212 gl1lgd031 66.97 Uses multiple-word utterances gl1 lg d 031 +gsed2212 gl1lgd032 65.91 Speaks clearly in sentences gl1 lg d 032 +gsed2212 gl1lgd033 67.6 Knows actions or functions of 3 or more objects gl1 lg d 033 +gsed2212 gl1lgd034 68.74 Points to parts of whole objects gl1 lg d 034 +gsed2212 gl1lgd035 69.81 Says first name (2X) gl1 lg d 035 +gsed2212 gl1lgd036 70.24 Names 10 objects (2X) gl1 lg d 036 +gsed2212 gl1lgd037 72.07 Understands "more" gl1 lg d 037 +gsed2212 gl1lgd038 81.73 Identifies 2 or more colours (2X) gl1 lg d 038 +gsed2212 gl1lgd039 71.54 Knows use of objects (2X) gl1 lg d 039 +gsed2212 gl1lgd040 85.58 Names at least 2 colours gl1 lg d 040 +gsed2212 gl1lgd041 72.61 Identifies 5 action pictures gl1 lg d 041 +gsed2212 gl1lgd042 80.83 Identifies at least 2 shapes (2X) gl1 lg d 042 +gsed2212 gl1lgd043 74.67 Taps with 2 blocks gl1 lg d 043 +gsed2212 gl1lgd044 75.75 Talks easily about daily events gl1 lg d 044 +gsed2212 gl1lgd045 79.55 Describes picture (2X) gl1 lg d 045 +gsed2212 gl1lgd046 76.25 Gives logical response to a question (2X) gl1 lg d 046 +gsed2212 gl1lgd047 79.78 Categorizes things gl1 lg d 047 +gsed2212 gl1lgd048 76.09 Matches 3 colours (2X) gl1 lg d 048 +gsed2212 gl1lgd049 71.77 Understands adjective "faster" (2X) gl1 lg d 049 +gsed2212 gl1lgd050 83.21 Taps with 4 blocks gl1 lg d 050 +gsed2212 gl1lgd051 73.24 Names actions (5) gl1 lg d 051 +gsed2212 gl1lgd052 86.08 Taps with 8 blocks gl1 lg d 052 +gsed2212 gl1fmd001 8.61 Eyes fixate (2X) gl1 fm d 001 +gsed2212 gl1fmd002 13.81 Responds to sound (2X) gl1 fm d 002 +gsed2212 gl1fmd003 25.02 Fixes and follows - 180 degrees gl1 fm d 003 +gsed2212 gl1fmd004 25.88 Manipulates cup OR spoon in play gl1 fm d 004 +gsed2212 gl1fmd005 26.19 Shows interest in making a sound (2X) gl1 fm d 005 +gsed2212 gl1fmd006 28.79 Turns head towards fallen object (2X) gl1 fm d 006 +gsed2212 gl1fmd007 31.39 Discriminates strangers gl1 fm d 007 +gsed2212 gl1fmd008 37.6 Picks up cup to get block gl1 fm d 008 +gsed2212 gl1fmd009 38.18 Finds toy under cloth (2X) gl1 fm d 009 +gsed2212 gl1fmd010 38.16 Pulls string to get object (2X) gl1 fm d 010 +gsed2212 gl1fmd011 43.13 Lifts cup by the handle (2X) gl1 fm d 011 +gsed2212 gl1fmd012 43.8 Puts block in cup gl1 fm d 012 +gsed2212 gl1fmd013 44.79 Bangs 2 objects together gl1 fm d 013 +gsed2212 gl1fmd014 45.32 Pats toy to make noise gl1 fm d 014 +gsed2212 gl1fmd015 46.48 Makes marks with crayon gl1 fm d 015 +gsed2212 gl1fmd016 46.99 Puts 3 or more blocks in cup gl1 fm d 016 +gsed2212 gl1fmd017 42.73 Puts blocks in jar gl1 fm d 017 +gsed2212 gl1fmd018 48.54 Puts 1 peg in again (2X) gl1 fm d 018 +gsed2212 gl1fmd019 48.57 Scribbles in any way (2X) gl1 fm d 019 +gsed2212 gl1fmd020 48.79 Accepts third block without dropping (2X) gl1 fm d 020 +gsed2212 gl1fmd021 50.06 Uses objects in play by him-/herself (2X) gl1 fm d 021 +gsed2212 gl1fmd022 49.91 Manages a cup well gl1 fm d 022 +gsed2212 gl1fmd023 50.28 Holds crayon with fingers, not fist (2X) gl1 fm d 023 +gsed2212 gl1fmd024 50.4 Repeats something when encouraged (2X) gl1 fm d 024 +gsed2212 gl1fmd025 53.17 Dumps blocks out of jar purposefully (2X) gl1 fm d 025 +gsed2212 gl1fmd026 53.89 Builds tower of 2 blocks (2X) gl1 fm d 026 +gsed2212 gl1fmd027 54.14 Puts pegs in board <= 2 minutes (2X) gl1 fm d 027 +gsed2212 gl1fmd028 57.38 Builds tower of 3 blocks (2X) gl1 fm d 028 +gsed2212 gl1fmd029 58.75 Finds object under 2 alternating cups gl1 fm d 029 +gsed2212 gl1fmd030 59.52 Places 2 shapes in board (2X) gl1 fm d 030 +gsed2212 gl1fmd031 62.26 Places 3 shapes in board in 2 minutes (2X) gl1 fm d 031 +gsed2212 gl1fmd032 64.17 Uses objects in play with someone gl1 fm d 032 +gsed2212 gl1fmd033 65.05 Scribbles on paper (circular scribble) gl1 fm d 033 +gsed2212 gl1fmd034 65.26 Builds tower of 6 blocks (2X) gl1 fm d 034 +gsed2212 gl1fmd035 66.1 Understands the concept of "1" (2X) gl1 fm d 035 +gsed2212 gl1fmd036 66.23 Places 3 shapes in rotated board in 2 minutes (2X) gl1 fm d 036 +gsed2212 gl1fmd037 67.24 Builds truck/lorry of blocks (2X) gl1 fm d 037 +gsed2212 gl1fmd038 68.66 Unscrews and screws lid of jar (2X) gl1 fm d 038 +gsed2212 gl1fmd039 68.77 Engages in representational play gl1 fm d 039 +gsed2212 gl1fmd040 68.92 Inserts 3 shapes in 15 seconds (2X) gl1 fm d 040 +gsed2212 gl1fmd041 70.1 Copies 2-part activity (3X) gl1 fm d 041 +gsed2212 gl1fmd042 70.26 Puts pegs in board in <= 30 seconds (2X) gl1 fm d 042 +gsed2212 gl1fmd043 71.61 Draws horizontal line (2X) gl1 fm d 043 +gsed2212 gl1fmd044 73.53 Understands "more" gl1 fm d 044 +gsed2212 gl1fmd045 74.5 Imitates building bridge (2X) gl1 fm d 045 +gsed2212 gl1fmd046 74.54 Picks longest stick 3 of 3 (3X to 5X) gl1 fm d 046 +gsed2212 gl1fmd047 74.57 Copies a circle gl1 fm d 047 +gsed2212 gl1fmd048 75.27 Builds wall of blocks (2X) gl1 fm d 048 +gsed2212 gl1fmd049 75.9 Understands concept of size gl1 fm d 049 +gsed2212 gl1fmd050 77.52 Understands prepositions (2X) gl1 fm d 050 +gsed2212 gl1fmd051 77.98 Copies a cross or plus sign (2X) gl1 fm d 051 +gsed2212 gl1fmd052 81.36 Counts 3 or more objects. gl1 fm d 052 +gsed2212 gl1fmd053 86.45 Copies a square (2X) gl1 fm d 053 +gsed2212 gl1fmd054 88.86 Draws 3 or more body parts gl1 fm d 054 diff --git a/data-raw/data/keys/gsed2510.txt b/data-raw/data/keys/gsed2510.txt new file mode 100644 index 00000000..c24d450a --- /dev/null +++ b/data-raw/data/keys/gsed2510.txt @@ -0,0 +1,295 @@ +key item tau +gsed2510 gl1gmd001 7.2 +gsed2510 gl1gmd002 6.92 +gsed2510 gl1gmd003 20.05 +gsed2510 gl1gmd004 18.32 +gsed2510 gl1gmd005 24.77 +gsed2510 gl1gmd006 18.37 +gsed2510 gl1gmd007 23.45 +gsed2510 gl1gmd008 26.95 +gsed2510 gl1gmd009 22.15 +gsed2510 gl1gmd010 18.73 +gsed2510 gl1gmd011 25.88 +gsed2510 gl1gmd012 23.51 +gsed2510 gl1gmd013 27.66 +gsed2510 gl1gmd014 30.69 +gsed2510 gl1gmd015 30.92 +gsed2510 gl1gmd016 29.23 +gsed2510 gl1gmd017 33.5 +gsed2510 gl1gmd018 31.91 +gsed2510 gl1gmd019 33.8 +gsed2510 gl1gmd020 34.94 +gsed2510 gl1gmd021 40.4 +gsed2510 gl1gmd022 38.36 +gsed2510 gl1gmd023 35.9 +gsed2510 gl1gmd024 39.29 +gsed2510 gl1gmd025 41.34 +gsed2510 gl1gmd026 38.92 +gsed2510 gl1gmd027 38.28 +gsed2510 gl1gmd028 45.02 +gsed2510 gl1gmd029 47.86 +gsed2510 gl1gmd030 48.37 +gsed2510 gl1gmd031 50.16 +gsed2510 gl1gmd032 49.88 +gsed2510 gl1gmd033 54.89 +gsed2510 gl1gmd034 50.89 +gsed2510 gl1gmd035 51.79 +gsed2510 gl1gmd036 60.09 +gsed2510 gl1gmd037 56.66 +gsed2510 gl1gmd038 67.65 +gsed2510 gl1gmd039 70.46 +gsed2510 gl1gmd040 77.82 +gsed2510 gl1gmd041 68.58 +gsed2510 gl1gmd042 72.56 +gsed2510 gl1gmd043 76.03 +gsed2510 gl1gmd044 71.08 +gsed2510 gl1gmd045 71.03 +gsed2510 gl1gmd046 71.82 +gsed2510 gl1gmd047 NA +gsed2510 gl1gmd048 76.41 +gsed2510 gl1gmd049 82.38 +gsed2510 gl1lgd001 NA +gsed2510 gl1lgd002 8.56 +gsed2510 gl1lgd003 13.4 +gsed2510 gl1lgd004 24.05 +gsed2510 gl1lgd005 NA +gsed2510 gl1lgd006 22.42 +gsed2510 gl1lgd007 23.14 +gsed2510 gl1lgd008 NA +gsed2510 gl1lgd009 37.25 +gsed2510 gl1lgd010 43.5 +gsed2510 gl1lgd011 45.19 +gsed2510 gl1lgd012 49.7 +gsed2510 gl1lgd013 51.61 +gsed2510 gl1lgd014 NA +gsed2510 gl1lgd015 53.59 +gsed2510 gl1lgd016 53.65 +gsed2510 gl1lgd017 58.41 +gsed2510 gl1lgd018 56.51 +gsed2510 gl1lgd019 59.42 +gsed2510 gl1lgd020 58.3 +gsed2510 gl1lgd021 63.01 +gsed2510 gl1lgd022 60.15 +gsed2510 gl1lgd023 61.92 +gsed2510 gl1lgd024 57.14 +gsed2510 gl1lgd025 62.57 +gsed2510 gl1lgd026 63.75 +gsed2510 gl1lgd027 64.31 +gsed2510 gl1lgd028 63.56 +gsed2510 gl1lgd029 65.46 +gsed2510 gl1lgd030 65.48 +gsed2510 gl1lgd031 66.89 +gsed2510 gl1lgd032 66.85 +gsed2510 gl1lgd033 67.09 +gsed2510 gl1lgd034 68.22 +gsed2510 gl1lgd035 68.33 +gsed2510 gl1lgd036 70.12 +gsed2510 gl1lgd037 73.14 +gsed2510 gl1lgd038 75.16 +gsed2510 gl1lgd039 70.14 +gsed2510 gl1lgd040 75.57 +gsed2510 gl1lgd041 71.19 +gsed2510 gl1lgd042 77.24 +gsed2510 gl1lgd043 74.41 +gsed2510 gl1lgd044 76.13 +gsed2510 gl1lgd045 73.97 +gsed2510 gl1lgd046 77 +gsed2510 gl1lgd047 73.22 +gsed2510 gl1lgd048 74.4 +gsed2510 gl1lgd049 71.94 +gsed2510 gl1lgd050 74.13 +gsed2510 gl1lgd051 79.6 +gsed2510 gl1lgd052 81.07 +gsed2510 gl1fmd001 7.17 +gsed2510 gl1fmd002 13.15 +gsed2510 gl1fmd003 21.04 +gsed2510 gl1fmd004 25.48 +gsed2510 gl1fmd005 26.77 +gsed2510 gl1fmd006 27.96 +gsed2510 gl1fmd007 NA +gsed2510 gl1fmd008 37.97 +gsed2510 gl1fmd009 38.43 +gsed2510 gl1fmd010 39.44 +gsed2510 gl1fmd011 42.55 +gsed2510 gl1fmd012 44.33 +gsed2510 gl1fmd013 43.51 +gsed2510 gl1fmd014 45.87 +gsed2510 gl1fmd015 48.05 +gsed2510 gl1fmd016 47.73 +gsed2510 gl1fmd017 46.99 +gsed2510 gl1fmd018 50.5 +gsed2510 gl1fmd019 50.55 +gsed2510 gl1fmd020 50.4 +gsed2510 gl1fmd021 51.25 +gsed2510 gl1fmd022 51.5 +gsed2510 gl1fmd023 52.07 +gsed2510 gl1fmd024 NA +gsed2510 gl1fmd025 53.56 +gsed2510 gl1fmd026 55.02 +gsed2510 gl1fmd027 55.89 +gsed2510 gl1fmd028 58.38 +gsed2510 gl1fmd029 59.14 +gsed2510 gl1fmd030 60.35 +gsed2510 gl1fmd031 62.76 +gsed2510 gl1fmd032 NA +gsed2510 gl1fmd033 65.78 +gsed2510 gl1fmd034 65.81 +gsed2510 gl1fmd035 NA +gsed2510 gl1fmd036 66.36 +gsed2510 gl1fmd037 69.11 +gsed2510 gl1fmd038 67.26 +gsed2510 gl1fmd039 NA +gsed2510 gl1fmd040 68.44 +gsed2510 gl1fmd041 70.25 +gsed2510 gl1fmd042 69.23 +gsed2510 gl1fmd043 72.27 +gsed2510 gl1fmd044 74.07 +gsed2510 gl1fmd045 74.04 +gsed2510 gl1fmd046 74.64 +gsed2510 gl1fmd047 74.97 +gsed2510 gl1fmd048 73.39 +gsed2510 gl1fmd049 74.15 +gsed2510 gl1fmd050 76.18 +gsed2510 gl1fmd051 78.5 +gsed2510 gl1fmd052 77.38 +gsed2510 gl1fmd053 85.76 +gsed2510 gl1fmd054 87.23 +gsed2510 gs1sec001 2.56 +gsed2510 gs1moc002 0.4 +gsed2510 gs1sec003 3.12 +gsed2510 gs1lgc004 NA +gsed2510 gs1moc005 5.33 +gsed2510 gs1cgc006 7.94 +gsed2510 gs1moc007 8.43 +gsed2510 gs1moc008 7.78 +gsed2510 gs1sec009 10.22 +gsed2510 gs1lgc010 9.13 +gsed2510 gs1sec011 7.11 +gsed2510 gs1lgc012 9.93 +gsed2510 gs1sec013 11.5 +gsed2510 gs1lgc014 11.97 +gsed2510 gs1moc015 13.98 +gsed2510 gs1lgc016 13.24 +gsed2510 gs1sec017 16.25 +gsed2510 gs1moc018 15.69 +gsed2510 gs1sec019 15.56 +gsed2510 gs1lgc020 15.26 +gsed2510 gs1sec021 17.24 +gsed2510 gs1sec022 16.79 +gsed2510 gs1lgc023 17.18 +gsed2510 gs1sec024 17.18 +gsed2510 gs1moc025 16.74 +gsed2510 gs1lgc026 17.52 +gsed2510 gs1sec027 21.47 +gsed2510 gs1moc028 NA +gsed2510 gs1moc029 18.34 +gsed2510 gs1moc030 21.2 +gsed2510 gs1moc031 20.74 +gsed2510 gs1cgc032 24.73 +gsed2510 gs1moc033 24.14 +gsed2510 gs1moc034 27.34 +gsed2510 gs1moc035 26.13 +gsed2510 gs1lic036 28.48 +gsed2510 gs1lgc037 28.38 +gsed2510 gs1moc038 28.33 +gsed2510 gs1moc039 27.94 +gsed2510 gs1moc040 28.35 +gsed2510 gs1moc041 28.22 +gsed2510 gs1cgc042 29.1 +gsed2510 gs1moc043 29.71 +gsed2510 gs1moc044 29.89 +gsed2510 gs1moc045 31.03 +gsed2510 gs1cgc046 31.58 +gsed2510 gs1moc047 31.86 +gsed2510 gs1moc048 31.92 +gsed2510 gs1lgc049 34.08 +gsed2510 gs1moc050 32.37 +gsed2510 gs1moc051 33.83 +gsed2510 gs1moc052 35.81 +gsed2510 gs1lic053 35.67 +gsed2510 gs1moc054 39.2 +gsed2510 gs1moc055 37.97 +gsed2510 gs1moc056 38.7 +gsed2510 gs1moc057 39.8 +gsed2510 gs1lgc058 42.11 +gsed2510 gs1moc059 42.41 +gsed2510 gs1moc060 42.95 +gsed2510 gs1moc061 43.83 +gsed2510 gs1lgc062 45.11 +gsed2510 gs1sec063 NA +gsed2510 gs1moc064 46.38 +gsed2510 gs1lic065 49.02 +gsed2510 gs1moc066 48.16 +gsed2510 gs1lic067 50 +gsed2510 gs1moc068 47.67 +gsed2510 gs1moc069 49.54 +gsed2510 gs1moc070 49.3 +gsed2510 gs1lgc071 49.74 +gsed2510 gs1lgc072 50.47 +gsed2510 gs1sec073 50.04 +gsed2510 gs1moc074 49.56 +gsed2510 gs1moc075 50.62 +gsed2510 gs1moc076 50.16 +gsed2510 gs1lic077 49.28 +gsed2510 gs1moc078 51.28 +gsed2510 gs1moc079 50.48 +gsed2510 gs1moc080 52.34 +gsed2510 gs1moc081 52.5 +gsed2510 gs1sec082 52.45 +gsed2510 gs1moc083 53.2 +gsed2510 gs1lgc084 54.78 +gsed2510 gs1cgc085 55.72 +gsed2510 gs1lgc086 57.12 +gsed2510 gs1lgc087 56.87 +gsed2510 gs1lgc088 57.77 +gsed2510 gs1moc089 58.07 +gsed2510 gs1lic090 59.29 +gsed2510 gs1moc091 57.6 +gsed2510 gs1lic092 59.49 +gsed2510 gs1sec093 58.4 +gsed2510 gs1lgc094 59.21 +gsed2510 gs1moc095 58.82 +gsed2510 gs1moc096 58.87 +gsed2510 gs1lgc097 61.19 +gsed2510 gs1lgc098 60.55 +gsed2510 gs1lgc099 62.18 +gsed2510 gs1lgc100 61.11 +gsed2510 gs1moc101 61.23 +gsed2510 gs1sec102 60.64 +gsed2510 gs1lic103 67.49 +gsed2510 gs1lgc104 64.63 +gsed2510 gs1lgc105 63.23 +gsed2510 gs1lic106 63.78 +gsed2510 gs1lgc107 63.75 +gsed2510 gs1moc108 64.01 +gsed2510 gs1lgc109 64.35 +gsed2510 gs1lgc110 66.22 +gsed2510 gs1sec111 66.47 +gsed2510 gs1lgc112 67.22 +gsed2510 gs1lgc113 65.23 +gsed2510 gs1cgc114 67.49 +gsed2510 gs1lgc115 66.67 +gsed2510 gs1lic116 70.03 +gsed2510 gs1lgc117 69 +gsed2510 gs1lic118 69.4 +gsed2510 gs1lgc119 67.89 +gsed2510 gs1moc120 70.72 +gsed2510 gs1lgc121 68.58 +gsed2510 gs1cgc122 69.96 +gsed2510 gs1lgc123 68.62 +gsed2510 gs1sec124 71.32 +gsed2510 gs1lgc125 71.65 +gsed2510 gs1moc126 71.38 +gsed2510 gs1cgc127 72.77 +gsed2510 gs1cgc128 73.47 +gsed2510 gs1lgc129 73.17 +gsed2510 gs1lgc130 73.47 +gsed2510 gs1sec131 72.36 +gsed2510 gs1cgc132 72.76 +gsed2510 gs1cgc133 73.34 +gsed2510 gs1moc134 75.11 +gsed2510 gs1sec135 72.7 +gsed2510 gs1lgc136 74.65 +gsed2510 gs1moc137 76.69 +gsed2510 gs1lic138 76.8 +gsed2510 gs1sec139 76.57 diff --git a/data-raw/data/keys/gsed2510_by3.txt b/data-raw/data/keys/gsed2510_by3.txt new file mode 100644 index 00000000..a0303d10 --- /dev/null +++ b/data-raw/data/keys/gsed2510_by3.txt @@ -0,0 +1,243 @@ +key item tau +gsed2510 by3cgd003 12.12 +gsed2510 by3cgd004 15.09 +gsed2510 by3cgd005 15.96 +gsed2510 by3cgd006 13.58 +gsed2510 by3cgd007 18.4 +gsed2510 by3cgd008 20.55 +gsed2510 by3cgd009 20.05 +gsed2510 by3cgd010 22.87 +gsed2510 by3cgd012 25.56 +gsed2510 by3cgd013 26.42 +gsed2510 by3cgd014 26.05 +gsed2510 by3cgd015 28.64 +gsed2510 by3cgd016 23.96 +gsed2510 by3cgd017 24.16 +gsed2510 by3cgd018 27.4 +gsed2510 by3cgd019 23.24 +gsed2510 by3cgd020 25.18 +gsed2510 by3cgd021 26.34 +gsed2510 by3cgd022 27.09 +gsed2510 by3cgd023 28.54 +gsed2510 by3cgd024 35.09 +gsed2510 by3cgd025 30.4 +gsed2510 by3cgd026 31.83 +gsed2510 by3cgd027 35.68 +gsed2510 by3cgd028 39.97 +gsed2510 by3cgd029 37.59 +gsed2510 by3cgd030 38.9 +gsed2510 by3cgd031 40.34 +gsed2510 by3cgd032 38.12 +gsed2510 by3cgd033 40.84 +gsed2510 by3cgd034 41.81 +gsed2510 by3cgd035 46.08 +gsed2510 by3cgd036 44.86 +gsed2510 by3cgd037 47.98 +gsed2510 by3cgd038 48.91 +gsed2510 by3cgd039 53.35 +gsed2510 by3cgd040 51.44 +gsed2510 by3cgd041 52.55 +gsed2510 by3cgd042 51.1 +gsed2510 by3cgd043 54.66 +gsed2510 by3cgd044 55.51 +gsed2510 by3cgd045 57.93 +gsed2510 by3cgd046 59.86 +gsed2510 by3cgd047 52.39 +gsed2510 by3cgd049 59.91 +gsed2510 by3cgd050 59.3 +gsed2510 by3cgd051 58.67 +gsed2510 by3cgd052 60.17 +gsed2510 by3cgd053 63.29 +gsed2510 by3cgd054 57.44 +gsed2510 by3cgd055 55.72 +gsed2510 by3cgd056 66.3 +gsed2510 by3cgd057 62.47 +gsed2510 by3cgd058 64.55 +gsed2510 by3cgd059 63.92 +gsed2510 by3cgd060 69.15 +gsed2510 by3cgd061 66.68 +gsed2510 by3cgd062 64.75 +gsed2510 by3cgd063 68.27 +gsed2510 by3cgd064 69.34 +gsed2510 by3cgd065 69.93 +gsed2510 by3cgd066 71.45 +gsed2510 by3cgd067 71.24 +gsed2510 by3cgd068 80.9 +gsed2510 by3cgd069 73.68 +gsed2510 by3cgd070 74.24 +gsed2510 by3cgd071 74.53 +gsed2510 by3cgd072 80.48 +gsed2510 by3cgd073 77.42 +gsed2510 by3cgd074 76.02 +gsed2510 by3cgd075 81.41 +gsed2510 by3cgd076 80.37 +gsed2510 by3cgd077 83.3 +gsed2510 by3exd001 9.68 +gsed2510 by3exd003 15.74 +gsed2510 by3exd008 41.52 +gsed2510 by3exd009 38.54 +gsed2510 by3exd010 45.51 +gsed2510 by3exd011 44.11 +gsed2510 by3exd013 53.46 +gsed2510 by3exd014 52.43 +gsed2510 by3exd015 49.26 +gsed2510 by3exd016 55.87 +gsed2510 by3exd017 52.79 +gsed2510 by3exd018 57.97 +gsed2510 by3exd019 61.38 +gsed2510 by3exd020 61.66 +gsed2510 by3exd021 61.33 +gsed2510 by3exd022 62.94 +gsed2510 by3exd023 66.27 +gsed2510 by3exd024 63.44 +gsed2510 by3exd025 67.3 +gsed2510 by3exd026 67.88 +gsed2510 by3exd027 67.17 +gsed2510 by3exd028 68.31 +gsed2510 by3exd029 71.38 +gsed2510 by3exd030 71.47 +gsed2510 by3exd031 72.01 +gsed2510 by3exd032 75.09 +gsed2510 by3exd034 77.01 +gsed2510 by3exd035 76.78 +gsed2510 by3exd036 76.68 +gsed2510 by3exd037 80.56 +gsed2510 by3exd043 82.97 +gsed2510 by3fmd002 11.88 +gsed2510 by3fmd003 17.28 +gsed2510 by3fmd004 20.78 +gsed2510 by3fmd005 17.21 +gsed2510 by3fmd006 19.56 +gsed2510 by3fmd007 24.68 +gsed2510 by3fmd008 24.97 +gsed2510 by3fmd009 25.7 +gsed2510 by3fmd010 17.42 +gsed2510 by3fmd011 25.69 +gsed2510 by3fmd012 25.07 +gsed2510 by3fmd013 28.73 +gsed2510 by3fmd014 28.19 +gsed2510 by3fmd015 28.36 +gsed2510 by3fmd016 29.78 +gsed2510 by3fmd017 34.31 +gsed2510 by3fmd018 36.35 +gsed2510 by3fmd019 34.58 +gsed2510 by3fmd020 38.22 +gsed2510 by3fmd021 39.97 +gsed2510 by3fmd022 42.13 +gsed2510 by3fmd023 42.7 +gsed2510 by3fmd024 41.17 +gsed2510 by3fmd025 45.93 +gsed2510 by3fmd026 43.76 +gsed2510 by3fmd027 50.64 +gsed2510 by3fmd028 47.33 +gsed2510 by3fmd029 51.22 +gsed2510 by3fmd030 50.45 +gsed2510 by3fmd031 56.13 +gsed2510 by3fmd032 56.22 +gsed2510 by3fmd033 60.43 +gsed2510 by3fmd034 59.24 +gsed2510 by3fmd035 55.28 +gsed2510 by3fmd036 59.67 +gsed2510 by3fmd037 66.21 +gsed2510 by3fmd038 65.83 +gsed2510 by3fmd039 66 +gsed2510 by3fmd040 73.09 +gsed2510 by3fmd041 72.71 +gsed2510 by3fmd042 71.82 +gsed2510 by3fmd043 73.31 +gsed2510 by3fmd044 71.49 +gsed2510 by3fmd045 71 +gsed2510 by3fmd046 76.05 +gsed2510 by3fmd047 77.94 +gsed2510 by3fmd048 80.16 +gsed2510 by3fmd049 78.66 +gsed2510 by3fmd050 76.96 +gsed2510 by3fmd052 76.82 +gsed2510 by3fmd054 73.7 +gsed2510 by3gmd003 14.68 +gsed2510 by3gmd004 16.4 +gsed2510 by3gmd005 17.87 +gsed2510 by3gmd006 21.42 +gsed2510 by3gmd007 21.02 +gsed2510 by3gmd008 19.76 +gsed2510 by3gmd009 21.34 +gsed2510 by3gmd010 20.56 +gsed2510 by3gmd011 19.39 +gsed2510 by3gmd012 21.38 +gsed2510 by3gmd013 23.74 +gsed2510 by3gmd015 26.07 +gsed2510 by3gmd016 25.36 +gsed2510 by3gmd017 27.66 +gsed2510 by3gmd018 33.54 +gsed2510 by3gmd019 28.7 +gsed2510 by3gmd020 32.48 +gsed2510 by3gmd021 33.11 +gsed2510 by3gmd022 30.7 +gsed2510 by3gmd023 33.55 +gsed2510 by3gmd024 37.38 +gsed2510 by3gmd025 37.45 +gsed2510 by3gmd026 33.6 +gsed2510 by3gmd027 34.57 +gsed2510 by3gmd028 36.42 +gsed2510 by3gmd029 42.09 +gsed2510 by3gmd030 42.05 +gsed2510 by3gmd031 41.76 +gsed2510 by3gmd032 42.14 +gsed2510 by3gmd033 44.14 +gsed2510 by3gmd034 43.25 +gsed2510 by3gmd035 43.71 +gsed2510 by3gmd036 46.39 +gsed2510 by3gmd037 45.31 +gsed2510 by3gmd038 47.43 +gsed2510 by3gmd039 45.32 +gsed2510 by3gmd040 49.39 +gsed2510 by3gmd041 51.82 +gsed2510 by3gmd042 51.66 +gsed2510 by3gmd043 53.03 +gsed2510 by3gmd044 52.56 +gsed2510 by3gmd045 51.4 +gsed2510 by3gmd046 53.49 +gsed2510 by3gmd047 55.21 +gsed2510 by3gmd048 59.93 +gsed2510 by3gmd049 57.24 +gsed2510 by3gmd050 58.47 +gsed2510 by3gmd051 61.58 +gsed2510 by3gmd052 62.5 +gsed2510 by3gmd053 63.8 +gsed2510 by3gmd054 70.31 +gsed2510 by3gmd055 59.17 +gsed2510 by3gmd056 61.67 +gsed2510 by3gmd057 68.99 +gsed2510 by3gmd058 69.93 +gsed2510 by3gmd059 73.02 +gsed2510 by3gmd060 72.79 +gsed2510 by3gmd061 74.07 +gsed2510 by3gmd062 75.49 +gsed2510 by3gmd063 73.19 +gsed2510 by3gmd065 79.14 +gsed2510 by3red006 19.89 +gsed2510 by3red007 25.1 +gsed2510 by3red008 30.55 +gsed2510 by3red011 46.55 +gsed2510 by3red014 50.49 +gsed2510 by3red015 53.11 +gsed2510 by3red016 57.78 +gsed2510 by3red017 56.33 +gsed2510 by3red019 58.99 +gsed2510 by3red020 60.32 +gsed2510 by3red021 60.27 +gsed2510 by3red022 62.56 +gsed2510 by3red023 63.95 +gsed2510 by3red024 63.39 +gsed2510 by3red025 65.82 +gsed2510 by3red026 68.19 +gsed2510 by3red027 73.12 +gsed2510 by3red028 72.79 +gsed2510 by3red029 72.48 +gsed2510 by3red030 71.75 +gsed2510 by3red031 74.62 +gsed2510 by3red032 77.1 +gsed2510 by3red033 75.6 +gsed2510 by3red034 80.96 +gsed2510 by3red036 79.54 +gsed2510 by3red037 79.43 diff --git a/data-raw/data/keys/gsedhf.Rda b/data-raw/data/keys/gsedhf.Rda new file mode 100644 index 00000000..9e18c368 Binary files /dev/null and b/data-raw/data/keys/gsedhf.Rda differ diff --git a/data-raw/data/keys/hf_48_2406.txt b/data-raw/data/keys/hf_48_2406.txt new file mode 100644 index 00000000..a0c8fe74 --- /dev/null +++ b/data-raw/data/keys/hf_48_2406.txt @@ -0,0 +1,49 @@ +key item tau +gsed2406 gh1lgc001 9.3 +gsed2406 gh1sec002 10.86 +gsed2406 gh1lgc003 12.61 +gsed2406 gh1sec004 15.39 +gsed2406 gh1moc005 15.66 +gsed2406 gh1lgc006 16.03 +gsed2406 gh1sec007 16.04 +gsed2406 gh1clc008 17.39 +gsed2406 gh1clc009 17.42 +gsed2406 gh1gmc010 18.65 +gsed2406 gh1sec011 20.2 +gsed2406 gh1gmc012 23.41 +gsed2406 gh1moc013 23.05 +gsed2406 gh1clc014 25.64 +gsed2406 gh1moc015 26.7 +gsed2406 gh1moc016 28.89 +gsed2406 gh1moc017 29.66 +gsed2406 gh1moc018 28.92 +gsed2406 gh1moc019 29.53 +gsed2406 gh1moc020 30.2 +gsed2406 gh1clc021 31.41 +gsed2406 gh1moc022 31.59 +gsed2406 gh1sec023 35.45 +gsed2406 gh1moc024 37.43 +gsed2406 gh1moc025 37.63 +gsed2406 gh1moc026 40.1 +gsed2406 gh1lgc027 41.17 +gsed2406 gh1moc028 42.33 +gsed2406 gh1lgc029 44.73 +gsed2406 gh1moc030 46.34 +gsed2406 gh1sec031 47.23 +gsed2406 gh1moc032 47.58 +gsed2406 gh1moc033 48.06 +gsed2406 gh1moc034 48.78 +gsed2406 gh1lgc035 49.34 +gsed2406 gh1sec036 49.84 +gsed2406 gh1moc037 50.23 +gsed2406 gh1gmc038 50.6 +gsed2406 gh1moc039 51.66 +gsed2406 gh1clc040 53.97 +gsed2406 gh1clc041 56.1 +gsed2406 gh1moc042 56.68 +gsed2406 gh1xxc043 56.72 +gsed2406 gh1clc044 57.49 +gsed2406 gh1cmc045 60.22 +gsed2406 gh1clc046 63.18 +gsed2406 gh1moc047 64.14 +gsed2406 gh1clc048 65.72 diff --git a/data-raw/data/keys/hf_48_2510.txt b/data-raw/data/keys/hf_48_2510.txt new file mode 100644 index 00000000..924ff665 --- /dev/null +++ b/data-raw/data/keys/hf_48_2510.txt @@ -0,0 +1,49 @@ +key item tau +gsed2510 gh1lgc001 9.93 +gsed2510 gh1sec002 11.5 +gsed2510 gh1lgc003 11.97 +gsed2510 gh1sec004 16.25 +gsed2510 gh1moc005 15.69 +gsed2510 gh1lgc006 15.26 +gsed2510 gh1sec007 15.56 +gsed2510 gh1clc008 16.79 +gsed2510 gh1clc009 17.18 +gsed2510 gh1gmc010 16.74 +gsed2510 gh1sec011 21.47 +gsed2510 gh1gmc012 20.74 +gsed2510 gh1moc013 21.2 +gsed2510 gh1clc014 24.73 +gsed2510 gh1moc015 24.14 +gsed2510 gh1moc016 28.35 +gsed2510 gh1moc017 29.1 +gsed2510 gh1moc018 28.33 +gsed2510 gh1moc019 28.22 +gsed2510 gh1moc020 29.71 +gsed2510 gh1clc021 31.58 +gsed2510 gh1moc022 31.86 +gsed2510 gh1sec023 35.67 +gsed2510 gh1moc024 37.97 +gsed2510 gh1moc025 39.2 +gsed2510 gh1moc026 39.8 +gsed2510 gh1lgc027 42.11 +gsed2510 gh1moc028 42.41 +gsed2510 gh1lgc029 45.11 +gsed2510 gh1moc030 46.38 +gsed2510 gh1sec031 49.02 +gsed2510 gh1moc032 48.16 +gsed2510 gh1moc033 47.67 +gsed2510 gh1moc034 49.54 +gsed2510 gh1lgc035 49.74 +gsed2510 gh1sec036 50.04 +gsed2510 gh1moc037 51.28 +gsed2510 gh1gmc038 50.48 +gsed2510 gh1moc039 52.5 +gsed2510 gh1clc040 54.78 +gsed2510 gh1clc041 57.77 +gsed2510 gh1moc042 58.07 +gsed2510 gh1xxc043 59.29 +gsed2510 gh1clc044 59.21 +gsed2510 gh1cmc045 60.55 +gsed2510 gh1clc046 64.63 +gsed2510 gh1moc047 64.01 +gsed2510 gh1clc048 67.22 diff --git a/data-raw/data/keys/mullen_itembank.txt b/data-raw/data/keys/mullen_itembank.txt deleted file mode 100644 index f65481b6..00000000 --- a/data-raw/data/keys/mullen_itembank.txt +++ /dev/null @@ -1,139 +0,0 @@ -key item tau -gsed mulcgd010 29.5 -gsed mulcgd020 29.24 -gsed mulcgd040 33.5 -gsed mulcgd070 38.31 -gsed mulcgd090 42.89 -gsed mulcgd091 47.21 -gsed mulcgd110 46.68 -gsed mulcgd120 47.84 -gsed mulcgd160 52.68 -gsed mulcgd161 56.25 -gsed mulcgd163 61.49 -gsed mulcgd200 63.63 -gsed mulcgd210 64.69 -gsed mulcgd220 68.89 -gsed mulcgd230 65.29 -gsed mulcgd240 68.66 -gsed mulcgd250 67.84 -gsed mulcgd270 71.1 -gsed mulcgd280 72.07 -gsed mulcgd290 69.28 -gsed mulcgd291 70.53 -gsed mulcgd300 71.56 -gsed mulcgd301 73.28 -gsed mulcgd302 74.44 -gsed mulcgd310 76.16 -gsed mulcgd320 74.09 -gsed mulcgd321 75.68 -gsed mulcgd330 74.48 -gsed mulcgd331 76.07 -gsed mulexd080 48.35 -gsed mulexd110 47.19 -gsed mulexd111 50.78 -gsed mulexd112 55.36 -gsed mulexd130 51.77 -gsed mulexd140 57.15 -gsed mulexd150 57.56 -gsed mulexd151 63.94 -gsed mulexd152 67.83 -gsed mulexd160 60.53 -gsed mulexd170 60.22 -gsed mulexd181 68.44 -gsed mulexd182 70.28 -gsed mulexd183 72.56 -gsed mulexd201 66.62 -gsed mulexd210 65.5 -gsed mulexd220 65.07 -gsed mulexd230 70.04 -gsed mulexd240 72.93 -gsed mulexd241 73.56 -gsed mulexd242 74.3 -gsed mulexd243 75.75 -gsed mulexd244 77.75 -gsed mulexd250 70.87 -gsed mulexd260 75 -gsed mulexd261 76.47 -gsed mulexd262 77.08 -gsed mulexd270 76.01 -gsed mulexd271 77.03 -gsed mulexd272 78.17 -gsed mulexd280 77.6 -gsed mulfmd070 37.5 -gsed mulfmd080 43.79 -gsed mulfmd090 41.59 -gsed mulfmd100 43.35 -gsed mulfmd101 48.19 -gsed mulfmd120 46.05 -gsed mulfmd121 52.24 -gsed mulfmd130 43.67 -gsed mulfmd140 48.85 -gsed mulfmd150 52.22 -gsed mulfmd160 54.08 -gsed mulfmd161 62.47 -gsed mulfmd170 58.74 -gsed mulfmd181 70.43 -gsed mulfmd200 67.93 -gsed mulfmd210 69.87 -gsed mulfmd220 72.11 -gsed mulfmd221 75.59 -gsed mulfmd230 72.27 -gsed mulfmd231 75 -gsed mulfmd240 68.76 -gsed mulfmd260 73.97 -gsed mulfmd261 75.8 -gsed mulfmd270 74.26 -gsed mulfmd280 77.58 -gsed mulfmd300 76.33 -gsed mulfmd301 77.4 -gsed mulfmd302 78.28 -gsed mulgmd070 35.23 -gsed mulgmd090 38.28 -gsed mulgmd110 39.81 -gsed mulgmd120 45.67 -gsed mulgmd130 44.19 -gsed mulgmd140 49.13 -gsed mulgmd150 49.12 -gsed mulgmd160 50.79 -gsed mulgmd170 51.9 -gsed mulgmd180 50.67 -gsed mulgmd190 50.06 -gsed mulgmd200 53.39 -gsed mulgmd210 53.72 -gsed mulgmd240 61.71 -gsed mulgmd270 64.47 -gsed mulgmd280 67.17 -gsed mulgmd290 69.37 -gsed mulgmd300 70.22 -gsed mulgmd320 68.18 -gsed mulred040 32.02 -gsed mulred060 32.57 -gsed mulred110 48.38 -gsed mulred150 51.83 -gsed mulred160 57.72 -gsed mulred180 56.78 -gsed mulred181 60.05 -gsed mulred182 61.55 -gsed mulred190 56.16 -gsed mulred200 59.29 -gsed mulred223 75.26 -gsed mulred230 61.06 -gsed mulred231 63.83 -gsed mulred240 64.58 -gsed mulred250 67.37 -gsed mulred260 68.3 -gsed mulred270 73.83 -gsed mulred280 68.41 -gsed mulred290 71.14 -gsed mulred291 72.88 -gsed mulred292 74.35 -gsed mulred293 76.27 -gsed mulred300 75.58 -gsed mulred301 76.07 -gsed mulred302 76.89 -gsed mulred303 77.43 -gsed mulred304 78.87 -gsed mulred320 76.89 -gsed mulred321 78.12 -gsed mulred330 76.21 -gsed mulred331 78.31 diff --git a/data-raw/data/keys/sf2206.txt b/data-raw/data/keys/sf2206.txt index 645ed859..a7ea2c2c 100644 --- a/data-raw/data/keys/sf2206.txt +++ b/data-raw/data/keys/sf2206.txt @@ -86,8 +86,8 @@ sf2206 gpamoc084 59.22 sf2206 gpasec085 55.9 sf2206 gpasec086 53.68 sf2206 gpaxxc087 59.75 -sf2206 gpaclc088 56.7 -sf2206 gpasec089 64.74 +sf2206 gpasec088 64.74 +sf2206 gpaclc089 56.7 sf2206 gpacmc090 62.08 sf2206 gpaclc091 62.67 sf2206 gpaxxc092 59.37 diff --git a/data-raw/data/references/phase1_healthy.txt b/data-raw/data/references/phase1_healthy.txt deleted file mode 100644 index 86e63495..00000000 --- a/data-raw/data/references/phase1_healthy.txt +++ /dev/null @@ -1,186 +0,0 @@ -day week month year mu sigma nu tau -14 2 0.46 0.0383 13.77 0.1855 1.7072 144.31 -21 3 0.69 0.0575 14.52 0.1754 1.7525 135.06 -28 4 0.92 0.0767 15.25 0.1664 1.7953 126.875 -35 5 1.15 0.0958 15.99 0.1582 1.8359 119.584 -42 6 1.38 0.115 16.75 0.1509 1.8744 113.049 -49 7 1.61 0.1342 17.5 0.1442 1.911 107.162 -56 8 1.84 0.1533 18.26 0.1381 1.9461 101.831 -63 9 2.07 0.1725 19.03 0.1325 1.9796 96.983 -70 10 2.3 0.1916 19.82 0.1274 2.0118 92.556 -77 11 2.53 0.2108 20.61 0.1227 2.0427 88.497 -84 12 2.76 0.23 21.41 0.1184 2.0726 84.764 -91 13 2.99 0.2491 22.22 0.1145 2.1014 81.318 -98 14 3.22 0.2683 23.03 0.1108 2.1292 78.129 -105 15 3.45 0.2875 23.85 0.1075 2.1562 75.169 -112 16 3.68 0.3066 24.67 0.1044 2.1824 72.415 -119 17 3.91 0.3258 25.51 0.1015 2.2078 69.846 -126 18 4.14 0.345 26.36 0.0989 2.2325 67.445 -133 19 4.37 0.3641 27.22 0.0964 2.2566 65.196 -140 20 4.6 0.3833 28.1 0.0942 2.2801 63.085 -147 21 4.83 0.4025 28.98 0.092 2.303 61.1 -154 22 5.06 0.4216 29.87 0.09 2.3254 59.23 -161 23 5.29 0.4408 30.76 0.0882 2.3472 57.466 -168 24 5.52 0.46 31.65 0.0864 2.3686 55.799 -175 25 5.749 0.4791 32.54 0.0848 2.3895 54.222 -182 26 5.979 0.4983 33.41 0.0832 2.41 52.727 -189 27 6.209 0.5175 34.28 0.0818 2.4301 51.309 -196 28 6.439 0.5366 35.12 0.0804 2.4497 49.962 -203 29 6.669 0.5558 35.93 0.079 2.469 48.68 -210 30 6.899 0.5749 36.72 0.0778 2.4879 47.46 -217 31 7.129 0.5941 37.48 0.0766 2.5065 46.296 -224 32 7.359 0.6133 38.2 0.0755 2.5248 45.186 -231 33 7.589 0.6324 38.89 0.0744 2.5427 44.125 -238 34 7.819 0.6516 39.55 0.0733 2.5603 43.11 -245 35 8.049 0.6708 40.19 0.0723 2.5776 42.139 -252 36 8.279 0.6899 40.81 0.0713 2.5947 41.209 -259 37 8.509 0.7091 41.41 0.0704 2.6114 40.316 -266 38 8.739 0.7283 42 0.0695 2.6279 39.46 -273 39 8.969 0.7474 42.57 0.0686 2.6441 38.638 -280 40 9.199 0.7666 43.13 0.0678 2.6601 37.847 -287 41 9.429 0.7858 43.67 0.0669 2.6758 37.086 -294 42 9.659 0.8049 44.2 0.0662 2.6912 36.354 -301 43 9.889 0.8241 44.71 0.0654 2.7065 35.649 -308 44 10.119 0.8433 45.21 0.0647 2.7215 34.969 -315 45 10.349 0.8624 45.7 0.064 2.7363 34.313 -322 46 10.579 0.8816 46.18 0.0633 2.7509 33.68 -329 47 10.809 0.9008 46.65 0.0626 2.7652 33.068 -336 48 11.039 0.9199 47.12 0.062 2.7794 32.478 -343 49 11.269 0.9391 47.57 0.0614 2.7933 31.906 -350 50 11.499 0.9582 48.03 0.0608 2.8071 31.354 -357 51 11.729 0.9774 48.48 0.0602 2.8207 30.819 -364 52 11.959 0.9966 48.92 0.0596 2.8341 30.301 -371 53 12.189 1.0157 49.36 0.0591 2.8473 29.799 -378 54 12.419 1.0349 49.79 0.0586 2.8604 29.313 -385 55 12.649 1.0541 50.22 0.0581 2.8733 28.841 -392 56 12.879 1.0732 50.64 0.0576 2.886 28.383 -399 57 13.109 1.0924 51.06 0.0571 2.8985 27.939 -406 58 13.339 1.1116 51.48 0.0567 2.9109 27.508 -413 59 13.569 1.1307 51.88 0.0562 2.9232 27.089 -420 60 13.799 1.1499 52.29 0.0558 2.9353 26.682 -427 61 14.029 1.1691 52.68 0.0554 2.9473 26.286 -434 62 14.259 1.1882 53.07 0.055 2.9591 25.901 -441 63 14.489 1.2074 53.46 0.0546 2.9708 25.526 -448 64 14.719 1.2266 53.84 0.0542 2.9823 25.162 -455 65 14.949 1.2457 54.21 0.0539 2.9937 24.807 -462 66 15.179 1.2649 54.58 0.0535 3.005 24.462 -469 67 15.409 1.2841 54.94 0.0532 3.0162 24.125 -476 68 15.639 1.3032 55.3 0.0528 3.0272 23.797 -483 69 15.869 1.3224 55.65 0.0525 3.0381 23.477 -490 70 16.099 1.3415 55.99 0.0521 3.0489 23.165 -497 71 16.329 1.3607 56.33 0.0518 3.0596 22.861 -504 72 16.559 1.3799 56.66 0.0515 3.0702 22.565 -511 73 16.789 1.399 56.99 0.0512 3.0807 22.275 -518 74 17.018 1.4182 57.31 0.0509 3.091 21.993 -525 75 17.248 1.4374 57.62 0.0506 3.1012 21.717 -532 76 17.478 1.4565 57.93 0.0503 3.1114 21.448 -539 77 17.708 1.4757 58.24 0.05 3.1214 21.184 -546 78 17.938 1.4949 58.54 0.0497 3.1313 20.927 -553 79 18.168 1.514 58.83 0.0494 3.1412 20.676 -560 80 18.398 1.5332 59.12 0.0492 3.1509 20.43 -567 81 18.628 1.5524 59.41 0.0489 3.1606 20.19 -574 82 18.858 1.5715 59.69 0.0486 3.1701 19.955 -581 83 19.088 1.5907 59.97 0.0483 3.1796 19.725 -588 84 19.318 1.6099 60.24 0.0481 3.1889 19.501 -595 85 19.548 1.629 60.51 0.0478 3.1982 19.28 -602 86 19.778 1.6482 60.78 0.0475 3.2074 19.065 -609 87 20.008 1.6674 61.04 0.0473 3.2165 18.854 -616 88 20.238 1.6865 61.3 0.047 3.2255 18.648 -623 89 20.468 1.7057 61.55 0.0468 3.2344 18.445 -630 90 20.698 1.7248 61.81 0.0465 3.2433 18.247 -637 91 20.928 1.744 62.05 0.0463 3.2521 18.053 -644 92 21.158 1.7632 62.3 0.046 3.2608 17.863 -651 93 21.388 1.7823 62.54 0.0458 3.2694 17.676 -658 94 21.618 1.8015 62.78 0.0455 3.2779 17.494 -665 95 21.848 1.8207 63.02 0.0453 3.2864 17.314 -672 96 22.078 1.8398 63.25 0.045 3.2948 17.139 -679 97 22.308 1.859 63.48 0.0448 3.3031 16.966 -686 98 22.538 1.8782 63.71 0.0446 3.3113 16.797 -693 99 22.768 1.8973 63.94 0.0443 3.3195 16.631 -700 100 22.998 1.9165 64.17 0.0441 3.3276 16.468 -707 101 23.228 1.9357 64.39 0.0439 3.3356 16.308 -714 102 23.458 1.9548 64.61 0.0436 3.3436 16.151 -721 103 23.688 1.974 64.83 0.0434 3.3515 15.997 -728 104 23.918 1.9932 65.05 0.0432 3.3593 15.846 -735 105 24.148 2.0123 65.27 0.0429 3.3671 15.697 -742 106 24.378 2.0315 65.48 0.0427 3.3748 15.551 -749 107 24.608 2.0507 65.7 0.0425 3.3825 15.408 -756 108 24.838 2.0698 65.91 0.0423 3.3901 15.267 -763 109 25.068 2.089 66.12 0.042 3.3976 15.128 -770 110 25.298 2.1081 66.33 0.0418 3.405 14.992 -777 111 25.528 2.1273 66.53 0.0416 3.4125 14.858 -784 112 25.758 2.1465 66.74 0.0414 3.4198 14.727 -791 113 25.988 2.1656 66.94 0.0412 3.4271 14.597 -798 114 26.218 2.1848 67.14 0.041 3.4343 14.47 -805 115 26.448 2.204 67.35 0.0408 3.4415 14.345 -812 116 26.678 2.2231 67.54 0.0405 3.4486 14.222 -819 117 26.908 2.2423 67.74 0.0403 3.4557 14.101 -826 118 27.138 2.2615 67.94 0.0401 3.4627 13.982 -833 119 27.368 2.2806 68.13 0.0399 3.4697 13.865 -840 120 27.598 2.2998 68.32 0.0397 3.4766 13.75 -847 121 27.828 2.319 68.51 0.0395 3.4834 13.636 -854 122 28.057 2.3381 68.7 0.0393 3.4902 13.524 -861 123 28.287 2.3573 68.89 0.0391 3.497 13.414 -868 124 28.517 2.3765 69.07 0.0389 3.5037 13.306 -875 125 28.747 2.3956 69.25 0.0387 3.5104 13.199 -882 126 28.977 2.4148 69.42 0.0385 3.517 13.094 -889 127 29.207 2.4339 69.6 0.0383 3.5235 12.991 -896 128 29.437 2.4531 69.77 0.0381 3.5301 12.889 -903 129 29.667 2.4723 69.93 0.038 3.5365 12.788 -910 130 29.897 2.4914 70.09 0.0378 3.543 12.689 -917 131 30.127 2.5106 70.25 0.0376 3.5494 12.592 -924 132 30.357 2.5298 70.41 0.0374 3.5557 12.496 -931 133 30.587 2.5489 70.56 0.0372 3.562 12.401 -938 134 30.817 2.5681 70.72 0.037 3.5682 12.308 -945 135 31.047 2.5873 70.86 0.0369 3.5745 12.216 -952 136 31.277 2.6064 71.01 0.0367 3.5806 12.125 -959 137 31.507 2.6256 71.15 0.0365 3.5868 12.035 -966 138 31.737 2.6448 71.28 0.0363 3.5929 11.947 -973 139 31.967 2.6639 71.42 0.0362 3.5989 11.86 -980 140 32.197 2.6831 71.55 0.036 3.6049 11.774 -987 141 32.427 2.7023 71.68 0.0358 3.6109 11.689 -994 142 32.657 2.7214 71.8 0.0357 3.6168 11.606 -1001 143 32.887 2.7406 71.93 0.0355 3.6227 11.524 -1008 144 33.117 2.7598 72.05 0.0353 3.6286 11.442 -1015 145 33.347 2.7789 72.16 0.0352 3.6344 11.362 -1022 146 33.577 2.7981 72.28 0.035 3.6402 11.283 -1029 147 33.807 2.8172 72.39 0.0349 3.6459 11.205 -1036 148 34.037 2.8364 72.5 0.0347 3.6516 11.128 -1043 149 34.267 2.8556 72.6 0.0345 3.6573 11.051 -1050 150 34.497 2.8747 72.71 0.0344 3.663 10.976 -1057 151 34.727 2.8939 72.81 0.0342 3.6686 10.902 -1064 152 34.957 2.9131 72.91 0.0341 3.6742 10.829 -1071 153 35.187 2.9322 73.01 0.0339 3.6797 10.757 -1078 154 35.417 2.9514 73.1 0.0338 3.6852 10.685 -1085 155 35.647 2.9706 73.2 0.0336 3.6907 10.615 -1092 156 35.877 2.9897 73.29 0.0335 3.6961 10.545 -1099 157 36.107 3.0089 73.38 0.0333 3.7015 10.476 -1106 158 36.337 3.0281 73.47 0.0332 3.7069 10.408 -1113 159 36.567 3.0472 73.55 0.0331 3.7123 10.341 -1120 160 36.797 3.0664 73.64 0.0329 3.7176 10.275 -1127 161 37.027 3.0856 73.72 0.0328 3.7229 10.21 -1134 162 37.257 3.1047 73.8 0.0326 3.7281 10.145 -1141 163 37.487 3.1239 73.89 0.0325 3.7334 10.081 -1148 164 37.717 3.1431 73.96 0.0324 3.7386 10.018 -1155 165 37.947 3.1622 74.04 0.0322 3.7437 9.955 -1162 166 38.177 3.1814 74.12 0.0321 3.7489 9.894 -1169 167 38.407 3.2005 74.19 0.032 3.754 9.833 -1176 168 38.637 3.2197 74.27 0.0318 3.7591 9.772 -1183 169 38.867 3.2389 74.34 0.0317 3.7641 9.713 -1190 170 39.097 3.258 74.41 0.0316 3.7691 9.654 -1197 171 39.326 3.2772 74.48 0.0315 3.7742 9.596 -1204 172 39.556 3.2964 74.56 0.0313 3.7791 9.538 -1211 173 39.786 3.3155 74.63 0.0312 3.7841 9.481 -1218 174 40.016 3.3347 74.7 0.0311 3.789 9.425 -1225 175 40.246 3.3539 74.76 0.031 3.7939 9.37 -1232 176 40.476 3.373 74.83 0.0309 3.7988 9.315 -1239 177 40.706 3.3922 74.9 0.0307 3.8036 9.26 -1246 178 40.936 3.4114 74.97 0.0306 3.8084 9.206 -1253 179 41.166 3.4305 75.03 0.0305 3.8132 9.153 -1260 180 41.396 3.4497 75.1 0.0304 3.818 9.101 -1267 181 41.626 3.4689 75.17 0.0303 3.8227 9.048 -1274 182 41.856 3.488 75.23 0.0301 3.8275 8.997 -1281 183 42.086 3.5072 75.3 0.03 3.8322 8.946 -1288 184 42.316 3.5264 75.36 0.0299 3.8368 8.896 -1295 185 42.546 3.5455 75.43 0.0298 3.8415 8.846 -1302 186 42.776 3.5647 75.49 0.0297 3.8461 8.796 diff --git a/data-raw/data/references/preliminary_standards.txt b/data-raw/data/references/preliminary_standards.txt new file mode 100644 index 00000000..a6d81300 --- /dev/null +++ b/data-raw/data/references/preliminary_standards.txt @@ -0,0 +1,187 @@ +day week month year mu sigma nu tau +0 0 0 0 11.46 0.2075 1.42 34.189 +14 2 0.46 0.0383 13.18 0.2075 1.42 34.189 +21 3 0.69 0.0575 14.04 0.2001 1.426 34.121 +28 4 0.92 0.0767 14.9 0.193 1.432 34.053 +35 5 1.15 0.0958 15.76 0.1861 1.438 33.985 +42 6 1.38 0.115 16.62 0.1795 1.444 33.918 +49 7 1.61 0.1342 17.47 0.1733 1.45 33.85 +56 8 1.84 0.1533 18.33 0.1672 1.456 33.783 +63 9 2.07 0.1725 19.19 0.1615 1.462 33.716 +70 10 2.3 0.1916 20.05 0.156 1.4681 33.649 +77 11 2.53 0.2108 20.91 0.1508 1.4741 33.582 +84 12 2.76 0.23 21.77 0.1458 1.4801 33.515 +91 13 2.99 0.2491 22.62 0.141 1.4861 33.448 +98 14 3.22 0.2683 23.48 0.1365 1.4921 33.382 +105 15 3.45 0.2875 24.33 0.1322 1.4981 33.315 +112 16 3.68 0.3066 25.18 0.1281 1.5041 33.249 +119 17 3.91 0.3258 26.02 0.1242 1.5101 33.183 +126 18 4.14 0.345 26.86 0.1205 1.5161 33.117 +133 19 4.37 0.3641 27.69 0.117 1.5221 33.051 +140 20 4.6 0.3833 28.52 0.1137 1.5281 32.985 +147 21 4.83 0.4025 29.34 0.1106 1.5341 32.92 +154 22 5.06 0.4216 30.15 0.1076 1.5401 32.854 +161 23 5.29 0.4408 30.96 0.1048 1.5461 32.789 +168 24 5.52 0.46 31.76 0.1022 1.5522 32.724 +175 25 5.749 0.4791 32.54 0.0997 1.5582 32.659 +182 26 5.979 0.4983 33.32 0.0973 1.5642 32.594 +189 27 6.209 0.5175 34.08 0.0951 1.5702 32.529 +196 28 6.439 0.5366 34.84 0.093 1.5762 32.464 +203 29 6.669 0.5558 35.58 0.091 1.5822 32.4 +210 30 6.899 0.5749 36.3 0.0891 1.5882 32.335 +217 31 7.129 0.5941 37.01 0.0873 1.5942 32.271 +224 32 7.359 0.6133 37.71 0.0856 1.6002 32.207 +231 33 7.589 0.6324 38.4 0.084 1.6062 32.143 +238 34 7.819 0.6516 39.08 0.0825 1.6122 32.079 +245 35 8.049 0.6708 39.74 0.0811 1.6182 32.015 +252 36 8.279 0.6899 40.38 0.0797 1.6242 31.951 +259 37 8.509 0.7091 41.02 0.0784 1.6302 31.888 +266 38 8.739 0.7283 41.64 0.0772 1.6363 31.824 +273 39 8.969 0.7474 42.25 0.0761 1.6423 31.761 +280 40 9.199 0.7666 42.85 0.075 1.6483 31.698 +287 41 9.429 0.7858 43.44 0.074 1.6543 31.635 +294 42 9.659 0.8049 44.01 0.073 1.6603 31.572 +301 43 9.889 0.8241 44.58 0.0721 1.6663 31.509 +308 44 10.119 0.8433 45.13 0.0712 1.6723 31.446 +315 45 10.349 0.8624 45.67 0.0704 1.6783 31.384 +322 46 10.579 0.8816 46.21 0.0696 1.6843 31.321 +329 47 10.809 0.9008 46.73 0.0689 1.6903 31.259 +336 48 11.039 0.9199 47.24 0.0682 1.6963 31.197 +343 49 11.269 0.9391 47.75 0.0675 1.7023 31.135 +350 50 11.499 0.9582 48.25 0.0669 1.7083 31.073 +357 51 11.729 0.9774 48.73 0.0662 1.7143 31.011 +364 52 11.959 0.9966 49.21 0.0657 1.7204 30.949 +371 53 12.189 1.0157 49.68 0.0651 1.7264 30.888 +378 54 12.419 1.0349 50.15 0.0646 1.7324 30.826 +385 55 12.649 1.0541 50.6 0.0641 1.7384 30.765 +392 56 12.879 1.0732 51.04 0.0636 1.7444 30.704 +399 57 13.109 1.0924 51.48 0.0631 1.7504 30.643 +406 58 13.339 1.1116 51.91 0.0627 1.7564 30.582 +413 59 13.569 1.1307 52.33 0.0623 1.7624 30.521 +420 60 13.799 1.1499 52.74 0.0619 1.7684 30.46 +427 61 14.029 1.1691 53.14 0.0615 1.7744 30.4 +434 62 14.259 1.1882 53.54 0.0611 1.7804 30.339 +441 63 14.489 1.2074 53.92 0.0608 1.7864 30.279 +448 64 14.719 1.2266 54.3 0.0605 1.7924 30.219 +455 65 14.949 1.2457 54.67 0.0601 1.7984 30.158 +462 66 15.179 1.2649 55.04 0.0598 1.8045 30.098 +469 67 15.409 1.2841 55.39 0.0596 1.8105 30.039 +476 68 15.639 1.3032 55.74 0.0593 1.8165 29.979 +483 69 15.869 1.3224 56.08 0.059 1.8225 29.919 +490 70 16.099 1.3415 56.42 0.0588 1.8285 29.86 +497 71 16.329 1.3607 56.74 0.0586 1.8345 29.8 +504 72 16.559 1.3799 57.06 0.0583 1.8405 29.741 +511 73 16.789 1.399 57.38 0.0581 1.8465 29.682 +518 74 17.018 1.4182 57.68 0.0579 1.8525 29.623 +525 75 17.248 1.4374 57.99 0.0578 1.8585 29.564 +532 76 17.478 1.4565 58.28 0.0576 1.8645 29.505 +539 77 17.708 1.4757 58.57 0.0574 1.8705 29.446 +546 78 17.938 1.4949 58.86 0.0573 1.8765 29.388 +553 79 18.168 1.514 59.14 0.0572 1.8825 29.329 +560 80 18.398 1.5332 59.42 0.057 1.8886 29.271 +567 81 18.628 1.5524 59.69 0.0569 1.8946 29.213 +574 82 18.858 1.5715 59.96 0.0568 1.9006 29.155 +581 83 19.088 1.5907 60.22 0.0567 1.9066 29.097 +588 84 19.318 1.6099 60.49 0.0566 1.9126 29.039 +595 85 19.548 1.629 60.74 0.0565 1.9186 28.981 +602 86 19.778 1.6482 61 0.0565 1.9246 28.923 +609 87 20.008 1.6674 61.25 0.0564 1.9306 28.866 +616 88 20.238 1.6865 61.5 0.0563 1.9366 28.808 +623 89 20.468 1.7057 61.75 0.0562 1.9426 28.751 +630 90 20.698 1.7248 62 0.0562 1.9486 28.694 +637 91 20.928 1.744 62.24 0.0561 1.9546 28.637 +644 92 21.158 1.7632 62.48 0.056 1.9606 28.58 +651 93 21.388 1.7823 62.72 0.056 1.9666 28.523 +658 94 21.618 1.8015 62.96 0.0559 1.9727 28.466 +665 95 21.848 1.8207 63.19 0.0559 1.9787 28.41 +672 96 22.078 1.8398 63.43 0.0558 1.9847 28.353 +679 97 22.308 1.859 63.66 0.0558 1.9907 28.297 +686 98 22.538 1.8782 63.89 0.0557 1.9967 28.24 +693 99 22.768 1.8973 64.12 0.0557 2.0027 28.184 +700 100 22.998 1.9165 64.35 0.0556 2.0087 28.128 +707 101 23.228 1.9357 64.57 0.0555 2.0147 28.072 +714 102 23.458 1.9548 64.8 0.0555 2.0207 28.016 +721 103 23.688 1.974 65.02 0.0554 2.0267 27.961 +728 104 23.918 1.9932 65.25 0.0553 2.0327 27.905 +735 105 24.148 2.0123 65.47 0.0553 2.0387 27.849 +742 106 24.378 2.0315 65.69 0.0552 2.0447 27.794 +749 107 24.608 2.0507 65.91 0.0551 2.0507 27.739 +756 108 24.838 2.0698 66.13 0.055 2.0567 27.684 +763 109 25.068 2.089 66.35 0.0549 2.0628 27.628 +770 110 25.298 2.1081 66.57 0.0549 2.0688 27.574 +777 111 25.528 2.1273 66.79 0.0548 2.0748 27.519 +784 112 25.758 2.1465 67 0.0547 2.0808 27.464 +791 113 25.988 2.1656 67.22 0.0545 2.0868 27.409 +798 114 26.218 2.1848 67.44 0.0544 2.0928 27.355 +805 115 26.448 2.204 67.65 0.0543 2.0988 27.3 +812 116 26.678 2.2231 67.86 0.0542 2.1048 27.246 +819 117 26.908 2.2423 68.08 0.0541 2.1108 27.192 +826 118 27.138 2.2615 68.29 0.0539 2.1168 27.138 +833 119 27.368 2.2806 68.5 0.0538 2.1228 27.084 +840 120 27.598 2.2998 68.71 0.0537 2.1288 27.03 +847 121 27.828 2.319 68.92 0.0536 2.1348 26.976 +854 122 28.057 2.3381 69.13 0.0534 2.1408 26.922 +861 123 28.287 2.3573 69.33 0.0533 2.1469 26.869 +868 124 28.517 2.3765 69.53 0.0532 2.1529 26.815 +875 125 28.747 2.3956 69.74 0.0531 2.1589 26.762 +882 126 28.977 2.4148 69.94 0.053 2.1649 26.709 +889 127 29.207 2.4339 70.13 0.0528 2.1709 26.656 +896 128 29.437 2.4531 70.33 0.0527 2.1769 26.603 +903 129 29.667 2.4723 70.52 0.0526 2.1829 26.55 +910 130 29.897 2.4914 70.71 0.0525 2.1889 26.497 +917 131 30.127 2.5106 70.9 0.0524 2.1949 26.444 +924 132 30.357 2.5298 71.09 0.0523 2.2009 26.392 +931 133 30.587 2.5489 71.27 0.0522 2.2069 26.339 +938 134 30.817 2.5681 71.45 0.0522 2.2129 26.287 +945 135 31.047 2.5873 71.63 0.0521 2.2189 26.234 +952 136 31.277 2.6064 71.81 0.052 2.2249 26.182 +959 137 31.507 2.6256 71.98 0.0519 2.2309 26.13 +966 138 31.737 2.6448 72.15 0.0519 2.237 26.078 +973 139 31.967 2.6639 72.32 0.0518 2.243 26.026 +980 140 32.197 2.6831 72.48 0.0518 2.249 25.974 +987 141 32.427 2.7023 72.64 0.0517 2.255 25.923 +994 142 32.657 2.7214 72.8 0.0517 2.261 25.871 +1001 143 32.887 2.7406 72.95 0.0516 2.267 25.82 +1008 144 33.117 2.7598 73.1 0.0516 2.273 25.768 +1015 145 33.347 2.7789 73.25 0.0515 2.279 25.717 +1022 146 33.577 2.7981 73.39 0.0515 2.285 25.666 +1029 147 33.807 2.8172 73.53 0.0515 2.291 25.615 +1036 148 34.037 2.8364 73.67 0.0514 2.297 25.564 +1043 149 34.267 2.8556 73.8 0.0514 2.303 25.513 +1050 150 34.497 2.8747 73.93 0.0514 2.309 25.462 +1057 151 34.727 2.8939 74.06 0.0514 2.315 25.412 +1064 152 34.957 2.9131 74.19 0.0513 2.321 25.361 +1071 153 35.187 2.9322 74.31 0.0513 2.3271 25.311 +1078 154 35.417 2.9514 74.43 0.0513 2.3331 25.26 +1085 155 35.647 2.9706 74.55 0.0513 2.3391 25.21 +1092 156 35.877 2.9897 74.66 0.0512 2.3451 25.16 +1099 157 36.107 3.0089 74.77 0.0512 2.3511 25.11 +1106 158 36.337 3.0281 74.88 0.0512 2.3571 25.06 +1113 159 36.567 3.0472 74.99 0.0511 2.3631 25.01 +1120 160 36.797 3.0664 75.09 0.0511 2.3691 24.96 +1127 161 37.027 3.0856 75.19 0.0511 2.3751 24.911 +1134 162 37.257 3.1047 75.29 0.051 2.3811 24.861 +1141 163 37.487 3.1239 75.39 0.051 2.3871 24.812 +1148 164 37.717 3.1431 75.48 0.0509 2.3931 24.762 +1155 165 37.947 3.1622 75.58 0.0509 2.3991 24.713 +1162 166 38.177 3.1814 75.67 0.0508 2.4051 24.664 +1169 167 38.407 3.2005 75.76 0.0507 2.4112 24.615 +1176 168 38.637 3.2197 75.85 0.0507 2.4172 24.566 +1183 169 38.867 3.2389 75.93 0.0506 2.4232 24.517 +1190 170 39.097 3.258 76.02 0.0505 2.4292 24.468 +1197 171 39.326 3.2772 76.1 0.0504 2.4352 24.419 +1204 172 39.556 3.2964 76.19 0.0503 2.4412 24.371 +1211 173 39.786 3.3155 76.27 0.0503 2.4472 24.322 +1218 174 40.016 3.3347 76.35 0.0502 2.4532 24.274 +1225 175 40.246 3.3539 76.43 0.0501 2.4592 24.226 +1232 176 40.476 3.373 76.51 0.05 2.4652 24.177 +1239 177 40.706 3.3922 76.59 0.0498 2.4712 24.129 +1246 178 40.936 3.4114 76.67 0.0497 2.4772 24.081 +1253 179 41.166 3.4305 76.75 0.0496 2.4832 24.033 +1260 180 41.396 3.4497 76.82 0.0495 2.4892 23.986 +1267 181 41.626 3.4689 76.9 0.0494 2.4952 23.938 +1274 182 41.856 3.488 76.98 0.0493 2.5013 23.89 +1281 183 42.086 3.5072 77.06 0.0492 2.5073 23.843 +1288 184 42.316 3.5264 77.13 0.049 2.5133 23.795 +1295 185 42.546 3.5455 77.21 0.0489 2.5193 23.748 +1302 186 42.776 3.5647 77.29 0.0488 2.5253 23.701 diff --git a/data-raw/data/references/who_descriptive_gsed2510.txt b/data-raw/data/references/who_descriptive_gsed2510.txt new file mode 100644 index 00000000..f1634c2c --- /dev/null +++ b/data-raw/data/references/who_descriptive_gsed2510.txt @@ -0,0 +1,189 @@ +day week month year mu sigma nu tau +0 0 0 0 11.61 0.262 0.9079 21.068 +7 1 0.23 0.0192 12.4 0.2519 0.931 21.106 +14 2 0.46 0.0383 13.2 0.2422 0.9541 21.144 +21 3 0.69 0.0575 14 0.2329 0.9772 21.182 +28 4 0.92 0.0767 14.8 0.2239 1.0008 21.22 +35 5 1.15 0.0958 15.6 0.2153 1.0253 21.257 +42 6 1.38 0.115 16.4 0.2071 1.0513 21.295 +49 7 1.61 0.1342 17.2 0.1992 1.0789 21.334 +56 8 1.84 0.1533 18 0.1916 1.108 21.372 +63 9 2.07 0.1725 18.81 0.1844 1.1382 21.41 +70 10 2.3 0.1916 19.63 0.1775 1.1692 21.448 +77 11 2.53 0.2108 20.45 0.171 1.2008 21.486 +84 12 2.76 0.23 21.27 0.1647 1.2328 21.525 +91 13 2.99 0.2491 22.1 0.1588 1.2651 21.563 +98 14 3.22 0.2683 22.94 0.1532 1.2973 21.602 +105 15 3.45 0.2875 23.77 0.1479 1.3293 21.64 +112 16 3.68 0.3066 24.62 0.1428 1.3607 21.679 +119 17 3.91 0.3258 25.46 0.138 1.3914 21.718 +126 18 4.14 0.345 26.31 0.1335 1.4211 21.756 +133 19 4.37 0.3641 27.15 0.1292 1.4497 21.795 +140 20 4.6 0.3833 28 0.1252 1.4772 21.834 +147 21 4.83 0.4025 28.85 0.1213 1.5036 21.873 +154 22 5.06 0.4216 29.69 0.1177 1.5292 21.912 +161 23 5.29 0.4408 30.53 0.1143 1.5539 21.951 +168 24 5.52 0.46 31.36 0.111 1.5778 21.99 +175 25 5.75 0.4791 32.18 0.108 1.6011 22.029 +182 26 5.98 0.4983 32.99 0.1051 1.6238 22.069 +189 27 6.21 0.5175 33.78 0.1023 1.6461 22.108 +196 28 6.44 0.5366 34.56 0.0997 1.6682 22.147 +203 29 6.67 0.5558 35.32 0.0973 1.6902 22.187 +210 30 6.9 0.5749 36.06 0.095 1.712 22.226 +217 31 7.13 0.5941 36.79 0.0928 1.7337 22.266 +224 32 7.36 0.6133 37.49 0.0908 1.755 22.306 +231 33 7.59 0.6324 38.18 0.0888 1.7759 22.345 +238 34 7.82 0.6516 38.84 0.087 1.7961 22.385 +245 35 8.05 0.6708 39.49 0.0853 1.8155 22.425 +252 36 8.28 0.6899 40.12 0.0836 1.8338 22.465 +259 37 8.51 0.7091 40.74 0.0821 1.8509 22.505 +266 38 8.74 0.7283 41.35 0.0807 1.8667 22.545 +273 39 8.97 0.7474 41.94 0.0793 1.8812 22.585 +280 40 9.2 0.7666 42.52 0.078 1.8945 22.625 +287 41 9.43 0.7858 43.09 0.0768 1.9065 22.665 +294 42 9.66 0.8049 43.65 0.0757 1.9173 22.705 +301 43 9.89 0.8241 44.2 0.0746 1.9269 22.746 +308 44 10.12 0.8433 44.75 0.0736 1.9355 22.786 +315 45 10.35 0.8624 45.29 0.0727 1.9431 22.826 +322 46 10.58 0.8816 45.82 0.0718 1.9498 22.867 +329 47 10.81 0.9008 46.35 0.071 1.9556 22.907 +336 48 11.04 0.9199 46.88 0.0703 1.9605 22.948 +343 49 11.27 0.9391 47.4 0.0695 1.9647 22.989 +350 50 11.5 0.9582 47.92 0.0689 1.9683 23.03 +357 51 11.73 0.9774 48.43 0.0682 1.9712 23.07 +364 52 11.96 0.9966 48.94 0.0676 1.9736 23.111 +371 53 12.19 1.0157 49.45 0.067 1.9757 23.152 +378 54 12.42 1.0349 49.94 0.0665 1.9774 23.193 +385 55 12.65 1.0541 50.43 0.066 1.9789 23.234 +392 56 12.88 1.0732 50.92 0.0655 1.9802 23.276 +399 57 13.11 1.0924 51.39 0.065 1.9813 23.317 +406 58 13.34 1.1116 51.86 0.0646 1.9822 23.358 +413 59 13.57 1.1307 52.32 0.0641 1.9828 23.399 +420 60 13.8 1.1499 52.77 0.0637 1.9832 23.441 +427 61 14.03 1.1691 53.21 0.0633 1.9831 23.482 +434 62 14.26 1.1882 53.64 0.0629 1.9826 23.524 +441 63 14.49 1.2074 54.07 0.0626 1.9815 23.566 +448 64 14.72 1.2266 54.48 0.0622 1.9797 23.607 +455 65 14.95 1.2457 54.89 0.0619 1.9772 23.649 +462 66 15.18 1.2649 55.29 0.0615 1.9739 23.691 +469 67 15.41 1.2841 55.68 0.0612 1.9699 23.733 +476 68 15.64 1.3032 56.06 0.0609 1.9652 23.775 +483 69 15.87 1.3224 56.43 0.0606 1.9598 23.817 +490 70 16.1 1.3415 56.79 0.0603 1.9539 23.859 +497 71 16.33 1.3607 57.14 0.06 1.9475 23.901 +504 72 16.56 1.3799 57.49 0.0597 1.9407 23.943 +511 73 16.79 1.399 57.82 0.0595 1.9334 23.985 +518 74 17.02 1.4182 58.15 0.0592 1.9258 24.028 +525 75 17.25 1.4374 58.47 0.0589 1.9179 24.07 +532 76 17.48 1.4565 58.79 0.0587 1.9097 24.113 +539 77 17.71 1.4757 59.1 0.0585 1.9013 24.155 +546 78 17.94 1.4949 59.4 0.0582 1.8927 24.198 +553 79 18.17 1.514 59.69 0.058 1.884 24.241 +560 80 18.4 1.5332 59.99 0.0578 1.8752 24.283 +567 81 18.63 1.5524 60.27 0.0576 1.8664 24.326 +574 82 18.86 1.5715 60.55 0.0574 1.8575 24.369 +581 83 19.09 1.5907 60.82 0.0572 1.8487 24.412 +588 84 19.32 1.6099 61.09 0.057 1.8398 24.455 +595 85 19.55 1.629 61.36 0.0568 1.8311 24.498 +602 86 19.78 1.6482 61.62 0.0566 1.8224 24.541 +609 87 20.01 1.6674 61.88 0.0565 1.8139 24.585 +616 88 20.24 1.6865 62.13 0.0563 1.8056 24.628 +623 89 20.47 1.7057 62.38 0.0561 1.7977 24.671 +630 90 20.7 1.7248 62.63 0.056 1.7902 24.715 +637 91 20.93 1.744 62.87 0.0558 1.7834 24.758 +644 92 21.16 1.7632 63.11 0.0556 1.7773 24.802 +651 93 21.39 1.7823 63.35 0.0555 1.7722 24.846 +658 94 21.62 1.8015 63.58 0.0553 1.7679 24.889 +665 95 21.85 1.8207 63.81 0.0552 1.7646 24.933 +672 96 22.08 1.8398 64.04 0.055 1.7624 24.977 +679 97 22.31 1.859 64.26 0.0549 1.7611 25.021 +686 98 22.54 1.8782 64.48 0.0548 1.7607 25.065 +693 99 22.77 1.8973 64.71 0.0546 1.7613 25.109 +700 100 23 1.9165 64.93 0.0545 1.7627 25.153 +707 101 23.23 1.9357 65.15 0.0544 1.765 25.197 +714 102 23.46 1.9548 65.36 0.0543 1.7681 25.242 +721 103 23.69 1.974 65.58 0.0542 1.772 25.286 +728 104 23.92 1.9932 65.79 0.054 1.7768 25.33 +735 105 24.15 2.0123 66.01 0.0539 1.7823 25.375 +742 106 24.38 2.0315 66.22 0.0538 1.7887 25.42 +749 107 24.61 2.0507 66.43 0.0537 1.7957 25.464 +756 108 24.84 2.0698 66.63 0.0536 1.8035 25.509 +763 109 25.07 2.089 66.84 0.0535 1.812 25.554 +770 110 25.3 2.1081 67.04 0.0534 1.8209 25.598 +777 111 25.53 2.1273 67.24 0.0534 1.8303 25.643 +784 112 25.76 2.1465 67.44 0.0533 1.8401 25.688 +791 113 25.99 2.1656 67.64 0.0532 1.8501 25.733 +798 114 26.22 2.1848 67.83 0.0531 1.8602 25.779 +805 115 26.45 2.204 68.03 0.053 1.8704 25.824 +812 116 26.68 2.2231 68.22 0.0529 1.8805 25.869 +819 117 26.91 2.2423 68.41 0.0529 1.8906 25.914 +826 118 27.14 2.2615 68.6 0.0528 1.9005 25.96 +833 119 27.37 2.2806 68.79 0.0527 1.9102 26.005 +840 120 27.6 2.2998 68.98 0.0526 1.9194 26.051 +847 121 27.83 2.319 69.17 0.0526 1.928 26.097 +854 122 28.06 2.3381 69.35 0.0525 1.9359 26.142 +861 123 28.29 2.3573 69.54 0.0524 1.943 26.188 +868 124 28.52 2.3765 69.72 0.0524 1.9491 26.234 +875 125 28.75 2.3956 69.9 0.0523 1.9542 26.28 +882 126 28.98 2.4148 70.08 0.0522 1.9582 26.326 +889 127 29.21 2.4339 70.26 0.0521 1.9609 26.372 +896 128 29.44 2.4531 70.44 0.0521 1.9623 26.418 +903 129 29.67 2.4723 70.62 0.052 1.9623 26.464 +910 130 29.9 2.4914 70.8 0.0519 1.9609 26.51 +917 131 30.13 2.5106 70.97 0.0519 1.9581 26.557 +924 132 30.36 2.5298 71.15 0.0518 1.954 26.603 +931 133 30.59 2.5489 71.32 0.0517 1.9484 26.65 +938 134 30.82 2.5681 71.49 0.0517 1.9415 26.696 +945 135 31.05 2.5873 71.66 0.0516 1.9333 26.743 +952 136 31.28 2.6064 71.83 0.0516 1.9239 26.79 +959 137 31.51 2.6256 71.99 0.0515 1.9133 26.837 +966 138 31.74 2.6448 72.15 0.0515 1.9017 26.883 +973 139 31.97 2.6639 72.31 0.0514 1.889 26.93 +980 140 32.2 2.6831 72.46 0.0514 1.8754 26.977 +987 141 32.43 2.7023 72.62 0.0513 1.8609 27.024 +994 142 32.66 2.7214 72.76 0.0513 1.8455 27.072 +1001 143 32.89 2.7406 72.91 0.0512 1.8293 27.119 +1008 144 33.12 2.7598 73.05 0.0512 1.8123 27.166 +1015 145 33.35 2.7789 73.19 0.0512 1.7945 27.214 +1022 146 33.58 2.7981 73.32 0.0511 1.776 27.261 +1029 147 33.81 2.8172 73.45 0.0511 1.7568 27.309 +1036 148 34.04 2.8364 73.58 0.0511 1.737 27.356 +1043 149 34.27 2.8556 73.7 0.0511 1.7164 27.404 +1050 150 34.5 2.8747 73.83 0.051 1.6952 27.452 +1057 151 34.73 2.8939 73.94 0.051 1.6734 27.499 +1064 152 34.96 2.9131 74.06 0.051 1.6508 27.547 +1071 153 35.19 2.9322 74.17 0.051 1.6276 27.595 +1078 154 35.42 2.9514 74.28 0.051 1.6036 27.643 +1085 155 35.65 2.9706 74.39 0.051 1.5789 27.691 +1092 156 35.88 2.9897 74.49 0.051 1.5533 27.74 +1099 157 36.11 3.0089 74.59 0.051 1.527 27.788 +1106 158 36.34 3.0281 74.69 0.051 1.4999 27.836 +1113 159 36.57 3.0472 74.79 0.0509 1.4719 27.885 +1120 160 36.8 3.0664 74.88 0.0509 1.4432 27.933 +1127 161 37.03 3.0856 74.97 0.0509 1.4137 27.982 +1134 162 37.26 3.1047 75.06 0.0509 1.3835 28.03 +1141 163 37.49 3.1239 75.15 0.0509 1.3528 28.079 +1148 164 37.72 3.1431 75.23 0.0509 1.3215 28.128 +1155 165 37.95 3.1622 75.31 0.0509 1.2897 28.177 +1162 166 38.18 3.1814 75.39 0.0509 1.2575 28.226 +1169 167 38.41 3.2005 75.47 0.0509 1.225 28.275 +1176 168 38.64 3.2197 75.54 0.0509 1.1922 28.324 +1183 169 38.87 3.2389 75.62 0.0509 1.1594 28.373 +1190 170 39.1 3.258 75.69 0.0509 1.1265 28.422 +1197 171 39.33 3.2772 75.76 0.0509 1.0936 28.472 +1204 172 39.56 3.2964 75.83 0.0509 1.0608 28.521 +1211 173 39.79 3.3155 75.9 0.0509 1.028 28.571 +1218 174 40.02 3.3347 75.97 0.0509 0.9953 28.62 +1225 175 40.25 3.3539 76.04 0.0509 0.9628 28.67 +1232 176 40.48 3.373 76.1 0.0509 0.9303 28.72 +1239 177 40.71 3.3922 76.17 0.0509 0.898 28.769 +1246 178 40.94 3.4114 76.24 0.0509 0.8657 28.819 +1253 179 41.17 3.4305 76.31 0.0509 0.8336 28.869 +1260 180 41.4 3.4497 76.37 0.0509 0.8016 28.919 +1267 181 41.63 3.4689 76.44 0.0509 0.7696 28.969 +1274 182 41.86 3.488 76.51 0.0509 0.7377 29.02 +1281 183 42.09 3.5072 76.58 0.0509 0.7057 29.07 +1288 184 42.32 3.5264 76.64 0.0509 0.6738 29.12 +1295 185 42.55 3.5455 76.71 0.0509 0.6419 29.171 +1302 186 42.78 3.5647 76.78 0.0509 0.6101 29.221 +1826 261 60 5 82.34 0.0509 0.6101 29.221 diff --git a/data-raw/data/sample/gsed_sample.txt b/data-raw/data/sample/gsed_sample.txt index 59bd40f7..58693980 100644 --- a/data-raw/data/sample/gsed_sample.txt +++ b/data-raw/data/sample/gsed_sample.txt @@ -1,4 +1,4 @@ -subjid agedays gpalac001 gpacgc002 gpafmc003 gpasec004 gpamoc005 gpamoc006 gpaclc007 gpalac009 gpasec010 gpamoc011 gpalgc012 gpagmc013 gpasec014 gpasec015 gpasec016 gpamoc017 gpagmc018 gpalgc019 gpasec020 gpalgc021 gpalgc022 gpaclc023 gpamoc024 gpasec025 gpamoc026 gpalgc027 gpamoc028 gpamoc029 gpagmc030 gpasec031 gpasec032 gpaclc033 gpaclc034 gpamoc035 gpagmc036 gpamoc037 gpamoc038 gpasec039 gpamoc040 gpamoc041 gpamoc042 gpamoc043 gpamoc044 gpasec045 gpaclc046 gpaclc047 gpaclc048 gpamoc049 gpamoc050 gpalgc051 gpamoc052 gpamoc053 gpamoc054 gpagmc055 gpamoc056 gpagmc057 gpamoc058 gpalgc059 gpamoc060 gpamoc061 gpamoc062 gpamoc063 gpasec064 gpamoc065 gpamoc066 gpagmc067 gpalgc068 gpagmc069 gpamoc070 gpamoc071 gpalgc072 gpaxxc073 gpaxxc074 gpasec075 gpamoc076 gpamoc077 gpamoc078 gpamoc079 gpamoc080 gpalgc081 gpasec082 gpamoc083 gpamoc084 gpasec085 gpasec086 gpaxxc087 gpasec089 gpaclc088 gpacmc090 gpaclc091 gpaxxc092 gpaclc093 gpasec094 gpasec095 gpaclc096 gpamoc097 gpalgc098 gpalgc099 gpaclc100 gpaclc101 gpalgc102 gpamoc103 gpamoc104 gpaclc105 gpamoc106 gpaclc107 gpaclc108 gpasec109 gpamoc110 gpalgc111 gpaclc112 gpaclc113 gpasec114 gpaclc115 gpaclc116 gpaclc117 gpaclc118 gpaclc119 gpaclc120 gpaclc121 gpaclc122 gpasec123 gpaclc124 gpasec125 gpaclc126 gpalgc127 gpasec128 gpamoc129 gpasec130 gpalgc131 gpamoc132 gpamoc133 gpasec134 gpamoc135 gpasec136 gpasec137 gpaclc138 gpaclc139 gtogmd001 gtogmd002 gtogmd003 gtogmd004 gtogmd005 gtogmd006 gtogmd007 gtogmd008 gtogmd009 gtogmd010 gtogmd011 gtogmd012 gtogmd013 gtogmd014 gtogmd015 gtogmd016 gtogmd017 gtogmd018 gtogmd019 gtogmd020 gtogmd021 gtogmd022 gtogmd023 gtogmd024 gtogmd025 gtogmd026 gtogmd027 gtogmd028 gtogmd029 gtogmd030 gtogmd031 gtogmd032 gtogmd033 gtogmd034 gtogmd035 gtogmd036 gtogmd037 gtogmd039 gtogmd040 gtogmd041 gtogmd042 gtogmd043 gtogmd044 gtogmd045 gtogmd046 gtogmd047 gtogmd048 gtogmd038 gtogmd049 gtolgd001 gtolgd002 gtolgd003 gtolgd004 gtolgd005 gtolgd006 gtolgd007 gtolgd008 gtolgd009 gtolgd010 gtolgd011 gtolgd012 gtolgd013 gtolgd014 gtolgd015 gtolgd016 gtolgd017 gtolgd018 gtolgd019 gtolgd020 gtolgd021 gtolgd022 gtolgd023 gtolgd024 gtolgd025 gtolgd026 gtolgd027 gtolgd028 gtolgd029 gtolgd030 gtolgd031 gtolgd032 gtolgd033 gtolgd034 gtolgd035 gtolgd036 gtolgd037 gtolgd038 gtolgd039 gtolgd040 gtolgd041 gtolgd042 gtolgd043 gtolgd044 gtolgd045 gtolgd046 gtolgd047 gtolgd048 gtolgd049 gtolgd050 gtolgd051 gtolgd052 gtofmd001 gtofmd002 gtofmd003 gtofmd004 gtofmd005 gtofmd006 gtofmd007 gtofmd008 gtofmd009 gtofmd010 gtofmd011 gtofmd012 gtofmd013 gtofmd014 gtofmd015 gtofmd016 gtofmd017 gtofmd018 gtofmd019 gtofmd020 gtofmd021 gtofmd022 gtofmd023 gtofmd024 gtofmd025 gtofmd026 gtofmd027 gtofmd028 gtofmd029 gtofmd030 gtofmd031 gtofmd032 gtofmd033 gtofmd034 gtofmd035 gtofmd036 gtofmd037 gtofmd038 gtofmd039 gtofmd040 gtofmd041 gtofmd042 gtofmd043 gtofmd044 gtofmd045 gtofmd046 gtofmd047 gtofmd048 gtofmd049 gtofmd050 gtofmd051 gtofmd052 gtofmd053 gtofmd054 +subjid agedays gpalac001 gpacgc002 gpafmc003 gpasec004 gpamoc005 gpamoc006 gpaclc007 gpalac009 gpasec010 gpamoc011 gpalgc012 gpagmc013 gpasec014 gpasec015 gpasec016 gpamoc017 gpagmc018 gpalgc019 gpasec020 gpalgc021 gpalgc022 gpaclc023 gpamoc024 gpasec025 gpamoc026 gpalgc027 gpamoc028 gpamoc029 gpagmc030 gpasec031 gpasec032 gpaclc033 gpaclc034 gpamoc035 gpagmc036 gpamoc037 gpamoc038 gpasec039 gpamoc040 gpamoc041 gpamoc042 gpamoc043 gpamoc044 gpasec045 gpaclc046 gpaclc047 gpaclc048 gpamoc049 gpamoc050 gpalgc051 gpamoc052 gpamoc053 gpamoc054 gpagmc055 gpamoc056 gpagmc057 gpamoc058 gpalgc059 gpamoc060 gpamoc061 gpamoc062 gpamoc063 gpasec064 gpamoc065 gpamoc066 gpagmc067 gpalgc068 gpagmc069 gpamoc070 gpamoc071 gpalgc072 gpaxxc073 gpaxxc074 gpasec075 gpamoc076 gpamoc077 gpamoc078 gpamoc079 gpamoc080 gpalgc081 gpasec082 gpamoc083 gpamoc084 gpasec085 gpasec086 gpaxxc087 gpasec088 gpaclc089 gpacmc090 gpaclc091 gpaxxc092 gpaclc093 gpasec094 gpasec095 gpaclc096 gpamoc097 gpalgc098 gpalgc099 gpaclc100 gpaclc101 gpalgc102 gpamoc103 gpamoc104 gpaclc105 gpamoc106 gpaclc107 gpaclc108 gpasec109 gpamoc110 gpalgc111 gpaclc112 gpaclc113 gpasec114 gpaclc115 gpaclc116 gpaclc117 gpaclc118 gpaclc119 gpaclc120 gpaclc121 gpaclc122 gpasec123 gpaclc124 gpasec125 gpaclc126 gpalgc127 gpasec128 gpamoc129 gpasec130 gpalgc131 gpamoc132 gpamoc133 gpasec134 gpamoc135 gpasec136 gpasec137 gpaclc138 gpaclc139 gtogmd001 gtogmd002 gtogmd003 gtogmd004 gtogmd005 gtogmd006 gtogmd007 gtogmd008 gtogmd009 gtogmd010 gtogmd011 gtogmd012 gtogmd013 gtogmd014 gtogmd015 gtogmd016 gtogmd017 gtogmd018 gtogmd019 gtogmd020 gtogmd021 gtogmd022 gtogmd023 gtogmd024 gtogmd025 gtogmd026 gtogmd027 gtogmd028 gtogmd029 gtogmd030 gtogmd031 gtogmd032 gtogmd033 gtogmd034 gtogmd035 gtogmd036 gtogmd037 gtogmd039 gtogmd040 gtogmd041 gtogmd042 gtogmd043 gtogmd044 gtogmd045 gtogmd046 gtogmd047 gtogmd048 gtogmd038 gtogmd049 gtolgd001 gtolgd002 gtolgd003 gtolgd004 gtolgd005 gtolgd006 gtolgd007 gtolgd008 gtolgd009 gtolgd010 gtolgd011 gtolgd012 gtolgd013 gtolgd014 gtolgd015 gtolgd016 gtolgd017 gtolgd018 gtolgd019 gtolgd020 gtolgd021 gtolgd022 gtolgd023 gtolgd024 gtolgd025 gtolgd026 gtolgd027 gtolgd028 gtolgd029 gtolgd030 gtolgd031 gtolgd032 gtolgd033 gtolgd034 gtolgd035 gtolgd036 gtolgd037 gtolgd038 gtolgd039 gtolgd040 gtolgd041 gtolgd042 gtolgd043 gtolgd044 gtolgd045 gtolgd046 gtolgd047 gtolgd048 gtolgd049 gtolgd050 gtolgd051 gtolgd052 gtofmd001 gtofmd002 gtofmd003 gtofmd004 gtofmd005 gtofmd006 gtofmd007 gtofmd008 gtofmd009 gtofmd010 gtofmd011 gtofmd012 gtofmd013 gtofmd014 gtofmd015 gtofmd016 gtofmd017 gtofmd018 gtofmd019 gtofmd020 gtofmd021 gtofmd022 gtofmd023 gtofmd024 gtofmd025 gtofmd026 gtofmd027 gtofmd028 gtofmd029 gtofmd030 gtofmd031 gtofmd032 gtofmd033 gtofmd034 gtofmd035 gtofmd036 gtofmd037 gtofmd038 gtofmd039 gtofmd040 gtofmd041 gtofmd042 gtofmd043 gtofmd044 gtofmd045 gtofmd046 gtofmd047 gtofmd048 gtofmd049 gtofmd050 gtofmd051 gtofmd052 gtofmd053 gtofmd054 1 811 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 1 1 0 0 1 0 1 0 0 0 0 2 898 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 1 1 0 1 1 1 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 0 1 1 1 1 0 1 0 1 1 1 1 1 0 0 0 0 3 203 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 0 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 diff --git a/data-raw/data/sample/triple.txt b/data-raw/data/sample/triple.txt new file mode 100644 index 00000000..53d08916 --- /dev/null +++ b/data-raw/data/sample/triple.txt @@ -0,0 +1,51 @@ +id age agedays gs1sec001 gs1moc002 gs1sec003 gs1lgc004 gs1moc005 gs1cgc006 gs1moc007 gs1moc008 gs1sec009 gs1lgc010 gs1sec011 gs1lgc012 gs1sec013 gs1lgc014 gs1moc015 gs1lgc016 gs1sec017 gs1moc018 gs1sec019 gs1lgc020 gs1sec021 gs1sec022 gs1lgc023 gs1sec024 gs1moc025 gs1lgc026 gs1sec027 gs1moc029 gs1moc030 gs1moc031 gs1cgc032 gs1moc033 gs1moc034 gs1moc035 gs1lic036 gs1lgc037 gs1moc038 gs1moc039 gs1moc040 gs1moc041 gs1cgc042 gs1moc043 gs1moc044 gs1moc045 gs1cgc046 gs1moc047 gs1moc048 gs1lgc049 gs1moc050 gs1moc051 gs1moc052 gs1lic053 gs1moc054 gs1moc055 gs1moc056 gs1moc057 gs1lgc058 gs1moc059 gs1moc060 gs1moc061 gs1lgc062 gs1sec063 gs1moc064 gs1lic065 gs1moc066 gs1lic067 gs1moc068 gs1moc069 gs1moc070 gs1lgc071 gs1lgc072 gs1sec073 gs1moc074 gs1moc075 gs1moc076 gs1lic077 gs1moc078 gs1moc079 gs1moc080 gs1moc081 gs1sec082 gs1moc083 gs1lgc084 gs1cgc085 gs1lgc086 gs1lgc087 gs1lgc088 gs1moc089 gs1lic090 gs1moc091 gs1lic092 gs1sec093 gs1lgc094 gs1moc095 gs1moc096 gs1lgc097 gs1lgc098 gs1lgc099 gs1lgc100 gs1moc101 gs1sec102 gs1lic103 gs1lgc104 gs1lgc105 gs1lic106 gs1lgc107 gs1moc108 gs1lgc109 gs1lgc110 gs1sec111 gs1lgc112 gs1lgc113 gs1cgc114 gs1lgc115 gs1lic116 gs1lgc117 gs1lic118 gs1lgc119 gs1moc120 gs1lgc121 gs1cgc122 gs1lgc123 gs1sec124 gs1lgc125 gs1moc126 gs1cgc127 gs1cgc128 gs1lgc129 gs1lgc130 gs1sec131 gs1cgc132 gs1cgc133 gs1moc134 gs1sec135 gs1lgc136 gs1moc137 gs1lic138 gs1sec139 gl1gmd001 gl1gmd002 gl1gmd003 gl1gmd004 gl1gmd005 gl1gmd006 gl1gmd007 gl1gmd008 gl1gmd009 gl1gmd010 gl1gmd011 gl1gmd012 gl1gmd013 gl1gmd014 gl1gmd015 gl1gmd016 gl1gmd017 gl1gmd018 gl1gmd019 gl1gmd020 gl1gmd021 gl1gmd022 gl1gmd023 gl1gmd024 gl1gmd025 gl1gmd026 gl1gmd027 gl1gmd028 gl1gmd029 gl1gmd030 gl1gmd031 gl1gmd032 gl1gmd033 gl1gmd034 gl1gmd035 gl1gmd036 gl1gmd037 gl1gmd038 gl1gmd039 gl1gmd040 gl1gmd041 gl1gmd042 gl1gmd043 gl1gmd044 gl1gmd045 gl1gmd046 gl1gmd047 gl1gmd048 gl1gmd049 gl1lgd001 gl1lgd002 gl1lgd003 gl1lgd004 gl1lgd005 gl1lgd006 gl1lgd007 gl1lgd008 gl1lgd009 gl1lgd010 gl1lgd011 gl1lgd012 gl1lgd013 gl1lgd014 gl1lgd015 gl1lgd016 gl1lgd017 gl1lgd018 gl1lgd019 gl1lgd020 gl1lgd021 gl1lgd022 gl1lgd023 gl1lgd024 gl1lgd025 gl1lgd026 gl1lgd027 gl1lgd028 gl1lgd029 gl1lgd030 gl1lgd031 gl1lgd032 gl1lgd033 gl1lgd034 gl1lgd035 gl1lgd036 gl1lgd037 gl1lgd038 gl1lgd039 gl1lgd040 gl1lgd041 gl1lgd042 gl1lgd043 gl1lgd044 gl1lgd045 gl1lgd046 gl1lgd047 gl1lgd048 gl1lgd049 gl1lgd050 gl1lgd051 gl1lgd052 gl1fmd001 gl1fmd002 gl1fmd003 gl1fmd004 gl1fmd005 gl1fmd006 gl1fmd007 gl1fmd008 gl1fmd009 gl1fmd010 gl1fmd011 gl1fmd012 gl1fmd013 gl1fmd014 gl1fmd015 gl1fmd016 gl1fmd017 gl1fmd018 gl1fmd019 gl1fmd020 gl1fmd021 gl1fmd022 gl1fmd023 gl1fmd024 gl1fmd025 gl1fmd026 gl1fmd027 gl1fmd028 gl1fmd029 gl1fmd030 gl1fmd031 gl1fmd032 gl1fmd033 gl1fmd034 gl1fmd035 gl1fmd036 gl1fmd037 gl1fmd038 gl1fmd039 gl1fmd040 gl1fmd041 gl1fmd042 gl1fmd043 gl1fmd044 gl1fmd045 gl1fmd046 gl1fmd047 gl1fmd048 gl1fmd049 gl1fmd050 gl1fmd051 gl1fmd052 gl1fmd053 gl1fmd054 by3cgd003 by3cgd004 by3cgd005 by3cgd006 by3cgd007 by3cgd008 by3cgd009 by3cgd010 by3cgd011 by3cgd012 by3cgd013 by3cgd014 by3cgd015 by3cgd016 by3cgd017 by3cgd018 by3cgd019 by3cgd020 by3cgd021 by3cgd022 by3cgd023 by3cgd024 by3cgd025 by3cgd026 by3cgd027 by3cgd028 by3cgd029 by3cgd030 by3cgd031 by3cgd032 by3cgd033 by3cgd034 by3cgd035 by3cgd036 by3cgd037 by3cgd038 by3cgd039 by3cgd040 by3cgd041 by3cgd042 by3cgd043 by3cgd044 by3cgd045 by3cgd046 by3cgd047 by3cgd048 by3cgd049 by3cgd050 by3cgd051 by3cgd052 by3cgd053 by3cgd054 by3cgd055 by3cgd056 by3cgd057 by3cgd058 by3cgd059 by3cgd060 by3cgd061 by3cgd062 by3cgd063 by3cgd064 by3cgd065 by3cgd066 by3cgd067 by3cgd068 by3cgd069 by3cgd070 by3cgd071 by3cgd072 by3cgd073 by3cgd074 by3cgd075 by3cgd076 by3cgd077 by3exd001 by3exd002 by3exd003 by3exd004 by3exd005 by3exd006 by3exd007 by3exd008 by3exd009 by3exd010 by3exd011 by3exd012 by3exd013 by3exd014 by3exd015 by3exd016 by3exd017 by3exd018 by3exd019 by3exd020 by3exd021 by3exd022 by3exd023 by3exd024 by3exd025 by3exd026 by3exd027 by3exd028 by3exd029 by3exd030 by3exd031 by3exd032 by3exd033 by3exd034 by3exd035 by3exd036 by3exd037 by3exd043 by3fmd002 by3fmd003 by3fmd004 by3fmd005 by3fmd006 by3fmd007 by3fmd008 by3fmd009 by3fmd010 by3fmd011 by3fmd012 by3fmd013 by3fmd014 by3fmd015 by3fmd016 by3fmd017 by3fmd018 by3fmd019 by3fmd020 by3fmd021 by3fmd022 by3fmd023 by3fmd024 by3fmd025 by3fmd026 by3fmd027 by3fmd028 by3fmd029 by3fmd030 by3fmd031 by3fmd032 by3fmd033 by3fmd034 by3fmd035 by3fmd036 by3fmd037 by3fmd038 by3fmd039 by3fmd040 by3fmd041 by3fmd042 by3fmd043 by3fmd044 by3fmd045 by3fmd046 by3fmd047 by3fmd048 by3fmd049 by3fmd050 by3fmd052 by3fmd054 by3gmd003 by3gmd004 by3gmd005 by3gmd006 by3gmd007 by3gmd008 by3gmd009 by3gmd010 by3gmd011 by3gmd012 by3gmd013 by3gmd014 by3gmd015 by3gmd016 by3gmd017 by3gmd018 by3gmd019 by3gmd020 by3gmd021 by3gmd022 by3gmd023 by3gmd024 by3gmd025 by3gmd026 by3gmd027 by3gmd028 by3gmd029 by3gmd030 by3gmd031 by3gmd032 by3gmd033 by3gmd034 by3gmd035 by3gmd036 by3gmd037 by3gmd038 by3gmd039 by3gmd040 by3gmd041 by3gmd042 by3gmd043 by3gmd044 by3gmd045 by3gmd046 by3gmd047 by3gmd048 by3gmd049 by3gmd050 by3gmd051 by3gmd052 by3gmd053 by3gmd054 by3gmd055 by3gmd056 by3gmd057 by3gmd058 by3gmd059 by3gmd060 by3gmd061 by3gmd062 by3gmd063 by3gmd064 by3gmd065 by3gmd066 by3gmd067 by3red002 by3red004 by3red005 by3red006 by3red007 by3red008 by3red009 by3red010 by3red011 by3red012 by3red013 by3red014 by3red015 by3red016 by3red017 by3red018 by3red019 by3red020 by3red021 by3red022 by3red023 by3red024 by3red025 by3red026 by3red027 by3red028 by3red029 by3red030 by3red031 by3red032 by3red033 by3red034 by3red036 by3red037 +1 1.9493 712 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 0 1 0 0 1 0 1 1 1 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 0 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 1 0 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 +2 2.5325 925 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 0 0 1 1 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 1 1 1 1 1 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 1 1 0 0 1 0 0 1 1 1 1 1 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 +3 2.3874 872 1 1 0 1 1 1 1 0 1 1 0 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 1 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 +4 0.898 328 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5 2.1903 800 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 1 1 1 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 0 1 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 1 1 1 0 0 0 0 0 +6 0.898 328 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 1 1 0 1 0 0 0 0 0 +7 0.0712 26 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 0 0 1 1 0 1 1 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 +8 0.1232 45 1 1 1 1 1 1 0 1 1 0 1 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 +9 0.7611 278 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 0 0 1 1 1 1 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +10 0.8569 313 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1 0 0 0 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 1 1 0 1 1 0 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 1 1 1 0 1 1 0 1 1 0 0 0 0 0 +11 2.7598 1008 1 1 1 1 1 0 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 +12 2.3765 868 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 1 0 1 1 0 0 0 0 1 0 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 1 1 1 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 +13 0.5695 208 1 1 1 1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0 1 1 1 1 0 1 1 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +14 0.2218 81 1 1 1 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +15 0.1369 50 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 +16 0.8077 295 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +17 2.3491 858 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 1 0 0 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 1 1 1 1 0 1 0 0 1 1 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 1 0 1 0 0 0 0 0 1 1 1 1 1 0 0 0 1 0 1 1 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0 0 0 +18 2.5681 938 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 1 0 0 0 0 1 1 1 1 0 1 0 1 0 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 1 0 0 0 0 0 +19 2.9925 1093 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 0 1 0 0 0 1 0 1 0 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 1 0 0 0 0 0 +20 0.271 99 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 0 0 1 0 0 1 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 +21 2.0808 760 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 0 0 0 1 1 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 0 0 1 1 0 1 1 1 0 0 1 0 0 1 1 1 1 1 1 0 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 1 0 0 0 0 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0 +22 2.4011 877 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 1 0 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 0 1 1 0 0 1 1 1 0 1 0 1 1 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 0 1 0 +23 0.4545 166 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +24 0.9856 360 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 0 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 +25 0.9008 329 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 1 1 0 1 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 0 1 0 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 +26 0.6653 243 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 1 0 0 0 1 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 +27 1.0376 379 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 1 0 1 0 0 0 0 0 1 1 0 0 1 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +28 1.9849 725 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 1 1 1 0 1 0 0 1 0 0 1 0 0 1 1 1 0 1 0 1 1 1 1 1 1 1 0 0 1 0 0 0 0 1 1 1 1 0 0 1 0 0 1 0 0 1 1 0 1 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 0 1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 0 0 1 0 1 0 1 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 1 1 1 0 0 0 1 0 0 0 0 0 +29 1.963 717 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 0 0 1 0 1 1 1 0 0 0 0 1 1 1 1 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 0 0 0 0 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 1 0 +30 2.3901 873 1 1 1 0 0 1 1 1 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 1 0 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 +31 0.9363 342 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 1 1 1 1 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 1 0 0 0 0 0 1 1 0 1 1 1 1 1 0 0 1 1 0 1 0 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 +32 1.2868 470 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 1 0 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 0 0 0 0 +33 2.3135 845 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 0 0 1 0 1 1 0 0 0 0 1 1 1 1 0 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 1 0 1 0 0 0 0 +34 2.141 782 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 1 1 1 1 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 0 0 0 0 +35 2.8802 1052 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 0 +36 2.8282 1033 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 1 1 1 0 0 0 0 0 1 1 1 0 1 1 0 1 1 1 1 1 +37 1.0157 371 1 0 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 0 0 0 1 1 1 1 0 1 1 1 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0 1 1 1 0 1 0 1 1 1 0 0 0 0 0 +38 0.4435 162 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 +39 2.0917 764 1 1 1 1 1 1 0 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 0 1 1 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 +40 0.0739 27 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 +41 1.9302 705 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 0 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 1 1 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 1 1 1 1 1 1 1 0 0 0 0 0 +42 0.8898 325 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 0 1 0 1 1 0 1 1 0 1 0 0 0 0 0 0 1 1 1 1 1 1 0 1 1 0 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 0 1 1 1 1 1 0 0 1 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 1 1 1 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 1 1 0 0 0 0 0 +43 0.2601 95 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 +44 1.7221 629 1 1 0 0 1 1 0 1 1 0 1 1 1 1 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1 1 0 1 1 0 1 0 0 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 0 0 1 0 0 0 0 0 1 1 1 1 1 1 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 0 1 0 0 0 0 0 +45 0.3395 124 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 0 1 0 0 0 0 0 1 1 1 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 0 0 0 0 0 +46 2.8638 1046 1 1 1 1 1 1 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 0 0 1 0 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 1 1 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 0 1 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +47 0.6489 237 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 1 0 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 1 1 1 1 1 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 +48 1.7002 621 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 1 1 1 0 1 1 1 0 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 0 1 1 1 1 0 0 0 0 0 +49 1.399 511 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 0 0 1 1 1 0 0 1 0 0 0 0 0 1 1 1 1 0 1 1 1 0 0 0 0 0 1 1 1 1 1 0 1 0 1 1 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 1 0 1 0 1 0 0 0 0 0 +50 0.4244 155 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 1 1 1 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 1 1 1 0 0 0 0 1 0 1 1 1 0 1 1 0 0 0 0 0 0 1 1 1 1 0 0 1 0 0 1 1 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 1 0 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 0 0 0 0 diff --git a/data/builtin_itembank.rda b/data/builtin_itembank.rda index 9ce88132..96fb24d8 100644 Binary files a/data/builtin_itembank.rda and b/data/builtin_itembank.rda differ diff --git a/data/builtin_itemtable.rda b/data/builtin_itemtable.rda index 65a63c33..9d74b663 100644 Binary files a/data/builtin_itemtable.rda and b/data/builtin_itemtable.rda differ diff --git a/data/builtin_keys.rda b/data/builtin_keys.rda new file mode 100644 index 00000000..8bac9a42 Binary files /dev/null and b/data/builtin_keys.rda differ diff --git a/data/builtin_references.rda b/data/builtin_references.rda index e387a05d..88af6ed6 100644 Binary files a/data/builtin_references.rda and b/data/builtin_references.rda differ diff --git a/data/builtin_translate.rda b/data/builtin_translate.rda new file mode 100644 index 00000000..935d6961 Binary files /dev/null and b/data/builtin_translate.rda differ diff --git a/data/gsample.rda b/data/gsample.rda index 50870d10..5a40ae4a 100644 Binary files a/data/gsample.rda and b/data/gsample.rda differ diff --git a/data/sample_hf.rda b/data/sample_hf.rda index e7b13a18..f2ce2d3a 100644 Binary files a/data/sample_hf.rda and b/data/sample_hf.rda differ diff --git a/data/sample_lf.rda b/data/sample_lf.rda index d369ea34..1f6126fe 100644 Binary files a/data/sample_lf.rda and b/data/sample_lf.rda differ diff --git a/data/sample_sf.rda b/data/sample_sf.rda index f5dc54dd..79bc6eb8 100644 Binary files a/data/sample_sf.rda and b/data/sample_sf.rda differ diff --git a/data/triple.rda b/data/triple.rda new file mode 100644 index 00000000..45bfa23f Binary files /dev/null and b/data/triple.rda differ diff --git a/docs/404.html b/docs/404.html index ed22b98b..af5b2f82 100644 --- a/docs/404.html +++ b/docs/404.html @@ -18,7 +18,7 @@ - +
@@ -44,7 +44,7 @@
  • @@ -64,7 +73,7 @@
  • - +
  • @@ -75,7 +84,7 @@
    - +
    @@ -98,21 +107,21 @@

    Page not found (404)

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/LICENSE.html b/docs/LICENSE.html deleted file mode 100644 index 871a10a0..00000000 --- a/docs/LICENSE.html +++ /dev/null @@ -1,278 +0,0 @@ - -GNU Affero General Public License • dscore - - -
    -
    - - - -
    -
    - - -
    - -

    Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>

    -

    Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

    -
    -

    Preamble

    -

    The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.

    -

    The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program–to make sure it remains free software for all its users.

    -

    When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.

    -

    Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software.

    -

    A secondary benefit of defending all users’ freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public.

    -

    The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version.

    -

    An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license.

    -

    The precise terms and conditions for copying, distribution and modification follow.

    -
    -
    -

    TERMS AND CONDITIONS

    -
    -

    0. Definitions.

    -

    “This License” refers to version 3 of the GNU Affero General Public License.

    -

    “Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.

    -

    “The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.

    -

    To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

    -

    A “covered work” means either the unmodified Program or a work based on the Program.

    -

    To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.

    -

    To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.

    -

    An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.

    -
    -
    -

    1. Source Code.

    -

    The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.

    -

    A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.

    -

    The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.

    -

    The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work’s System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.

    -

    The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.

    -

    The Corresponding Source for a work in source code form is that same work.

    -
    -
    -

    2. Basic Permissions.

    -

    All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.

    -

    You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.

    -

    Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

    -
    -
    - -

    No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.

    -

    When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work’s users, your or third parties’ legal rights to forbid circumvention of technological measures.

    -
    -
    -

    4. Conveying Verbatim Copies.

    -

    You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.

    -

    You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.

    -
    -
    -

    5. Conveying Modified Source Versions.

    -

    You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

    -
      1. The work must carry prominent notices stating that you modified it, and giving a relevant date.
      2. -
    • -
      1. The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
      2. -
    • -
      1. You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
      2. -
    • -
      1. If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
      2. -
    • -

    A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation’s users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

    -
    -
    -

    6. Conveying Non-Source Forms.

    -

    You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:

    -
      1. Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
      2. -
    • -
      1. Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
      2. -
    • -
      1. Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
      2. -
    • -
      1. Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
      2. -
    • -
      1. Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
      2. -
    • -

    A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.

    -

    A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.

    -

    “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.

    -

    If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).

    -

    The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.

    -

    Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.

    -
    -
    -

    7. Additional Terms.

    -

    “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.

    -

    When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.

    -

    Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:

    -
      1. Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
      2. -
    • -
      1. Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
      2. -
    • -
      1. Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
      2. -
    • -
      1. Limiting the use for publicity purposes of names of licensors or authors of the material; or
      2. -
    • -
      1. Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
      2. -
    • -
      1. Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
      2. -
    • -

    All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.

    -

    If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.

    -

    Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.

    -
    -
    -

    8. Termination.

    -

    You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).

    -

    However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

    -

    Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

    -

    Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.

    -
    -
    -

    9. Acceptance Not Required for Having Copies.

    -

    You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.

    -
    -
    -

    10. Automatic Licensing of Downstream Recipients.

    -

    Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.

    -

    An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

    -

    You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.

    -
    -
    -

    11. Patents.

    -

    A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor’s “contributor version”.

    -

    A contributor’s “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.

    -

    Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

    -

    In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.

    -

    If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient’s use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

    -

    If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.

    -

    A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.

    -

    Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

    -
    -
    -

    12. No Surrender of Others’ Freedom.

    -

    If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.

    -
    -
    -

    13. Remote Network Interaction; Use with the GNU General Public License.

    -

    Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.

    -

    Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License.

    -
    -
    -

    14. Revised Versions of this License.

    -

    The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

    -

    Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation.

    -

    If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

    -

    Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.

    -
    -
    -

    15. Disclaimer of Warranty.

    -

    THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

    -
    -
    -

    16. Limitation of Liability.

    -

    IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    -
    -
    -

    17. Interpretation of Sections 15 and 16.

    -

    If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.

    -

    END OF TERMS AND CONDITIONS

    -
    -
    -
    -

    How to Apply These Terms to Your New Programs

    -

    If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

    -

    To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

    -
        <one line to give the program's name and a brief idea of what it does.>
    -    Copyright (C) <year>  <name of author>
    -
    -    This program is free software: you can redistribute it and/or modify
    -    it under the terms of the GNU Affero General Public License as
    -    published by the Free Software Foundation, either version 3 of the
    -    License, or (at your option) any later version.
    -
    -    This program is distributed in the hope that it will be useful,
    -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -    GNU Affero General Public License for more details.
    -
    -    You should have received a copy of the GNU Affero General Public License
    -    along with this program.  If not, see <https://www.gnu.org/licenses/>.
    -

    Also add information on how to contact you by electronic and paper mail.

    -

    If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a “Source” link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements.

    -

    You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see https://www.gnu.org/licenses/.

    -
    -
    - -
    - - - -
    - - - -
    - -
    -

    Site built with pkgdown 2.0.9.

    -
    - -
    - - - - - - - - diff --git a/docs/articles/custom_priors.html b/docs/articles/custom_priors.html new file mode 100644 index 00000000..fd4f75c3 --- /dev/null +++ b/docs/articles/custom_priors.html @@ -0,0 +1,391 @@ + + + + + + + +Custom Priors (Advanced) • dscore + + + + + + + + + + + +
    +
    + + + + +
    +
    + + + + +
    +

    Background +

    +

    This vignette provides an overview of the default prior settings and +demonstrates how to customize the prior mean and standard deviation for +D-score calculations. This is an advanced topic that requires a basic +understanding of the D-score calculation process. If you are unfamiliar +with the D-score methodology, we recommend reviewing the introductory +vignettes before proceeding.

    +
    +
    +

    Default Prior Mean and Standard Deviation +

    +

    The default prior mean and standard deviation for the +dscore() function are determined by the key +argument. This function searches for the corresponding +base_population field in the builtin_keys data +frame, which contains several columns including the following:

    +
    +library(dscore)
    +builtin_keys[, c("key", "base_population")]
    +
    ##         key       base_population
    +## 1     dutch                 dutch
    +## 2      gcdg                  gcdg
    +## 3  gsed1912                  gcdg
    +## 10 gsed2212                phase1
    +## 11 gsed2406 preliminary_standards
    +## 12 gsed2510 preliminary_standards
    +

    For instance, for key = gsed2406, the +base_population is identified as +"preliminary_standards". The get_mu() function +returns the prior mean for the specified key at different +ages:

    +
    +get_mu(t = c(0:12) / 12, key = "gsed2406")
    +
    ##  [1]  9.731266 14.922704 19.282654 23.155214 26.707086 30.031809 33.187157
    +##  [8] 36.211330 39.130903 41.965115 45.158164 47.235287 49.186179
    +

    This code snippet returns the prior mean for ages ranging from 0 to +12 months. These mean values represent the median of the D-score +distribution for the specified base_population under the +current key.

    +

    If the standard deviation of the prior is not specified, the +dscore() function defaults to a value of 5.0 across all +ages. In comparison, the age-specific standard deviation for the +base_population averages around 2.5 to 3.5. Therefore, a +standard deviation of 5.0 signifies a relatively broad prior +distribution, regardless of age.

    +

    It’s crucial to note that altering the key parameter +changes both the prior mean and standard deviation. Since these +parameters affect the D-score, comparisons should generally be made only +between D-scores calculated using the same key, prior mean, and standard +deviation.

    +
    +
    +

    Setting Your Own Prior Mean and Standard Deviation +

    +

    In certain situations, you may want to define your own prior mean and +standard deviation for the D-score calculations. This can be done by +setting the prior_mean and prior_sd arguments +in the dscore() function. Below are a few examples that +demonstrate how to customize these priors.

    +
    +

    Example 1: Custom Prior Mean +

    +

    In this example, we add a value of 5 to the default prior mean for +each child, which results in higher D-scores.

    +
    +# Calculate the custom prior mean by adding 5 to the default prior mean
    +data <- milestones
    +mymean <- get_mu(t = data$age, key = "gsed2406") + 5
    +
    +# Calculate default D-scores
    +def <- dscore(data, key = "gsed2406")
    +head(def)
    +
    ##        a  n      p     d      sem    daz
    +## 1 0.4873 11 0.9091 30.76 3.751319 -0.633
    +## 2 0.6571 14 0.6429 29.06 2.518082 -2.716
    +## 3 1.1800 19 0.9474 53.35 3.414966 -0.006
    +## 4 1.9055 13 0.8462 63.88 2.971594 -0.094
    +## 5 0.5503 11 0.8182 28.75 3.476988 -1.863
    +## 6 0.7666 14 0.7857 34.21 3.088920 -2.377
    +
    +# Custom prior, direct specification
    +adj1 <- dscore(data, prior_mean = mymean, key = "gsed2406")
    +head(adj1)
    +
    ##        a  n      p     d      sem    daz
    +## 1 0.4873 11 0.9091 33.88 4.146874  0.310
    +## 2 0.6571 14 0.6429 30.38 2.629683 -2.423
    +## 3 1.1800 19 0.9474 55.93 3.774148  0.787
    +## 4 1.9055 13 0.8462 65.78 3.203216  0.438
    +## 5 0.5503 11 0.8182 31.43 3.840857 -1.155
    +## 6 0.7666 14 0.7857 36.30 3.395857 -1.867
    +
    +# Custom prior, column specification
    +adj2 <- dscore(cbind(data, mymean), prior_mean = "mymean", key = "gsed2406")
    +head(adj2)
    +
    ##        a  n      p     d      sem    daz
    +## 1 0.4873 11 0.9091 33.88 4.146874  0.310
    +## 2 0.6571 14 0.6429 30.38 2.629683 -2.423
    +## 3 1.1800 19 0.9474 55.93 3.774148  0.787
    +## 4 1.9055 13 0.8462 65.78 3.203216  0.438
    +## 5 0.5503 11 0.8182 31.43 3.840857 -1.155
    +## 6 0.7666 14 0.7857 36.30 3.395857 -1.867
    +
    +identical(adj1, adj2)
    +
    ## [1] TRUE
    +

    In this code, the prior_mean argument shows two forms. +The first form directly specifies the custom prior mean, while the +second form refers to an additional column in the data frame that +contains the user-specified prior means. Both specifications yield +identical results. In addition, the user can specify a scalar value for +the prior_mean argument, which will be applied to all +observations, but this option is unreasonable if ages vary across +observations.

    +

    The next snippet compares the adjusted and default D-scores as a +function of the proportion of items passed by the child.

    +
    +# Plot the difference between adjusted and default D-scores
    +plot(
    +  y = adj1$d - def$d,
    +  x = def$p,
    +  xlab = "Proportion of items passed by the child",
    +  ylab = "Upward drift of D-score",
    +  pch = 16,
    +  main = "Impact of Custom Prior Mean on D-score"
    +)
    +
    +# Add a smoothed line to visualize the trend
    +lines(lowess(x = def$p, y = adj1$d - def$d, f = 0.5), col = "grey", lwd = 2)
    +

    +

    The plot illustrates that the upward bias is more pronounced when +less informative items are administered, i.e., when the proportion of +items passed is either very low (not shown) or very high. The bias is +relatively mild (one D-score unit increase) when the child can perform +about half of the items.

    +
    +
    +

    Example 2: Setting a Custom Prior Standard Deviation +

    +

    In some situations, we may have strong prior beliefs about the +variability of the D-scores based on factors such as the trajectory of a +child’s D-score or expert knowledge. Incorporating this information can +lead to more robust or smooth results by better reflecting our +understanding of the variability.

    +

    The following code snippet demonstrates how to set a custom prior +standard deviation. Here, the prior_sd argument is +specified using a constant value or values derived from the data.

    +
    +# Filter data for a specific child
    +boy <- milestones[milestones$id == 111, ]
    +
    +# Calculate default D-scores
    +def <- dscore(boy, key = "gsed2406")
    +def
    +
    ##        a  n      p     d      sem    daz
    +## 1 0.4873 11 0.9091 30.76 3.751319 -0.633
    +## 2 0.6571 14 0.6429 29.06 2.518082 -2.716
    +## 3 1.1800 19 0.9474 53.35 3.414966 -0.006
    +## 4 1.9055 13 0.8462 63.88 2.971594 -0.094
    +

    Suppose we want to inform the estimation process by the previous +observation. We can use the location of the last observation (in DAZ +units) and calculate an informative mean and standard deviation for the +next time point as follows:

    +
    +# Calculate expected D-scores and standard deviations
    +exp_d <- zad(z = c(0, def$daz[1:3]), x = def$a)
    +exp_sd <- c(5, def$sem[1:3])
    +
    +# Calculate adjusted D-scores using the custom prior mean and standard deviation
    +adj1 <- dscore(boy, prior_mean = exp_d, prior_sd = exp_sd, key = "gsed2406")
    +

    The code snippet below plots the raw and informed DAZ trajectories +for child 111:

    +
    +# Plotting the raw and informed DAZ trajectories
    +plot(
    +  x = def$a,
    +  y = def$daz,
    +  type = "b",
    +  pch = 16,
    +  ylab = "DAZ",
    +  xlab = "Age (years)",
    +  main = "Standard (black) and Informed (red) DAZ-trajectory for child 111"
    +)
    +points(x = adj1$a, y = adj1$daz, col = "red", type = "b", lwd = 2, pch = 16)
    +

    +

    This plot illustrates the DAZ trajectory using standard estimates (in +black) and the adjusted estimates (in red) for child 111, highlighting +the impact of incorporating more informative prior knowledge into the +analysis.

    +

    Of course, the examples provided here are simplified and may not +fully capture the complexity of real-world scenarios. However, they +demonstrate how to customize the prior mean and standard deviation in +the dscore() function to better reflect your prior +knowledge and improve the accuracy of the D-score estimates.

    +
    +
    +

    Handling Missing Ages +

    +

    By default, the D-score of observations with missing ages will be +NA. It is possible to force D-score calculation by setting +prior_mean_NA and prior_sd_NA to a specific +value. The documentation for the dscore() function states +that prior_mean_NA = 50 and prior_sd_NA = 20 +as reasonable choices for samples between 0-3 years. If these defaults +are not suitable for your data, you can customize them to better reflect +your expectations.

    +
    +
    +

    Example 3: Customizing Prior Mean and Standard Deviation for Missing +Ages +

    +
    +# Set missing ages for specific observations
    +boy$age[2:3] <- NA
    +
    +# Calculate D-scores using default
    +def <- dscore(boy, key = "gsed2406")
    +def
    +
    ##        a  n      p     d      sem    daz
    +## 1 0.4873 11 0.9091 30.76 3.751319 -0.633
    +## 2     NA 14 0.6429    NA       NA     NA
    +## 3     NA 19 0.9474    NA       NA     NA
    +## 4 1.9055 13 0.8462 63.88 2.971594 -0.094
    +

    This call to dscore() produces a D-score of +NA when age data is missing, which effectively excludes +these cases from downstream analyses. This is the safest option, and the +default behavior.

    +
    +# Calculate D-scores for missing ages using age-independent priors
    +adj1 <- dscore(boy, prior_mean_NA = 50, prior_sd_NA = 20, key = "gsed2406")
    +adj1
    +
    ##        a  n      p     d      sem    daz
    +## 1 0.4873 11 0.9091 30.76 3.751319 -0.633
    +## 2     NA 14 0.6429 26.51 2.693178     NA
    +## 3     NA 19 0.9474 54.25 5.061741     NA
    +## 4 1.9055 13 0.8462 63.88 2.971594 -0.094
    +

    This call to dscore() uses custom settings +prior_mean_NA = 50 and prior_sd_NA = 20, which +are suggested age-independent values for children with missing ages +between 0 and 3 years.

    +
    +# Forcing D-scores for missing ages to value -1
    +adj2 <- dscore(boy, prior_mean_NA = -1, prior_sd_NA = 0.001, key = "gsed2406")
    +adj2
    +
    ##        a  n      p     d      sem    daz
    +## 1 0.4873 11 0.9091 30.76 3.751319 -0.633
    +## 2     NA 14 0.6429 -1.00 0.000000     NA
    +## 3     NA 19 0.9474 -1.00 0.000000     NA
    +## 4 1.9055 13 0.8462 63.88 2.971594 -0.094
    +

    This call sets a custom prior mean and standard deviation +prior_mean_NA = -1 and prior_sd_NA = 0.001, +effectively resulting in a constant value for the D-score (note that +prior_sd_NA = 0 produces missing values).

    +

    Note that the prior_mean_NA and prior_sd_NA +arguments are ignored when prior_mean and +prior_sd are set per observation (either by direct or +column specification). Those options allow for full control over the +handling of missing ages on a case-by-case basis.

    +
    +
    +
    + + + +
    + + + +
    + +
    +

    +

    Site built with pkgdown 2.1.3.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/articles/custom_priors_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/custom_priors_files/figure-html/unnamed-chunk-4-1.png new file mode 100644 index 00000000..a9add690 Binary files /dev/null and b/docs/articles/custom_priors_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/custom_priors_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/custom_priors_files/figure-html/unnamed-chunk-7-1.png new file mode 100644 index 00000000..47be4221 Binary files /dev/null and b/docs/articles/custom_priors_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/docs/articles/getting_started.html b/docs/articles/getting_started.html index 8ccb1cdd..25175f21 100644 --- a/docs/articles/getting_started.html +++ b/docs/articles/getting_started.html @@ -12,14 +12,13 @@ - - +
    @@ -45,7 +44,7 @@
  • @@ -65,7 +73,7 @@
  • - +
  • @@ -76,7 +84,7 @@
    - +
    @@ -95,21 +103,22 @@

    Getting started

    Overview

    -

    The \(D\)-score is a one-number -summary measure of early child development. The \(D\)-score has a fixed unit. In principle, -we may use the \(D\)-score to answer questions on +

    The D-score is a one-number summary measure of early child +development. The D-score has a fixed unit. In principle, we may use the +D-score to answer questions on the individual, group and population level, but be aware that no instruments have yet been validated for individual application. For more background, see the introductory booklet D-score: Turning milestones into measurement.

    -

    This vignette shows how to estimate the \(D\)-score and the \(D\)-score age-adjusted Z-score (DAZ) from -child data on developmental milestones. The vignette covers some typical -actions needed when estimating the \(D\)-score and DAZ:

    +

    This vignette shows how to estimate the D-score and the D-score +age-adjusted Z-score (DAZ) from child data on developmental milestones. +The vignette covers some typical actions needed when estimating the +D-score and DAZ:

    1. Identify whether the dscore package covers your measurement instrument;
    2. Map your variable names to the GSED 9-position schema;
    3. -
    4. Calculate \(D\)-score and DAZ;
    5. +
    6. Calculate D-score and DAZ;
    7. Summarise your results.
    @@ -118,71 +127,117 @@

    Is your measurement instrument c

    The dscore package covers a subset of all possible assessment instruments. Moreover, it may have a restricted age range for -a given instrument. Your first tasks are

    -
      -
    • to evaluate whether the current dscore package can -convert your measurements into \(D\)-scores;
    • -
    • to choose a key that best suits your objectives.
    • -
    -

    The inventory by Fernald et al. (2017) identified 147 -instruments for assessing the development of children aged 0-8 -years. Well-known examples include the Bayley Scales for Infant and -Toddler Development and the Ages & Stages -Questionnaires. The \(D\)-score is -defined by and calculated from, subsets of milestones from such -instruments.

    -

    Assessment instruments connect to the \(D\)-score through a measurement -model. We use the term key to refer to a particular -instance of a measurement model. The dscore package -currently supports the following keys (in historic order):

    +a given instrument. Your first task is to evaluate whether the current +dscore package can convert your measurements into +D-scores.

    +

    A 2017 Worldbank report (Fernald et al. 2017) identified 147 +instruments for assessing the development of children aged 0-8 years. +Well-known examples include the Bayley Scales for Infant and Toddler +Development and the Ages & Stages Questionnaires. The +D-score is defined by and calculated from, subsets of milestones from +such instruments.

    +

    Assessment instruments connect to the D-score through a +measurement model, the Rasch model. We use the term +key to refer to a particular set of parameters +(difficulty estimates) of a fitted Rasch model. The key defines how 0/1 +milestone scores are translated into a D-score, as thus can be seen as +part of the scoring system.

    +

    The dscore package contains a generic algorithm that +takes:

      -
    1. -dutch, a model developed for the Dutch development -instrument;
    2. -
    3. -gcdg, a model covering 14 instruments using -direct measurements;
    4. -
    5. -gsed1912, covers 20 instruments using a mix of -direct and caregiver-reported measurements (Dec -2019);
    6. -
    7. -293_0, covers only GSED SF (138 items) and GSED LF (155 -items). GSED core model. (Aug 2022)
    8. -
    9. -gsed2212, covers 23 instruments using a mix of -direct and caregiver-reported measurements. Extends -the GSED core model. (Jan 2022).
    10. +
    11. the 0/1 scores on a set of milestones for a given child;
    12. +
    13. the age(s) of the child at which the test is administered;
    14. +
    15. a specification of the key;
    -

    Different keys lead to different \(D\)-scores. Hence, we may compare only -\(D\)-scores that are calculated under -the same key. Our advice to set the key is:

    +

    and then calculates the D-score and its +Standard Error of Measurement (SEM) for the child at +each age.

    +

    The dscore package currently supports the following keys +(in historic order):

    + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Key nameDescriptionReference
    dutchA model developed for the Dutch development +instrument +van Buuren (2014)
    gcdgA model covering 13 instruments using direct +measurementsWeber et al. (2019)
    gsed1912Covers 20 instruments using a mix of direct +and caregiver-reported measurements +van Buuren et al. (2025) (Study 1)
    gsed2212Covers 23 instruments using a mix of direct +and caregiver-reported measurements +van Buuren et al. (2025) (Study 2)
    gsed2406Covers 23 instruments using a mix of direct +and caregiver-reported measurements. Same as gsed2212, but with +a different base population. +van Buuren et al. (2025) (Study 2)
    gsed2510Currently covers 4 instruments - In developmentIn preparation (Study 3)
    +

    Different keys lead to (slightly) different D-scores. We may only +compare D-scores that are calculated under the same key. Our advice to +set the key is:

    • For new data, use the generic key = "gsed". This choice -will automatically fetch the latest GSED key;
    • -
    • To explicitly set the most recent key use -key = "gsed2212". The ignores later keys.
    • +will automatically fetch the latest GSED key, which is +key = "gsed2510"; +
    • Key gsed2406 has a wider coverage, Use that if your +instrument is not covered by gsed2510.
    • Use older keys dutch, gcdg or gsed1912 to regenerate old results. These are unlikely to be useful for new data;
    • -
    • Superseeded keys are: gsed2206, gsed2208, -lf2206, sf2006 and 294_0. These -are available for research purposes, and will be removed in future -versions.
    • +
    • Superseded keys are: gsed2212, gsed2206, +gsed2208, lf2206, sf2006, +294_0 and 293_0. Use for research purposes +only.

    The table given below displays the number of items per instrument for various keys. If the entry is blank, the key does not cover the instrument.

    - +
    --------++++++++ @@ -191,8 +246,8 @@

    Is your measurement instrument c

    - - + + @@ -252,8 +307,8 @@

    Is your measurement instrument c

    - - + + @@ -267,7 +322,7 @@

    Is your measurement instrument c

    - + @@ -307,53 +362,33 @@

    Is your measurement instrument c

    - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - + + - - + + @@ -469,11 +504,11 @@

    Is your measurement instrument c

    - - - - - + + + + + @@ -487,7 +522,7 @@

    Is your measurement instrument c

    - + @@ -507,42 +542,20 @@

    Is your measurement instrument c

    Codedutch gcdg gsed1912gsed2212293_0gsed2406gsed2510
    105 6767172242
    cro
    ddiDutch Development Instrument (Van Wiechenschema)Dutch Development Instrument (Van Wiechen Schema) 77 76 65
    gs1GSED SF (v1, Phase 2 validation)GSED SF (2023) 139 138136
    gl1GSED LF (v1, Phase 2 validation)GSED LF (2023) 155 155145
    gh1GSED HF (v1, JAN 2023 version 20230113)5555
    gtoGSED LF (v0, Phase 1 validation)155155155
    gpaGSED SF (v0, Phase 1 validation)139GSED HF (2023)48 1381384848
    iyo 76565807818293
    ecdEerly Child Development Indicators (ECDI)Early Child Development Indicators (ECDI) 20
    -

    Unfortunately, it is not possible to calculate the \(D\)-score if your instrument is not on the -list, or if all of its entries under the key headings are blank. You may -wish to file an extension request to incorporate your instrument in a -future version of the dscore package. It remains an -empirical question, however, whether the requested extension is -possible.

    -

    For some instruments, e.g., for cro only one choice is -possible ("gsed"). For gri, we may choose -between "gcdg" and "gsed1912" or -"gsed2212". Your choice may depend on the goal of your -analysis. If you want to compare to other \(D\)-scores calculated under key -"gcdg", or reproduce an analysis made under that key, then -pick "gcdg". If that is not the case, then -"gsed2212" is probably a better choice because of its -broader generalizability. The default key is "gsed". Before -version 1.5.0 the default linked to "gsed1912". Since -version 1.7.0 the default selects "gsed2212".

    -

    The extensions for Mullen were added to the “"gsed1912" -key. The extension was made based on two datasets, the Provide dataset -(Nelson) and -the Bambam dataset (Deoni). The Mullen items were matched to -existing items and two well fitting items were selected as anchors in a -new model on the combined Provide and Bambam data.

    +

    You can’t compute a D-score if your instrument isn’t supported. If it +does measure child development, we can often extend the key to include +it. This requires a one-time effort—mapping your items to the milestone +schema and estimating difficulty parameters. Once added, the key is +reusable, and you’ll be able to compute valid D-scores for that +instrument. The table shows two such extensions: one for Mullen and one +for ECDI.

    The designs of the original cohorts determine the age coverage for each instrument. The figure above indicates the age range currently -supported by the "gsed2212" key. Some instruments contain -many items for the first two years (e.g., by1, -dmc), whereas others cover primarily upper ages (e.g., -tep, ecd). If you find that the ages in your -sample deviate from those in the figure, you may wish to file an -extension request to incorporate new ages in a future version of the -dscore package.

    +supported by the "gsed2510" key.

    -

    Map variable names to the GSED 9-position schema +

    GSED 9-position item names

    The dscore() function accepts item names that follow the GSED 9-position schema. A name with a length of nine characters @@ -592,15 +605,15 @@

    Map variable names to ## 1 by3 cg d 018 ## 2 den fm d 014

    This function returns a data.frame with four character -vectors.

    -

    The dscore package can recognise 3843 item names. The +vectors for further processing.

    +

    The dscore package recognises 3836 item names. The expression get_itemnames() returns a (long) vector of all -known item names. Let us construct a table of instruments by -domains:

    +known item names. Let us study the table of instruments by domain:

     items <- get_itemnames()
    -din <- decompose_itemnames(items)
    -knitr::kable(with(din, table(instrument, domain)), format = "html") %>% 
    +din <- decompose_itemnames(items) |>
    +  dplyr::filter(!instrument %in% c("gsd", "gpa", "gto", "rap"))
    +knitr::kable(with(din, table(instrument, domain)), format = "html") |>
       kableExtra::column_spec(1, monospace = TRUE)
    @@ -646,9 +659,6 @@

    Map variable names to hs

    - - - @@ -914,9 +918,6 @@

    Map variable names to 0

    - - - - - - - - - @@ -1643,16 +1620,13 @@

    Map variable names to 0

    - @@ -1765,9 +1739,6 @@

    Map variable names to 0

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3461,8 +3043,13 @@

    Map variable names to items are called mot1, mot2, and mot3.

    -data <- data.frame(id = c(1, 1, 2), age = c(1, 1.6, 0.9), mot1 = c(1, NA, NA), 
    -                   mot2 = c(0, 1, 1), mot3 = c(NA, 0, 1))
    +data <- data.frame(
    +  id = c(1, 1, 2),
    +  age = c(1, 1.6, 0.9),
    +  mot1 = c(1, NA, NA),
    +  mot2 = c(0, 1, 1),
    +  mot3 = c(NA, 0, 1)
    +)
     data
    ##   id age mot1 mot2 mot3
     ## 1  1 1.0    1    0   NA
    @@ -3486,10 +3073,10 @@ 

    Map variable names to match these response categories.

    -

    Calculate the \(D\)-score and -DAZ +

    Calculate the D-score and DAZ

    -

    Once the data are in proper shape, calculation of the \(D\)-score and DAZ is easy.

    +

    Once the data are in proper shape, calculation of the D-score and DAZ +is easy.

    The milestones dataset in the dscore package contains responses of 27 preterm children measured at various age between birth and 2.5 years on the Dutch Development Instrument @@ -3515,9 +3102,9 @@

    Calculate the \ DDI-items. A 1 means a PASS, a 0 means a FAIL, and NA means that the item was not administered.

    The milestones dataset has properly named columns that -identify each item. Calculating the \(D\)-score and DAZ is then done by:

    +identify each item. Calculating the D-score and DAZ is then done by:

    -ds <- dscore(milestones)
    +ds <- dscore(milestones, population = "dutch", key = "dutch")
     dim(ds)
    ## [1] 100   6

    Where ds is a data.frame with the same @@ -3525,17 +3112,20 @@

    Calculate the \
     head(ds)
    ##        a  n      p     d      sem    daz
    -## 1 0.4873 11 0.9091 24.43 1.706427 -1.819
    -## 2 0.6571 14 0.6429 26.15 1.110480 -2.667
    -## 3 1.1800 19 0.9474 49.12 1.654354 -0.741
    -## 4 1.9055 13 0.8462 60.96 1.318412 -0.607
    -## 5 0.5503 11 0.8182 22.47 1.322767 -2.637
    -## 6 0.7666 14 0.7857 28.57 1.038593 -2.822
    +## 1 0.4873 18 0.8333 29.11 1.837552 -1.837 +## 2 0.6571 18 0.7222 34.18 1.478156 -1.991 +## 3 1.1800 19 0.9474 51.82 2.401714 -0.202 +## 4 1.9055 15 0.8667 62.95 1.794096 0.075 +## 5 0.5503 18 0.8333 29.41 1.861036 -2.421 +## 6 0.7666 18 0.8333 36.76 1.679393 -2.125

    +

    In addition, the package calculate the Development-for-Age +Z-score (DAZ), which gives the position of the child relative +to age peers.

    The table below provides the interpretation of the output:

    -la - lg @@ -745,9 +755,6 @@

    Map variable names to 0

    -0 - 1 @@ -855,9 +862,6 @@

    Map variable names to 0

    -0 - 66
    -0 - 30 @@ -997,9 +998,6 @@

    Map variable names to 0

    -0 - 134 @@ -1083,9 +1081,6 @@

    Map variable names to 0

    -0 - 165 @@ -1184,9 +1179,6 @@

    Map variable names to 0

    -0 - 49 @@ -1258,9 +1250,6 @@

    Map variable names to 0

    -0 - 39 @@ -1373,9 +1362,6 @@

    Map variable names to

    0 -0 -
    @@ -1421,9 +1407,6 @@

    Map variable names to 0

    -0 - 39 @@ -1507,9 +1490,6 @@

    Map variable names to 0

    -0 - 11 @@ -1629,9 +1609,6 @@

    Map variable names to 0

    -0 - 20
    -3 - 0 -0 +9 -0 +1 0 @@ -1673,7 +1647,7 @@

    Map variable names to 0

    -0 +3 0 @@ -1682,16 +1656,16 @@

    Map variable names to 0

    -15 +6 -4 +0 0 -23 +21 0 @@ -1706,7 +1680,7 @@

    Map variable names to 0

    -10 +7 0 @@ -1718,7 +1692,7 @@

    Map variable names to 0

    -0 +1
    -0 - 52 @@ -1809,19 +1780,16 @@

    Map variable names to

    -gpa +gri 0 -1 - -30 +86 -1 +0 0 @@ -1830,31 +1798,31 @@

    Map variable names to 0

    -0 +86 0 -1 +0 0 -8 +0 -0 +86 0 -2 +86 -16 +0 0 @@ -1863,7 +1831,7 @@

    Map variable names to 0

    -48 +0 0 @@ -1875,10 +1843,10 @@

    Map variable names to 0

    -0 +38 -28 +0 0 @@ -1890,18 +1858,18 @@

    Map variable names to 0

    -4 +0
    -gri +gs1 0 -86 +11 0 @@ -1913,9 +1881,6 @@

    Map variable names to 0

    -86 - 0 @@ -1928,28 +1893,28 @@

    Map variable names to 0

    -86 +0 0 -86 +0 0 -0 +39 -0 +12 0 -0 +56 0 @@ -1961,10 +1926,10 @@

    Map variable names to 0

    -38 +0 -0 +21 0 @@ -1981,15 +1946,12 @@

    Map variable names to

    -gs1 +hyp 0 -11 - 0 @@ -2017,7 +1979,7 @@

    Map variable names to 0

    -0 +5 0 @@ -2026,16 +1988,16 @@

    Map variable names to 0

    -39 +0 -12 +0 0 -56 +0 0 @@ -2050,7 +2012,7 @@

    Map variable names to 0

    -21 +0 0 @@ -2067,15 +2029,12 @@

    Map variable names to

    -gsd +iyo 0 -1 - 0 @@ -2094,13 +2053,13 @@

    Map variable names to 0

    -1 +0 0 -3 +0 0 @@ -2109,10 +2068,10 @@

    Map variable names to 0

    -2 +0 -0 +30 0 @@ -2121,7 +2080,7 @@

    Map variable names to 0

    -0 +40 0 @@ -2136,7 +2095,7 @@

    Map variable names to 0

    -0 +20 0 @@ -2153,7 +2112,7 @@

    Map variable names to

    -gto +kdi 0 @@ -2180,13 +2139,13 @@

    Map variable names to 0

    -54 +34 0 -49 +35 0 @@ -2198,9 +2157,6 @@

    Map variable names to 0

    -52 - 0 @@ -2239,7 +2195,7 @@

    Map variable names to

    -hyp +mac 0 @@ -2272,10 +2228,7 @@

    Map variable names to 0

    -5 - -0 +7 0 @@ -2325,7 +2278,7 @@

    Map variable names to

    -iyo +mds 0 @@ -2358,7 +2311,7 @@

    Map variable names to 0

    -0 +6 0 @@ -2370,16 +2323,13 @@

    Map variable names to 0

    -30 - 0 0 -40 +0 0 @@ -2394,7 +2344,7 @@

    Map variable names to 0

    -20 +0 0 @@ -2411,7 +2361,7 @@

    Map variable names to

    -kdi +mdt 0 @@ -2444,10 +2394,7 @@

    Map variable names to 0

    -35 - -0 +34 0 @@ -2456,7 +2403,7 @@

    Map variable names to 0

    -0 +34 0 @@ -2480,7 +2427,7 @@

    Map variable names to 0

    -0 +34 0 @@ -2497,13 +2444,13 @@

    Map variable names to

    -mac +mul 0 -0 +50 0 @@ -2518,19 +2465,19 @@

    Map variable names to 0

    -0 +50 0 -0 +48 0 -7 +36 0 @@ -2560,268 +2507,7 @@

    Map variable names to 0

    -0 - -0 - -0 - -0 - -0 - -0 - -0 -
    -mds - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -6 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 -
    -mdt - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -34 - -0 - -34 - -0 - -0 - -0 - -34 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -34 - -0 - -0 - -0 - -0 -
    -mul - -0 - -50 - -0 - -0 - -0 - -0 - -50 - -0 - -48 - -0 - -36 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -0 - -48 +48 0 @@ -2921,9 +2607,6 @@

    Map variable names to

    0 -0 -
    @@ -2993,9 +2676,6 @@

    Map variable names to 0

    -0 - 16 @@ -3013,92 +2693,6 @@

    Map variable names to

    -rap - -0 - -0 - -30 - -1 - -0 - -0 - -0 - -0 - -0 - -0 - -5 - -0 - -0 - -0 - -16 - -0 - -0 - -48 - -0 - -0 - -0 - -0 - -28 - -0 - -0 - -0 - -11 -
    sbi @@ -3171,9 +2765,6 @@

    Map variable names to 0

    -0 - 21 @@ -3248,9 +2839,6 @@

    Map variable names to 0

    -0 - 36 @@ -3313,9 +2901,6 @@

    Map variable names to 0

    -0 - 36 @@ -3435,9 +3020,6 @@

    Map variable names to 0

    -0 - 50
    --++ @@ -3548,7 +3138,7 @@

    Calculate the \

    - + @@ -3556,9 +3146,7 @@

    Calculate the \

    - + @@ -3567,14 +3155,13 @@

    Calculate the \

    - +
    Name
    nnumber of items used to calculate \(D\)-scorenumber of items used to calculate D-score
    p
    d -\(D\)-score estimate, mean of -posteriorD-score estimate, mean of posterior
    sem
    daz -\(D\)-score corrected for ageD-score corrected for age

    -

    Summarise \(D\)-score and DAZ +

    Summarise D-score and DAZ

    Combine the milestones data and the result by

    @@ -3584,134 +3171,179 @@ 

    Summarise \(D\)library(ggplot2) library(dplyr) -r <- builtin_references %>% - filter(pop == "dutch") %>% - select(age, SDM2, SD0, SDP2) +# Prepare the reference ribbon data: sort by age and convert months → years +r <- builtin_references %>% + filter(population == "dutch" & key == "dutch") %>% + transmute(age_years = age, SDM2, SD0, SDP2) %>% + arrange(age_years) -ggplot(md, aes(x = a, y = d, group = id, color = sex)) + - theme_light() + - theme(legend.position = c(.85, .15)) + - theme(legend.background = element_blank()) + - theme(legend.key = element_blank()) + - annotate("polygon", x = c(r$age, rev(r$age)), - y = c(r$SDM2, rev(r$SDP2)), alpha = 0.1, fill = "green") + - annotate("line", x = r$age, y = r$SDM2, lwd = 0.3, alpha = 0.2, color = "green") + - annotate("line", x = r$age, y = r$SDP2, lwd = 0.3, alpha = 0.2, color = "green") + - annotate("line", x = r$age, y = r$SD0, lwd = 0.5, alpha = 0.2, color = "green") + +ggplot(md, aes(x = a, y = d, group = id, colour = sex)) + + theme_light() + + theme( + legend.position = c(0.85, 0.15), + legend.background = element_blank(), + legend.key = element_blank() + ) + + geom_ribbon( + data = r, + inherit.aes = FALSE, + aes(x = age_years, ymin = SDM2, ymax = SDP2), + fill = "green", + alpha = 0.1 + ) + + geom_line( + data = r, + inherit.aes = FALSE, + aes(x = age_years, y = SDM2), + linewidth = 0.3, + alpha = 0.6, + colour = "green" + ) + + geom_line( + data = r, + inherit.aes = FALSE, + aes(x = age_years, y = SDP2), + linewidth = 0.3, + alpha = 0.6, + colour = "green" + ) + + geom_line( + data = r, + inherit.aes = FALSE, + aes(x = age_years, y = SD0), + linewidth = 0.5, + alpha = 0.8, + colour = "green" + ) + coord_cartesian(xlim = c(0, 2.5)) + - ylab(expression(paste(italic(D), "-score", sep = ""))) + - xlab("Age (in years)")+ + ylab(expression(italic(D) * "-score")) + + xlab("Age (years)") + scale_color_brewer(palette = "Set1") + - geom_line(lwd = 0.1) + + geom_line(linewidth = 0.1) + geom_point(size = 1)

    -
    ## Warning: A numeric `legend.position` argument in `theme()` was deprecated in ggplot2
    -## 3.5.0.
    -##  Please use the `legend.position.inside` argument of `theme()` instead.
    -## This warning is displayed once every 8 hours.
    -## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
    -## generated.

    Note that similarity of these curves to growth curves for body height and weight.

    -

    The DAZ is an age-standardized \(D\)-score with a standard normal +

    The DAZ is an age-standardized D-score with a standard normal distribution with mean 0 and variance 1. We plot the individual DAZ curves relative to the Dutch references by

    -
    -ggplot(md, aes(x = a, y = daz, group = id, color = factor(sex))) + 
    -  theme_light() + 
    +
    +ggplot(md, aes(x = a, y = daz, group = id, color = factor(sex))) +
    +  theme_light() +
       theme(legend.position = c(.85, .15)) +
       theme(legend.background = element_blank()) +
       theme(legend.key = element_blank()) +
       scale_color_brewer(palette = "Set1") +
    -  annotate("rect", xmin = -Inf, xmax = Inf, ymin = -2, ymax = 2, alpha = 0.1,
    -            fill = "green") +
    -  coord_cartesian(xlim = c(0, 2.5), 
    -                  ylim = c(-4, 4)) +
    +  annotate(
    +    "rect",
    +    xmin = -Inf,
    +    xmax = Inf,
    +    ymin = -2,
    +    ymax = 2,
    +    alpha = 0.1,
    +    fill = "green"
    +  ) +
    +  coord_cartesian(
    +    xlim = c(0, 2.5),
    +    ylim = c(-4, 4)
    +  ) +
       geom_line(lwd = 0.1) +
       geom_point(size = 1) +
       xlab("Age (in years)") +
    -  ylab("DAZ") 
    + ylab("DAZ")

    -

    Note that the \(D\)-scores and DAZ -are a little lower than average. The explanation here is that these all -children are born preterm. We can account +

    Note that the D-scores and DAZ are a little lower than average. The +explanation here is that these all children are born preterm. We can account for prematurity by correcting for gestational age.

    The distributions of DAZ for boys and girls show that a large overlap:

    -
    -ggplot(md) + 
    +
    +ggplot(md) +
       theme_light() +
       scale_fill_brewer(palette = "Set1") +
    -  geom_density(aes(x = daz, group = sex, fill = sex), alpha = 0.4, 
    -               adjust = 1.5, color = "transparent") +
    +  geom_density(
    +    aes(x = daz, group = sex, fill = sex),
    +    alpha = 0.4,
    +    adjust = 1.5,
    +    color = "transparent"
    +  ) +
       xlab("DAZ")

    Under the assumption of independence, we may test whether sex differences are constant in age by a linear regression that includes the interaction between age and sex:

    -
    -summary(lm(daz ~  age * sex, data = md))
    +
    +summary(lm(daz ~ age * sex, data = md))
    ## 
     ## Call:
     ## lm(formula = daz ~ age * sex, data = md)
     ## 
     ## Residuals:
    -##     Min      1Q  Median      3Q     Max 
    -## -1.5206 -0.7010 -0.2545  0.3622  3.0234 
    +##      Min       1Q   Median       3Q      Max 
    +## -2.44533 -0.76002 -0.09713  0.65028  3.11002 
     ## 
     ## Coefficients:
     ##             Estimate Std. Error t value Pr(>|t|)    
    -## (Intercept) -2.49168    0.29204  -8.532  2.1e-13 ***
    -## age          1.07557    0.24440   4.401  2.8e-05 ***
    -## sexmale      0.01256    0.40473   0.031    0.975    
    -## age:sexmale -0.12600    0.32473  -0.388    0.699    
    +## (Intercept) -2.13455    0.32499  -6.568 2.62e-09 ***
    +## age          1.15137    0.27197   4.233 5.27e-05 ***
    +## sexmale      0.07164    0.45039   0.159    0.874    
    +## age:sexmale -0.12750    0.36137  -0.353    0.725    
     ## ---
     ## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
     ## 
    -## Residual standard error: 1.022 on 96 degrees of freedom
    -## Multiple R-squared:  0.2895, Adjusted R-squared:  0.2673 
    -## F-statistic: 13.04 on 3 and 96 DF,  p-value: 3.248e-07
    -

    This group of very preterms starts around -2.5 SD, followed by a -catch-up in child development of approximately 1.0 SD per year. The size -of the catch-up is equal for boys and girls.

    +## Residual standard error: 1.137 on 96 degrees of freedom +## Multiple R-squared: 0.2752, Adjusted R-squared: 0.2525 +## F-statistic: 12.15 on 3 and 96 DF, p-value: 8.28e-07
    +

    This group of children born very preterm starts around -2.5 SD, +followed by a catch-up in child development of approximately 1.0 SD per +year. The size of the catch-up is equal for boys and girls.

    We may account for the clustering effect by including random intercept and age effects, and rerun as

    - -
    ## Loading required package: Matrix
    -
    -lmer(daz ~  1 + age + sex + sex * age + (1 + age | id), data = md)
    +
    +library(Matrix)
    +library(lme4, quiet = TRUE)
    +lmer(daz ~ 1 + age + sex + sex * age + (1 + age | id), data = md)
    ## Linear mixed model fit by REML ['lmerMod']
     ## Formula: daz ~ 1 + age + sex + sex * age + (1 + age | id)
     ##    Data: md
    -## REML criterion at convergence: 289.034
    +## REML criterion at convergence: 304.3713
     ## Random effects:
     ##  Groups   Name        Std.Dev. Corr 
    -##  id       (Intercept) 0.4581        
    -##           age         0.1900   -0.73
    -##  Residual             0.9590        
    +##  id       (Intercept) 0.9861        
    +##           age         0.6386   -0.85
    +##  Residual             0.9265        
     ## Number of obs: 100, groups:  id, 27
     ## Fixed Effects:
     ## (Intercept)          age      sexmale  age:sexmale  
    -##    -2.51144      1.09862      0.02337     -0.13924
    +## -2.1684 1.2067 0.1080 -0.1719

    This analysis yields the same substantive conclusions as before.

    References

    -
    -Deoni, S. “Resilience and Early Brain Development.” -Providence, USA. -
    Fernald, L. C. H., E. Prado, P. Kariger, and A. Raikes. 2017. “A Toolkit for Measuring Early Childhood Development in Low and Middle-Income Countries.” https://documents.worldbank.org/en/publication/documents-reports/documentdetail/384681513101293811/a-toolkit-for-measuring-early-childhood-development-in-low-and-middle-income-countries.
    -
    -Nelson, C. “Bangladesh Early Adversity Neuroimaging -Project.” Bangladesh. +
    +van Buuren, S. 2014. “Growth Charts of Human Development.” +Statistical Methods in Medical Research 23 (4): 346–68. https://stefvanbuuren.name/publication/van-buuren-2014-gc/. +
    +
    +van Buuren, S., I. Eekhout, G. McCray, G. A. Lancaster, M. R. Waldman, +D. C. McCoy, M. Gladstone, et al. 2025. “Enhancing Comparability +in Early Child Development Assessment with the d-Score.” +International Journal of Behavioral Development 49 (4): 348–64. +https://doi.org/10.1177/01650254241294033. +
    +
    +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.
    @@ -3719,9 +3351,7 @@

    References - -

    +
    @@ -3729,21 +3359,21 @@

    References

    -

    Developed by Stef van Buuren, Iris Eekhout, Arjan Huizing.

    +

    Developed by Stef van Buuren, Iris Eekhout, Arjan Huizing, Jonathan Seiden.

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/articles/getting_started_files/figure-html/density-1.png b/docs/articles/getting_started_files/figure-html/density-1.png index 3f326906..1ccebbd7 100644 Binary files a/docs/articles/getting_started_files/figure-html/density-1.png and b/docs/articles/getting_started_files/figure-html/density-1.png differ diff --git a/docs/articles/getting_started_files/figure-html/graphD-1.png b/docs/articles/getting_started_files/figure-html/graphD-1.png index 852a3699..c8818dae 100644 Binary files a/docs/articles/getting_started_files/figure-html/graphD-1.png and b/docs/articles/getting_started_files/figure-html/graphD-1.png differ diff --git a/docs/articles/getting_started_files/figure-html/graphDAZ-1.png b/docs/articles/getting_started_files/figure-html/graphDAZ-1.png index e15fcb6e..c206f491 100644 Binary files a/docs/articles/getting_started_files/figure-html/graphDAZ-1.png and b/docs/articles/getting_started_files/figure-html/graphDAZ-1.png differ diff --git a/docs/articles/getting_started_files/figure-html/graphkey-1.png b/docs/articles/getting_started_files/figure-html/graphkey-1.png index ae665967..ef4e1395 100644 Binary files a/docs/articles/getting_started_files/figure-html/graphkey-1.png and b/docs/articles/getting_started_files/figure-html/graphkey-1.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html index 3f827666..bb46e99c 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -3,7 +3,7 @@ - +
    @@ -28,7 +28,7 @@
  • Changelog @@ -44,14 +53,14 @@
  • - +
    @@ -60,32 +69,38 @@

    Articles

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/articles/multiple_keys.html b/docs/articles/multiple_keys.html new file mode 100644 index 00000000..2778814b --- /dev/null +++ b/docs/articles/multiple_keys.html @@ -0,0 +1,364 @@ + + + + + + + +Multiple keys (Advanced) • dscore + + + + + + + + + + + +
    +
    + + + + +
    +
    + + + + +

    In preparation

    +
    +

    Motivation +

    +

    A key is a set of difficulty estimates linked to +items from one or more instruments. As more data become available, the +key may be updated periodically to incorporate the additional +information. This results in multiple versions of the key. Although keys +are designed to produce D-scores on the same general scale, each key +defines a slightly different scale. As a result, the same set of child +responses may yield different D-scores depending on which key is +used.

    +

    For new data, the most recent default key is usually recommended. +However, if strict comparability with earlier analyses is important, it +may be preferable to use an older key.

    +

    This vignette explains the policy for setting default keys and +demonstrates how to compare D-scores across different keys. Because this +is an advanced topic, it assumes a basic understanding of the D-score +calculation process. If you are new to the D-score methodology, we +recommend reviewing the introductory vignettes before proceeding.

    +
    +
    +

    Relation to the D-score +

    +
      +
    • The D-score depends on the difficulty parameters +defined by a key.
    • +
    • Updating a key updates those parameters and can slightly shift +scores.
    • +
    • Differences are typically small but may matter for strict +comparability.
    • +
    +
    +# Example (pseudo-code): compute a D-score given a key
    +# library(dscore)
    +# d1 <- dscore(items = x, key = "gsed2406")
    +# d2 <- dscore(items = x, key = "gsed2510")
    +# cbind(d1, d2, diff = d2 - d1)
    +
    +
    +

    Default vs. Alternative Keys +

    +
    +

    Policy for default key selection +

    +

    Describe how the default key is chosen (e.g., most +recent stable release) and how often it is updated. State where users +can find the current default in the package documentation.

    +
    +
    +

    When to use an older key +

    +
      +
    • Ensure comparability with past analyses or +publications.
    • +
    • Reproduce earlier results precisely.
    • +
    • Regulatory or reporting requirements that fix a specific key.
    • +
    +
    +# Check the package default key (example; replace with your function)
    +# dscore::get_default_key()
    +
    +
    +
    +

    Working with Keys in Practice +

    +
    +

    List available keys +

    +

    Show users how to enumerate supported keys.

    +
    +# Example (replace with the actual function name)
    +# keys <- dscore::list_keys()
    +# keys
    +
    +
    +

    Set the key +

    +

    Demonstrate how to select a specific key in your +workflow.

    +
    +# Example usage
    +# ds <- dscore(data, key = "gsed2406")
    +
    +
    +

    Change the default (session or project) +

    +

    Explain global vs. local configuration, and how to +set a default key for a session or project.

    +
    +# Session-level default (illustrative; adapt to your API)
    +# options(dscore.default_key = "gsed2510")
    +
    +# Confirm
    +# getOption("dscore.default_key")
    +
    +
    +
    +

    Comparing Keys +

    +
    +

    Impact on D-scores +

    +

    Show the same dataset scored under two keys and +compare.

    +
    +# Example skeleton
    +# ds1 <- dscore(dat, key = "gsed2406")
    +# ds2 <- dscore(dat, key = "gsed2510")
    +# comp <- transform(dat, d1 = ds1$D, d2 = ds2$D, diff = ds2$D - ds1$D)
    +# head(comp)
    +
    +
    +

    Diagnostics +

    +

    Provide simple diagnostics to understand differences +(plots/tables).

    +
    +# Histogram of differences
    +# hist(comp$diff, main = "D-score differences (new - old)", xlab = "Difference")
    +
    +# Correlation and summary
    +# cor(comp$d1, comp$d2, use = "complete.obs")
    +# summary(comp$diff)
    +
    +
    +

    Stability over time +

    +

    Discuss empirical evidence (e.g., median absolute +difference, 95% intervals) showing that differences across keys +are generally small.

    +
    +# Example summary
    +# mad <- median(abs(comp$diff), na.rm = TRUE)
    +# quant <- quantile(comp$diff, probs = c(0.025, 0.5, 0.975), na.rm = TRUE)
    +# list(median_abs_diff = mad, quantiles = quant)
    +
    +
    +
    +

    Caveats and Limitations +

    +
      +
    • +Instrument versions/translations: published item +orders may differ, which can limit the feasibility of a single “native” +ordering across locales.
    • +
    • +Mixing keys: avoid scoring datasets with +different keys when analyses are compared directly +across groups or time.
    • +
    • +Reporting: always record and report the key +identifier used.
    • +
    +
    +
    +

    Recommendations for Users +

    +
      +
    • Prefer the most recent default key for new +studies.
    • +
    • Use an older key when exact comparability is +required.
    • +
    • In publications and reports, cite the key (name and +version/date).
    • +
    +
    +
    +

    Worked Examples +

    +
    +

    Example 1: Score with the default key +

    +
    +# dat <- read.csv("your_data.csv")
    +# ds_default <- dscore(dat) # implicit default key
    +# head(ds_default)
    +
    +
    +

    Example 2: Score with a specific older key and compare +

    +
    +# ds_old <- dscore(dat, key = "gsed2406")
    +# ds_new <- dscore(dat, key = "gsed2510")
    +# delta <- ds_new$D - ds_old$D
    +# summary(delta)
    +
    +
    +

    Example 3: Visualize differences +

    +
    +# plot(ds_old$D, ds_new$D,
    +#      xlab = "Old key D-score",
    +#      ylab = "New key D-score",
    +#      main = "D-scores under two keys")
    +# abline(0, 1, lty = 2)
    +
    +
    +
    +

    Reproducibility Notes +

    +
      +
    • Always record: key, package +version, date, random seed +(if any).
    • +
    • Provide session info in appendices.
    • +
    +
    ## R version 4.5.1 (2025-06-13)
    +## Platform: aarch64-apple-darwin20
    +## Running under: macOS Tahoe 26.0.1
    +## 
    +## Matrix products: default
    +## BLAS:   /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRblas.0.dylib 
    +## LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.1
    +## 
    +## locale:
    +## [1] C.UTF-8/C.UTF-8/C.UTF-8/C/C.UTF-8/C.UTF-8
    +## 
    +## time zone: Europe/Amsterdam
    +## tzcode source: internal
    +## 
    +## attached base packages:
    +## [1] stats     graphics  grDevices utils     datasets  methods   base     
    +## 
    +## loaded via a namespace (and not attached):
    +##  [1] digest_0.6.37     desc_1.4.3        R6_2.6.1          fastmap_1.2.0    
    +##  [5] xfun_0.53         cachem_1.1.0      knitr_1.50        htmltools_0.5.8.1
    +##  [9] rmarkdown_2.29    lifecycle_1.0.4   cli_3.6.5         sass_0.4.10      
    +## [13] pkgdown_2.1.3     textshaping_1.0.3 jquerylib_0.1.4   systemfonts_1.2.3
    +## [17] compiler_4.5.1    tools_4.5.1       ragg_1.5.0        evaluate_1.0.5   
    +## [21] bslib_0.9.0       yaml_2.3.10       jsonlite_2.0.0    rlang_1.1.6      
    +## [25] fs_1.6.6          htmlwidgets_1.6.4
    +
    +
    + + + +
    + + + +
    + +
    +

    +

    Site built with pkgdown 2.1.3.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/articles/scoring_GSED.html b/docs/articles/scoring_GSED.html index 6244f18a..86642bce 100644 --- a/docs/articles/scoring_GSED.html +++ b/docs/articles/scoring_GSED.html @@ -12,14 +12,13 @@ - - +
    @@ -45,7 +44,7 @@
  • @@ -65,7 +73,7 @@
  • - +
  • @@ -76,7 +84,7 @@
    - +
    @@ -94,52 +102,49 @@

    Scoring GSED

    D-score and DAZ

    -

    Suppose you have administered GSED SF, GSED LF (McCray et al. -2023) or GSED HF to one or more children. The next step is -calculating each child’s developmental score (\(D\)-score) and age-adjusted equivalent -(DAZ). This step is known as scoring. The present -section provides recipes for calculating the \(D\)-score and DAZ. We may pick one of the -following two methods:

    +

    Suppose you have administered GSED SF, GSED LF (World Health Organization +(WHO) 2023; McCray et al. 2023) +or GSED HF to one or more children. The next step is calculating each +child’s developmental score (D-score) and age-adjusted equivalent (DAZ). +This step is known as scoring. The present section +provides recipes for calculating the D-score and DAZ. We may pick one of +the following two methods:

      -
    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 -option with all the tools needed to calculate the \(D\)-score. It is an excellent choice for -users familiar with R and users who like to incorporate -\(D\)-score calculations into a -workflow.
    5. +option with all the tools needed to calculate the D-score. It is an +excellent choice for users familiar with R and users who +like to incorporate D-score calculations into a workflow.
    -
    -
    -

    Preliminaries -

    +
    +

    Preliminaries +

    • We use the R language. If you are new to R -consult the Getting -Started with R site;
    • +consult the R for Data Science +book by Hadley Wickham and Garrett Grolemund;
    • You need to install the R package dscore on your local machine;
    • The child data need to be stored as a data.frame, a standard R tabular structure;
    • You need to run the dscore() function to calculate the -\(D\)-score and DAZ. The function -returns a table with six columns with the estimates with the same number -of rows as your data.
    • +D-score and DAZ. The function returns a table with six columns with the +estimates with the same number of rows as your data.
    -
    -

    Install the dscore package -

    +
    +

    Install the dscore package +

    The dscore package contains tools to

    • Map your item names to the GSED convention
    • -
    • Calculate D-scores from item level responses
    • -
    • Transform the D-scores into DAZ, age-standardised -Z-scores
    • +
    • Calculate D-scores from item level responses
    • +
    • Transform the D-scores into DAZ, age-standardised Z-scores

    The required input consists of item level responses on milestones collected using instruments for measuring child development, @@ -159,6 +164,7 @@

    Install the dscore packageThe development version requires a local C++ compiler for building the package from source.

    +

    GSED 9-position item names

    @@ -222,14 +228,14 @@

    Response data format\(D\)-score. Do not duplicate names in the +item name will contribute to the D-score. Do not duplicate names in the data. A PASS is coded as 1, a FAIL as 0. If there is no answer or if the item was not administered use the missing value code NA. Items that are never administered may be coded as all NA or deleted.

    The dataset may contain additional columns, e.g., the child number or -health information. These are ignored by the \(D\)-score calculation.

    +health information. These are ignored by the D-score calculation.

    The most important steps is preparing the data for the D-score calculations are:

      @@ -240,58 +246,88 @@

      Response data format -

      GSED Instruments +
      +

      GSED Instruments

      The table below lists the five available GSED instruments:

      +++++++++ - - - + + + + + + - + + - + + + - + + - + + + - + + - + + + - + + - + + + - + + - + + +
      Instrument nameInstrument codeLengthInstrumentYearCodeDomainsModeRange Status
      GSED SF V1GSED SF2023 gs1139cg|lg|li|mo|sec001-139 Active
      GSED LF V1GSED LF2023 gl1155gm|lg|fmd001-049|052|054 Active
      GSED HF V1GSED HF2023 gh155cg|lg|li|mo|sec001-048 Active
      GSED SF V0GSED SF2020 gpa139anyc001-139 Retired
      GSED LF V0GSED LF2020 gto155gm|lg|fmd001-049|052|054 Retired
      -

      Select the section corresponding to your instrument for further -instructions.

      +
      +
      +

      Instruments +

      -

      -GSED SF V1 +

      +GSED SF

      -

      The GSED SF V1 instrument contains 139 items and has -instrument code gs1.

      +

      The GSED Short Form (GSED SF) is a caregiver-reported +instrument containing 139 items. It has instrument code +gs1.

      Check

      @@ -311,12 +347,12 @@

      Check labels <- get_labels(items) head(cbind(items, substr(labels, 1, 50)))

      ##           items                                                           
      -## gs1sec001 "gs1sec001" "Does your child smile?"                            
      -## gs1moc002 "gs1moc002" "When lying on his/her back, does your child move h"
      -## gs1sec003 "gs1sec003" "Does your child look at your face when you speak t"
      -## gs1lgc004 "gs1lgc004" "Does your child cry when he/she is hungry, wet, ti"
      -## gs1moc005 "gs1moc005" "Does your child grasp your finger if you touch her"
      -## gs1cgc006 "gs1cgc006" "Does your child look at and focus on objects in fr"
      +## gs1sec001 "gs1sec001" "SF001 Does your child smile?" +## gs1moc002 "gs1moc002" "SF002 When lying on his/her back, does your child " +## gs1sec003 "gs1sec003" "SF003 Does your child look at your face when you s" +## gs1lgc004 "gs1lgc004" "SF004 Does your child cry when he/she is hungry, w" +## gs1moc005 "gs1moc005" "SF005 Does your child grasp your finger if you tou" +## gs1cgc006 "gs1cgc006" "SF006 Does your child look at and focus on objects"

      Renaming example @@ -349,21 +385,21 @@

      Renaming exampledscore() function.

      -

      Calculate \(D\)-score +

      Calculate D-score

      -

      Once the data are in proper shape, calculation of the \(D\)-score is straightforward. The -sf dataset has properly named columns that identify each -item.

      +

      Once the data are in proper shape, calculation of the D-score is +straightforward. The sf dataset has properly named columns +that identify each item.

       results <- dscore(sf, xname = "agedays", xunit = "days")
       head(results)
      -
      ##        a  n      p     d       sem    daz
      -## 1 2.2204 29 0.7586 64.78 0.6444784 -0.540
      -## 2 2.4586 39 0.6923 67.13 0.6492821 -0.515
      -## 3 0.5558 49 0.6531 38.36 0.9415629  1.055
      -## 4 2.6448 36 0.7500 73.22 0.6560832  0.828
      -## 5 2.1081 50 0.5000 65.49 0.6150650 -0.011
      -## 6 0.8378 49 0.6939 41.58 0.9687909 -0.595
      +
      ##        a  n      p     d      sem    daz
      +## 1 2.2204 29 0.7586 67.67 1.658818 -0.043
      +## 2 2.4586 39 0.6923 69.05 1.411819 -0.352
      +## 3 0.5558 48 0.6667 38.97 1.649425  1.058
      +## 4 2.6448 36 0.7500 74.47 1.471799  0.624
      +## 5 2.1081 50 0.5000 66.45 1.244876 -0.033
      +## 6 0.8378 48 0.7083 42.18 1.699459 -0.839

      The table below provides the interpretation of the output:

      @@ -377,7 +413,7 @@

      Calculate \(D\)-scor

      - + @@ -385,8 +421,7 @@

      Calculate \(D\)-scor

      - + @@ -394,8 +429,7 @@

      Calculate \(D\)-scor

      - +
      nNumber of items used to calculate the \(D\)-scoreNumber of items used to calculate the D-score
      p
      d -\(D\)-score (posterior mean)D-score (posterior mean)
      sem
      daz -\(D\)-score corrected for ageD-score corrected for age
      @@ -403,30 +437,35 @@

      Calculate \(D\)-scor rows of sf. We save the result for later processing.

       sf2 <- data.frame(sf, results)
      -

      It is possible to calculate \(D\)-score for item subsets by setting the +

      It is possible to calculate D-score for item subsets by setting the items argument. We do not advertise this option for -practical application, but suppose we are interested in the \(D\)-score based on items from -gs1 and gl1 for domains mo or -gm (motor) only. The “motor” \(D\)-score can be calculated as follows:

      +practical application, but suppose we are interested in the D-score +based on items from gs1 and gl1 for domains +mo or gm (motor) only. The “motor” D-score can +be calculated as follows:

      -items_motor <- get_itemnames(instrument = c("gs1", "gl1"), domain = c("mo", "gm"))
      +items_motor <- get_itemnames(
      +  instrument = c("gs1", "gl1"),
      +  domain = c("mo", "gm")
      +)
       results <- dscore(sf, items = items_motor, xname = "agedays", xunit = "days")
       head(results)
      ##        a  n      p     d      sem    daz
      -## 1 2.2204  6 0.8333 63.40 1.713268 -0.908
      -## 2 2.4586  8 0.7500 66.68 1.851939 -0.638
      -## 3 0.5558 30 0.7333 39.45 1.077956  1.365
      -## 4 2.6448  5 0.8000 75.07 1.487556  1.384
      -## 5 2.1081 10 0.7000 69.57 1.787357  1.178
      -## 6 0.8378 31 0.7419 41.17 1.133857 -0.702
      +## 1 2.2204 6 0.8333 67.40 3.391252 -0.116 +## 2 2.4586 8 0.7500 69.16 3.049288 -0.324 +## 3 0.5558 30 0.7333 39.89 1.946849 1.347 +## 4 2.6448 5 0.8000 75.78 3.154717 0.981 +## 5 2.1081 10 0.7000 69.52 2.808620 0.814 +## 6 0.8378 31 0.7419 42.35 1.983714 -0.790

      -

      -GSED LF V1 +

      +GSED LF

      -

      The GSED LF V1 instrument contains 155 items and has -instrument code gl1.

      +

      The GSED Long Form (GSED LF) instrument is a +directly-observed instrument containing 155 items with instrument code +gl1.

      Check

      @@ -451,12 +490,12 @@

      Check labels <- get_labels(items) head(cbind(items, substr(labels, 1, 50)))

      ##           items                                                           
      -## gl1gmd001 "gl1gmd001" "Moves body in reaction to caregiver"               
      -## gl1gmd002 "gl1gmd002" "Moves body, kicking legs and moving arms equally o"
      -## gl1gmd003 "gl1gmd003" "Pulls to sit - no head lag"                        
      -## gl1gmd004 "gl1gmd004" "Lifts head in prone 45 degrees"                    
      -## gl1gmd005 "gl1gmd005" "Lifts head, shoulders, chest when prone (2X)"      
      -## gl1gmd006 "gl1gmd006" "Puts hands together in front of face"
      +## gl1gmd001 "gl1gmd001" "A1 Moves body in reaction to caregiver" +## gl1gmd002 "gl1gmd002" "A2 Moves body, kicking legs and moving arms equal" +## gl1gmd003 "gl1gmd003" "A3 Pulls to sit - no head lag" +## gl1gmd004 "gl1gmd004" "A4 Lifts head in prone 45 degrees (2X)" +## gl1gmd005 "gl1gmd005" "A5 Lifts head, shoulders, chest when prone (2X)" +## gl1gmd006 "gl1gmd006" "A6 Puts hands together in front of face"

      Renaming example @@ -489,21 +528,21 @@

      Renaming exampledscore() function.

      -

      Calculate \(D\)-score +

      Calculate D-score

      -

      Once the data are in proper shape, calculation of the \(D\)-score is straightforward. The -lf dataset has properly named columns that identify each -item.

      +

      Once the data are in proper shape, calculation of the D-score is +straightforward. The lf dataset has properly named columns +that identify each item.

       results <- dscore(lf, xname = "agedays", xunit = "days")
       head(results)
      -
      ##        a  n      p     d       sem    daz
      -## 1 2.2204 45 0.5556 67.11 0.5870206  0.117
      -## 2 2.4586 53 0.6226 70.65 0.5484131  0.504
      -## 3 0.5558 34 0.5588 34.13 0.8412858 -0.150
      -## 4 2.6448 54 0.5185 70.80 0.5239288  0.103
      -## 5 2.1081 58 0.1724 37.53 1.1685368 -4.444
      -## 6 0.8378 32 0.5625 44.40 0.7570235  0.174
      +
      ##        a  n      p     d      sem    daz
      +## 1 2.2204 42 0.5476 66.91 1.328849 -0.246
      +## 2 2.4586 49 0.6122 70.69 1.239337  0.082
      +## 3 0.5558 31 0.5484 34.27 1.661074 -0.397
      +## 4 2.6448 52 0.5000 70.11 1.165718 -0.529
      +## 5 2.1081 53 0.1509 40.67 1.820166 -4.554
      +## 6 0.8378 31 0.5806 44.85 1.554783 -0.038

      The table below provides the interpretation of the output:

      @@ -517,7 +556,7 @@

      Calculate \(D\)-sc

      - + @@ -525,8 +564,7 @@

      Calculate \(D\)-sc

      - + @@ -534,8 +572,7 @@

      Calculate \(D\)-sc

      - +
      nNumber of items used to calculate the \(D\)-scoreNumber of items used to calculate the D-score
      p
      d -\(D\)-score (posterior mean)D-score (posterior mean)
      sem
      daz -\(D\)-score corrected for ageD-score corrected for age
      @@ -543,30 +580,35 @@

      Calculate \(D\)-sc rows of lf. We save the result for later processing.

       lf2 <- data.frame(lf, results)
      -

      It is possible to calculate \(D\)-score for item subsets by setting the +

      It is possible to calculate D-score for item subsets by setting the items argument. We do not advertise this option for -practical application, but suppose we are interested in the \(D\)-score based on items from -gs1 and gl1 for domains mo or -gm (motor) only. The “motor” \(D\)-score can be calculated as follows:

      +practical application, but suppose we are interested in the D-score +based on items from gs1 and gl1 for domains +mo or gm (motor) only. The “motor” D-score can +be calculated as follows:

      -items_motor <- get_itemnames(instrument = c("gs1", "gl1"), domain = c("mo", "gm"))
      +items_motor <- get_itemnames(
      +  instrument = c("gs1", "gl1"),
      +  domain = c("mo", "gm")
      +)
       results <- dscore(lf, items = items_motor, xname = "agedays", xunit = "days")
       head(results)
      -
      ##        a  n      p     d       sem    daz
      -## 1 2.2204 12 0.5833 65.22 2.3250596 -0.419
      -## 2 2.4586 18 0.6111 71.28 0.9180576  0.692
      -## 3 0.5558 19 0.6842 35.82 1.0002527  0.325
      -## 4 2.6448 12 0.4167 65.91 2.1927512 -1.248
      -## 5 2.1081 12 0.5000 56.44 1.6829924 -2.217
      -## 6 0.8378 14 0.7143 43.10 1.4168986 -0.187
      +
      ##        a  n      p     d      sem    daz
      +## 1 2.2204 12 0.5833 64.88 2.844278 -0.772
      +## 2 2.4586 17 0.6471 70.62 2.244729  0.063
      +## 3 0.5558 19 0.6842 36.27 2.010557  0.213
      +## 4 2.6448 12 0.4167 65.46 2.707788 -1.626
      +## 5 2.1081 12 0.5000 60.25 2.784830 -1.589
      +## 6 0.8378 14 0.7143 45.20 2.350039  0.070

    -

    -GSED HF V1 +

    +GSED HF

    -

    The GSED HF V1 instrument contains 55 items and has -instrument code gh1.

    +

    The GSED Houshold Form (GSED HF) instrument contains a +subset of 48 items from the GSED SF designed to be used for population +surveys. It has instrument code gh1.

    Check

    @@ -575,70 +617,78 @@

    Check instrument <- "gh1" items <- get_itemnames(instrument = instrument, order = "indm") length(items)

    -
    ## [1] 55
    +
    ## [1] 48
     head(items)
    -
    ## [1] "gh1sec001" "gh1sec002" "gh1lgc003" "gh1cgc004" "gh1moc005" "gh1sec006"
    +
    ## [1] "gh1lgc001" "gh1sec002" "gh1lgc003" "gh1sec004" "gh1moc005" "gh1lgc006"

    The order argument is needed to sort items according to -sequence number 1 to 55. Check that you have the correct version by +sequence number 1 to 48. Check that you have the correct version by comparing the labels of the first few items as:

     labels <- get_labels(items)
     head(cbind(items, substr(labels, 1, 50)))
    ##           items                                                           
    -## gh1sec001 "gh1sec001" "Does your child smile?"                            
    -## gh1sec002 "gh1sec002" "Does your child look at your face when you speak t"
    -## gh1lgc003 "gh1lgc003" "Does your child cry when he/she is hungry, wet, ti"
    -## gh1cgc004 "gh1cgc004" "Does your child look at and focus on objects in fr"
    -## gh1moc005 "gh1moc005" "Does your child bring his/her hand to his/her mout"
    -## gh1sec006 "gh1sec006" "Does your child smile when you smile or talk with "
    +## gh1lgc001 "gh1lgc001" "HF001 When you talk to your child, does he/she smi" +## gh1sec002 "gh1sec002" "HF002 When you are about to pick up your child, do" +## gh1lgc003 "gh1lgc003" "HF003 Does your child turn his/her head towards yo" +## gh1sec004 "gh1sec004" "HF004 Does your child sometimes suck his/her thumb" +## gh1moc005 "gh1moc005" "HF005 While your child is on his/her back, can he/" +## gh1lgc006 "gh1lgc006" "HF006 Does your child make noise or gesture to get"

    Renaming example

    Suppose that you stored your data with items names hf001 -to hf055. For example,

    +to hf048. For example,

     hf <- dscore::sample_hf
     head(hf[, c(1:2, 30:35)])
    ##   subjid agedays hf028 hf029 hf030 hf031 hf032 hf033
     ## 1      1     811    NA    NA    NA    NA    NA    NA
     ## 2      2     898    NA    NA    NA    NA    NA    NA
    -## 3      3     203     1     1     0     1     0     0
    +## 3      3     203     0    NA     0    NA     0     0
     ## 4      4     966    NA    NA    NA    NA    NA    NA
     ## 5      8     770    NA    NA    NA    NA    NA    NA
    -## 6      9     306     1     1     1     1     1     1
    +## 6 9 306 0 0 0 NA 0 0

    Make sure that the items are in the correct order. Rename the columns with gsed 9-position item names.

    -colnames(hf)[3:57] <- items
    +colnames(hf)[3:50] <- items
     head(hf[, c(1:2, 30:35)])
    -
    ##   subjid agedays gh1cgc028 gh1moc029 gh1lic030 gh1moc031 gh1moc032 gh1moc033
    +
    ##   subjid agedays gh1moc028 gh1lgc029 gh1moc030 gh1sec031 gh1moc032 gh1moc033
     ## 1      1     811        NA        NA        NA        NA        NA        NA
     ## 2      2     898        NA        NA        NA        NA        NA        NA
    -## 3      3     203         1         1         0         1         0         0
    +## 3      3     203         0        NA         0        NA         0         0
     ## 4      4     966        NA        NA        NA        NA        NA        NA
     ## 5      8     770        NA        NA        NA        NA        NA        NA
    -## 6      9     306         1         1         1         1         1         1
    +## 6 9 306 0 0 0 NA 0 0

    The data in hf are now ready for the dscore() function.

    -

    Calculate \(D\)-score +

    Calculate D-score

    -

    Once the data are in proper shape, calculation of the \(D\)-score is straightforward. The -hf dataset has properly named columns that identify each -item.

    +

    Once the data are in proper shape, calculation of the D-score is +straightforward. The hf dataset has properly named columns +that identify each item.

    -results <- dscore(hf, xname = "agedays", xunit = "days")
    -head(results)
    +results <- dscore(hf, xname = "agedays", xunit = "days", verbose = TRUE)
    +
    ## key:         gsed2510 
    +## population:  preliminary_standards 
    +## transform:   55.72413 3.603965 
    +## qp range:    -10 125 
    +## algorithm:   current 
    +## key:         gsed2510 
    +## population:  preliminary_standards
    +
    +head(results)
    ##        a  n      p     d      sem    daz
    -## 1 2.2204  8 0.7500 63.70 1.319931 -0.830
    -## 2 2.4586  8 1.0000 71.32 3.643986  0.704
    -## 3 0.5558 29 0.6207 37.32 1.208338  0.756
    -## 4 2.6448  3 1.0000 72.14 3.887905  0.503
    -## 5 2.1081  7 1.0000 68.94 3.345038  0.994
    -## 6 0.8378 30 0.7000 42.08 1.205053 -0.463
    +## 1 2.2204 8 0.7500 66.80 2.867389 -0.275 +## 2 2.4586 8 1.0000 73.81 3.837050 0.934 +## 3 0.5558 27 0.5926 37.46 2.139379 0.583 +## 4 2.6448 3 1.0000 74.35 4.116044 0.591 +## 5 2.1081 7 1.0000 71.00 3.706083 1.227 +## 6 0.8378 28 0.6429 41.51 2.081210 -1.032

    The table below provides the interpretation of the output:

    @@ -652,7 +702,7 @@

    Calculate \(D\)-sc

    - + @@ -660,8 +710,7 @@

    Calculate \(D\)-sc

    - + @@ -669,381 +718,319 @@

    Calculate \(D\)-sc

    - +
    nNumber of items used to calculate the \(D\)-scoreNumber of items used to calculate the D-score
    p
    d -\(D\)-score (posterior mean)D-score (posterior mean)
    sem
    daz -\(D\)-score corrected for ageD-score corrected for age

    The number of rows of results is equal to the number of rows of hf. We save the result for later processing.

    -
    +
     hf2 <- data.frame(hf, results)
    -

    It is possible to calculate \(D\)-score for item subsets by setting the +

    It is possible to calculate D-score for item subsets by setting the items argument. We do not advertise this option for -practical application, but suppose we are interested in the \(D\)-score based on items from -gs1, gl1 and gh1 for domains -mo or gm (motor) only. The “motor” \(D\)-score can be calculated as follows:

    -
    -items_motor <- get_itemnames(instrument = c("gs1", "gl1", "gh1"), domain = c("mo", "gm"))
    -results <- dscore(hf, items = items_motor, xname = "agedays", xunit = "days")
    -head(results)
    -
    ##        a  n      p     d      sem    daz
    -## 1 2.2204  1 1.0000 69.17 3.681033  0.721
    -## 2 2.4586  1 1.0000 70.45 4.016257  0.445
    -## 3 0.5558 18 0.5000 36.96 1.459643  0.652
    -## 4 2.6448  1 1.0000 71.44 4.233367  0.293
    -## 5 2.1081  1 1.0000 68.57 3.506822  0.885
    -## 6 0.8378 18 0.6111 41.60 1.491812 -0.590
    -
    -
    -
    -

    -GSED SF V0 -

    -

    The GSED SF V0 instrument contains 139 items and has -instrument code gpa.

    -
    -

    Check -

    -

    Obtain the full list of item name for as

    +practical application, but suppose we are interested in the D-score +based on items from gs1, gl1 and +gh1 for domains mo or gm (motor) +only. The “motor” D-score can be calculated as follows:

    -instrument <- "gpa"
    -items <- get_itemnames(instrument = instrument, order = "indm")
    -length(items)
    -
    ## [1] 139
    -
    -head(items)
    -
    ## [1] "gpalac001" "gpacgc002" "gpafmc003" "gpasec004" "gpamoc005" "gpamoc006"
    -

    The order argument is needed to sort items according to -sequence number 1 to 139. Check that you have the correct version by -comparing the labels of the first few items as:

    -
    -labels <- get_labels(items)
    -head(cbind(items, substr(labels, 1, 50)))
    -
    ##           items                                                           
    -## gpalac001 "gpalac001" "Does your child cry when he/she is hungry, wet, ti"
    -## gpacgc002 "gpacgc002" "Does your child look at and focus on objects in fr"
    -## gpafmc003 "gpafmc003" "Does your child grasp your finger if you touch her"
    -## gpasec004 "gpasec004" "Does your child smile?"                            
    -## gpamoc005 "gpamoc005" "Does your child try to move his/her head (or eyes)"
    -## gpamoc006 "gpamoc006" "When lying on his/her back, does your child move h"
    -
    -
    -

    Renaming example -

    -

    Suppose that you stored your data with items names sf001 -to sf139. For example,

    -
    -sf <- dscore::sample_sf
    -head(sf[, c(1:2, 101:105)])
    -
    ##   subjid agedays sf099 sf100 sf101 sf102 sf103
    -## 1      1     811     1     1     1     1     1
    -## 2      2     898     1     1     1     1     1
    -## 3      3     203    NA    NA    NA    NA    NA
    -## 4      4     966    NA    NA    NA     1    NA
    -## 5      8     770     1     1     1     0     1
    -## 6      9     306    NA    NA    NA    NA    NA
    -

    Make sure that the items are in the correct order. Rename the columns -with gsed 9-position item names.

    -
    -colnames(sf)[3:141] <- items
    -head(sf[, c(1:2, 101:105)])
    -
    ##   subjid agedays gpalgc099 gpaclc100 gpaclc101 gpalgc102 gpamoc103
    -## 1      1     811         1         1         1         1         1
    -## 2      2     898         1         1         1         1         1
    -## 3      3     203        NA        NA        NA        NA        NA
    -## 4      4     966        NA        NA        NA         1        NA
    -## 5      8     770         1         1         1         0         1
    -## 6      9     306        NA        NA        NA        NA        NA
    -

    The data in sf are now ready for the -dscore() function.

    -
    -
    -

    Calculate \(D\)-score -

    -

    Once the data are in proper shape, calculation of the \(D\)-score is straightforward. The -sf dataset has properly named columns that identify each -item.

    -
    -results <- dscore(sf, xname = "agedays", xunit = "days")
    -head(results)
    -
    ##        a  n      p     d       sem    daz
    -## 1 2.2204 29 0.7586 65.23 0.7338041 -0.416
    -## 2 2.4586 39 0.6923 68.34 0.7349870 -0.173
    -## 3 0.5558 50 0.6600 38.36 0.9434576  1.055
    -## 4 2.6448 36 0.7500 73.44 0.6608226  0.895
    -## 5 2.1081 50 0.5000 65.50 0.6157819 -0.009
    -## 6 0.8378 50 0.7000 41.56 1.0080820 -0.600
    -

    The table below provides the interpretation of the output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameInterpretation
    aDecimal age in years
    nNumber of items used to calculate the \(D\)-score
    pProportion of passed milestones
    d -\(D\)-score (posterior mean)
    semStandard error of measurement (posterior standard deviation)
    daz -\(D\)-score corrected for age
    -

    The number of rows of result is equal to the number of -rows of sf. We save the result for later processing.

    -
    -sf3 <- data.frame(sf, results)
    -

    It is possible to calculate \(D\)-score for item subsets by setting the -items argument. We do not advertise this option for -practical application, but suppose we are interested in the \(D\)-score based on items from -gpa and gto for domains mo or -gm (motor) only. The “motor” \(D\)-score can be calculated as follows:

    -
    -items_motor <- get_itemnames(instrument = c("gpa", "gto"), domain = c("mo", "gm"))
    -results <- dscore(sf, items = items_motor, xname = "agedays", xunit = "days")
    +items_motor <- get_itemnames(
    +  instrument = c("gs1", "gl1", "gh1"),
    +  domain = c("mo", "gm")
    +)
    +results <- dscore(
    +  hf,
    +  items = items_motor,
    +  xname = "agedays",
    +  xunit = "days",
    +)
     head(results)
    ##        a  n      p     d      sem    daz
    -## 1 2.2204  5 1.0000 71.56 3.032380  1.422
    -## 2 2.4586  5 1.0000 72.44 3.333409  1.038
    -## 3 0.5558 33 0.5758 38.36 1.013070  1.055
    -## 4 2.6448  6 0.6667 74.29 1.553734  1.151
    -## 5 2.1081  8 0.7500 73.86 1.608503  2.383
    -## 6 0.8378 32 0.6250 41.03 1.195306 -0.738
    +## 1 2.2204 1 1.0000 69.67 4.442820 0.502 +## 2 2.4586 1 1.0000 71.51 4.543754 0.303 +## 3 0.5558 18 0.5000 36.88 2.414803 0.402 +## 4 2.6448 1 1.0000 72.83 4.615730 0.181 +## 5 2.1081 1 1.0000 68.73 4.395200 0.594 +## 6 0.8378 18 0.5556 40.84 2.399928 -1.221
    -

    -GSED LF V0 +

    Other GSED instruments

    -

    The GSED LF V0 instrument contains 155 items and has -instrument code gto.

    -
    -

    Check -

    -

    Obtain the full list of item name for as

    -
    -instrument <- "gto"
    -items <- get_itemnames(instrument = instrument)
    -length(items)
    -
    ## [1] 155
    -
    -head(items)
    -
    ## [1] "gtofmd001" "gtofmd002" "gtofmd003" "gtofmd004" "gtofmd005" "gtofmd006"
    -

    Reorder item names so that they corresponds to streams A, B and C, -respectively.

    -
    -items <- items[c(55:155, 1:54)]
    -head(items)
    -
    ## [1] "gtogmd001" "gtogmd002" "gtogmd003" "gtogmd004" "gtogmd005" "gtogmd006"
    -

    Check that you have the correct version by comparing the labels of -the first few items as:

    -
    -labels <- get_labels(items)
    -head(cbind(items, substr(labels, 1, 50)))
    -
    ##           items                                                          
    -## gtogmd001 "gtogmd001" "A1. Lifts head in prone 45 degrees"               
    -## gtogmd002 "gtogmd002" "A2. Frolics alone - moving body, kicking legs"    
    -## gtogmd003 "gtogmd003" "A3. Frolics with mother or caregiver responsively"
    -## gtogmd004 "gtogmd004" "A4. Hands together in front of face"              
    -## gtogmd005 "gtogmd005" "A5. Balances head well while suppported"          
    -## gtogmd006 "gtogmd006" "A6. Pulls to sit - no head lag"
    -
    -
    -

    Renaming example -

    -

    Suppose that you stored your data with items names lf001 -to lf155. For example,

    -
    -lf <- dscore::sample_lf
    -head(lf[, c(1:2, 60:64)])
    -
    ##   subjid agedays lf058 lf059 lf060 lf061 lf062
    -## 1      1     811    NA    NA    NA    NA    NA
    -## 2      2     898    NA    NA    NA    NA    NA
    -## 3      3     203     0     0     0    NA    NA
    -## 4      4     966    NA    NA    NA    NA    NA
    -## 5      8     770     0     0     0     0     0
    -## 6      9     306     1     1     0     1     0
    -

    Make sure that the items are in the correct order. Rename the columns -with gsed 9-position item names.

    -
    -colnames(lf)[3:157] <- items
    -head(lf[, c(1:2, 60:64)])
    -
    ##   subjid agedays gtolgd009 gtolgd010 gtolgd011 gtolgd012 gtolgd013
    -## 1      1     811        NA        NA        NA        NA        NA
    -## 2      2     898        NA        NA        NA        NA        NA
    -## 3      3     203         0         0         0        NA        NA
    -## 4      4     966        NA        NA        NA        NA        NA
    -## 5      8     770         0         0         0         0         0
    -## 6      9     306         1         1         0         1         0
    -

    The data in lf are now ready for the -dscore() function.

    -
    -
    -

    Calculate \(D\)-score -

    -

    Once the data are in proper shape, calculation of the \(D\)-score is straightforward. The -lf dataset has properly named columns that identify each -item.

    -
    -results <- dscore(lf, xname = "agedays", xunit = "days")
    -head(results)
    -
    ##        a  n      p     d       sem    daz
    -## 1 2.2204 45 0.5556 67.05 0.6298725  0.100
    -## 2 2.4586 53 0.6226 70.81 0.5687583  0.552
    -## 3 0.5558 34 0.5588 34.12 0.8401395 -0.153
    -## 4 2.6448 54 0.5185 70.82 0.5355771  0.109
    -## 5 2.1081 58 0.1724 37.47 1.1938151 -4.448
    -## 6 0.8378 32 0.5625 44.90 0.7644616  0.315
    -

    The table below provides the interpretation of the output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameInterpretation
    aDecimal age in years
    nNumber of items used to calculate the \(D\)-score
    pProportion of passed milestones
    d -\(D\)-score (posterior mean)
    semStandard error of measurement (posterior standard deviation)
    daz -\(D\)-score corrected for age
    -

    The number of rows of result is equal to the number of -rows of lf. We save the result for later processing.

    -
    -lf3 <- data.frame(lf, results)
    -

    It is possible to calculate \(D\)-score for item subsets by setting the -items argument. We do not advertise this option for -practical application, but suppose we are interested in the \(D\)-score based on items from -gpa and gto for domains mo or -gm (motor) only. The “motor” \(D\)-score can be calculated as follows:

    -
    -items_motor <- get_itemnames(instrument = c("gpa", "gto"), domain = c("mo", "gm"))
    -results <- dscore(lf, items = items_motor, xname = "agedays", xunit = "days")
    -head(results)
    -
    ##        a  n      p     d       sem    daz
    -## 1 2.2204 12 0.5833 65.21 2.3290743 -0.422
    -## 2 2.4586 18 0.6111 71.28 0.9180576  0.692
    -## 3 0.5558 19 0.6842 35.72 0.9818575  0.297
    -## 4 2.6448 12 0.4167 65.84 2.1798200 -1.266
    -## 5 2.1081 12 0.5000 56.44 1.6829750 -2.217
    -## 6 0.8378 14 0.7143 43.12 1.4337713 -0.182
    -
    +

    The gpa (SF) and gto (LF) instrument codes +are included only for backward compatibility. These instruments have a +different item order. They were replaced in 2023 by the +GSED SF (gs1) and GSED LF +(gl1). The scoring procedure is identical to the one +described above for the new instruments.

    +
    +
    +

    References for DAZ calculation +

    -

    Phase 1 references and DAZ +

    +preliminary_standards references

    -

    We used the GSED Phase I data to calculate age-conditional reference -scores for the \(D\)-score. The -references are based on about 12,000 administration of the GSED SF and -GSED LF from Bangladesh, Pakistan and Tanzania. Extract the references -as

    -
    +

    By default, DAZ values are calculated using the preliminary +standards. These standards were derived from a healthy subsample of +approximately 12,000 administrations of the GSED SF and GSED LF +collected in Bangladesh, Pakistan, and Tanzania (the GSED Phase 1 +countries), using the key “gsed2406”. You can extract these reference +values with:

    +
     library(dplyr, warn.conflicts = FALSE, quietly = TRUE)
    -ref <- builtin_references %>% 
    -  filter(pop == "phase1") %>% 
    -  select(pop, age, mu, sigma, nu, tau, SDM2, SD0, SDP2)
    +ref <- builtin_references |>
    +  filter(population == "preliminary_standards") |>
    +  select(population, age, mu, sigma, nu, tau, SDM2, SD0, SDP2) |>
    +  mutate(m = age * 12)
    +
    +head(ref, 3)
    +
    ##              population    age    mu  sigma    nu    tau     SDM2      SD0
    +## 1 preliminary_standards 0.0000 11.46 0.2075 1.420 34.189 5.941355 11.46264
    +## 2 preliminary_standards 0.0383 13.18 0.2075 1.420 34.189 6.833076 13.18304
    +## 3 preliminary_standards 0.0575 14.04 0.2001 1.426 34.121 7.529790 14.04231
    +##       SDP2      m
    +## 1 16.03876 0.0000
    +## 2 18.44597 0.4596
    +## 3 19.45665 0.6900
    +

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

    +

    The references are currently also available for the updated key +"gsed2510", which is the recommended key for GSED +instruments.
    +A future release of the package will replace the current +preliminary_standards for "gsed2510" with a +newly calculated version based on data from all seven GSED +countries.

    +

    You do not need to manually specify the references when calculating +DAZ with the dscore() function. The function automatically +uses the preliminary_standards references. For example, you +can calculate the D-score and DAZ as follows:

    +
    +vars <- c("id", "agedays", get_itemnames(instrument = "gs1", order = "indm"))
    +data <- triple[, colnames(triple) %in% vars]
    +ds1 <- dscore(data, xname = "agedays", xunit = "days")
    +head(ds1)
    +
    ##        a  n      p     d      sem    daz
    +## 1 1.9493 65 0.6769 68.95 1.210561  1.186
    +## 2 2.5325 34 0.7059 73.23 1.458141  0.572
    +## 3 2.3874 36 0.5833 65.89 1.404537 -0.966
    +## 4 0.8980  8 0.5000 38.64 2.527097 -2.228
    +## 5 2.1903 31 0.2258 57.84 1.605532 -2.289
    +## 6 0.8980 80 0.7625 54.78 1.325298  2.517
    +

    Add the argument dscore(..., verbose = TRUE) to see +which references are used.

    +

    Here are the growth charts for D-score and +DAZ, based on the preliminary_standards +references.

    +
    +library(ggplot2)
    +library(patchwork)
    +
    +r <- builtin_references |>
    +  filter(population == "preliminary_standards" & age <= 3.5) |>
    +  mutate(m = age * 12)
    +
    +ds1$m <- ds1$a * 12
    +g1 <- ggplot(ds1, aes(x = m, y = d)) +
    +  theme_light() +
    +  annotate(
    +    "polygon",
    +    x = c(r$age, rev(r$age)),
    +    y = c(r$SDM2, rev(r$SDP2)),
    +    alpha = 0.06,
    +    fill = "#C5EDDE"
    +  ) +
    +  annotate("line", x = r$m, y = r$SDM2, lwd = 0.5, color = "grey80") +
    +  annotate("line", x = r$m, y = r$SDP2, lwd = 0.5, color = "grey80") +
    +  annotate("line", x = r$m, y = r$SD0, lwd = 1, color = "grey80") +
    +  scale_x_continuous(
    +    "Age (in months)",
    +    limits = c(0, 42),
    +    breaks = seq(0, 42, 12)
    +  ) +
    +  scale_y_continuous(
    +    expression(paste("D-score", sep = "")),
    +    breaks = seq(0, 80, 20),
    +    limits = c(0, 90)
    +  ) +
    +  geom_point(size = 2) +
    +  theme(legend.position = "none")
    +g2 <- ggplot(ds1, aes(x = m, y = daz)) +
    +  theme_light() +
    +  geom_hline(yintercept = 2, linewidth = 0.5, color = "grey80") +
    +  geom_hline(yintercept = -2, linewidth = 0.5, color = "grey80") +
    +  geom_hline(yintercept = 0, linewidth = 1.0, color = "grey80") +
    +  scale_x_continuous(
    +    "Age (in months)",
    +    limits = c(0, 42),
    +    breaks = seq(0, 42, 12)
    +  ) +
    +  scale_y_continuous(
    +    "DAZ",
    +    breaks = seq(-4, 4, 2),
    +    limits = c(-4, 4)
    +  ) +
    +  geom_point(size = 2) +
    +  theme(legend.position = "none")
    +g1 + g2
    +

    +
    +
    +

    +who_descriptive references +

    +

    The who_descriptive references are based on data from +all children across all seven GSED countries. These references reflect +the observed data and should not be interpreted as standards. They are +intended for descriptive analyses of developmental status or for +methodological studies.

    +

    The who_descriptive references replace the earlier +"phase1" references, which were derived from GSED Phase I +data (three countries).

    +

    You can access these references by specifying +population = "who_descriptive" in the dscore() +function. To extract the references, use:

    +
    +ref <- builtin_references |>
    +  filter(population == "who_descriptive") |>
    +  select(population, age, mu, sigma, nu, tau, SDM2, SD0, SDP2)
     head(ref)
    -
    ##      pop    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 who_descriptive 0.0000 11.61 0.2620 0.9079 21.068 5.354991 11.61077 18.22228
    +## 2 who_descriptive 0.0192 12.40 0.2519 0.9310 21.106 5.919198 12.40068 19.14714
    +## 3 who_descriptive 0.0383 13.20 0.2422 0.9541 21.144 6.511667 13.20059 20.06532
    +## 4 who_descriptive 0.0575 14.00 0.2329 0.9772 21.182 7.126490 14.00051 20.96359
    +## 5 who_descriptive 0.0767 14.80 0.2239 1.0008 21.220 7.764326 14.80044 21.84040
    +## 6 who_descriptive 0.0958 15.60 0.2153 1.0253 21.257 8.420108 15.60038 22.70040

    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 -plus 20 \(D\)-scores (10 LF and 10 SF) -for the lf2 and sf2 data.

    -
    +tau are the age-varying parameters of a Box-Cox
    +tt
    +(BCT) distribution.

    +
    +ds2 <- dscore(
    +  data,
    +  xname = "agedays",
    +  xunit = "days",
    +  population = "who_descriptive"
    +)
    +head(ds2)
    +
    ##        a  n      p     d      sem    daz
    +## 1 1.9493 65 0.6769 68.95 1.210561  1.030
    +## 2 2.5325 34 0.7059 73.23 1.458141  0.559
    +## 3 2.3874 36 0.5833 65.89 1.404537 -1.027
    +## 4 0.8980  8 0.5000 38.64 2.527097 -2.018
    +## 5 2.1903 31 0.2258 57.84 1.605532 -2.435
    +## 6 0.8980 80 0.7625 54.78 1.325298  2.578
    +

    Here are the growth charts for D-score and +DAZ, based on the who_descriptive +references.

    +
     library(ggplot2)
     library(patchwork)
     
    -r <- builtin_references %>% 
    -  filter(pop == "phase1" & age <= 3.5) %>% 
    +r <- builtin_references |>
    +  filter(population == "who_descriptive" & age <= 3.5) |>
       mutate(m = age * 12)
     
    -lf2$ins <- "lf"; lf2$m <- lf2$a * 12
    -sf2$ins <- "sf"; sf2$m <- sf2$a * 12
    -data <- bind_rows(lf2, sf2)
    -g1 <- ggplot(data, aes(x = m, y = d, group = ins, color = ins)) + 
    +ds2$m <- ds2$a * 12
    +g1 <- ggplot(ds2, aes(x = m, y = d)) +
       theme_light() +
    -  annotate("polygon", x = c(r$age, rev(r$age)),
    -           y = c(r$SDM2, rev(r$SDP2)), alpha = 0.06, fill = "#C5EDDE") +
    -  annotate("line", x = r$m, y = r$SDM2, lwd = 0.5, color = "#C5EDDE") +
    -  annotate("line", x = r$m, y = r$SDP2, lwd = 0.5, color = "#C5EDDE") +
    -  annotate("line", x = r$m, y = r$SD0, lwd = 1, color = "#C5EDDE") +
    -  scale_x_continuous("Age (in months)",
    -                     limits = c(0, 42),
    -                     breaks = seq(0, 42, 12)) +
    +  annotate(
    +    "polygon",
    +    x = c(r$age, rev(r$age)),
    +    y = c(r$SDM2, rev(r$SDP2)),
    +    alpha = 0.06,
    +    fill = "#C5EDDE"
    +  ) +
    +  annotate("line", x = r$m, y = r$SDM2, lwd = 0.5, color = "grey80") +
    +  annotate("line", x = r$m, y = r$SDP2, lwd = 0.5, color = "grey80") +
    +  annotate("line", x = r$m, y = r$SD0, lwd = 1, color = "grey80") +
    +  scale_x_continuous(
    +    "Age (in months)",
    +    limits = c(0, 42),
    +    breaks = seq(0, 42, 12)
    +  ) +
       scale_y_continuous(
    -    expression(paste(italic(D), "-score", sep = "")),
    +    expression(paste("D-score", sep = "")),
         breaks = seq(0, 80, 20),
    -    limits = c(0, 90)) +
    +    limits = c(0, 90)
    +  ) +
       geom_point(size = 2) +
       theme(legend.position = "none")
    -g2 <- ggplot(data, aes(x = m, y = daz, group = ins, color = ins)) + 
    +g2 <- ggplot(ds2, aes(x = m, y = daz)) +
       theme_light() +
    -  scale_x_continuous("Age (in months)",
    -                     limits = c(0, 42),
    -                     breaks = seq(0, 42, 12)) +
    +  geom_hline(yintercept = 2, linewidth = 0.5, color = "grey80") +
    +  geom_hline(yintercept = -2, linewidth = 0.5, color = "grey80") +
    +  geom_hline(yintercept = 0, linewidth = 1.0, color = "grey80") +
    +  scale_x_continuous(
    +    "Age (in months)",
    +    limits = c(0, 42),
    +    breaks = seq(0, 42, 12)
    +  ) +
       scale_y_continuous(
         "DAZ",
         breaks = seq(-4, 4, 2),
    -    limits = c(-5, 5)) +
    +    limits = c(-4, 4)
    +  ) +
       geom_point(size = 2) +
       theme(legend.position = "none")
     g1 + g2
    -

    +

    +

    In general, descriptive references are expected to yield higher DAZ +values than standards. This is because descriptive references are based +on all children, including those with developmental delays, whereas +standards are based on a healthy subsample.

    +

    At present, the who_descriptive references produce DAZ +values similar to those from the preliminary_standards +references, but with a noticeably different age pattern. The main reason +is that who_descriptive is based on key +gsed2510, while preliminary_standards still +rely on the older key gsed2406. This age pattern is +expected to disappear once the new standards based on key +gsed2510 become available.

    +
    +f1 <- ggplot(data = NULL, aes(x = ds1$daz, y = ds2$daz)) +
    +  theme_light() +
    +  geom_abline(intercept = 0, slope = 1, colour = "grey80", linewidth = 1) +
    +  geom_point(shape = 19) +
    +  scale_y_continuous(
    +    "DAZ (who_descriptive)",
    +    breaks = seq(-4, 4, 2),
    +    limits = c(-4, 4)
    +  ) +
    +  scale_x_continuous(
    +    "DAZ (preliminary_standards)",
    +    breaks = seq(-4, 4, 2),
    +    limits = c(-4, 4)
    +  )
    +
    +f2 <- ggplot(data = NULL, aes(x = ds1$a * 12, y = ds1$daz - ds2$daz)) +
    +  theme_light() +
    +  geom_point(shape = 19) +
    +  geom_hline(yintercept = 0, colour = "grey80", linewidth = 1) +
    +  scale_x_continuous(
    +    "Age (in months)",
    +    limits = c(0, 42),
    +    breaks = seq(0, 42, 12)
    +  ) +
    +  scale_y_continuous(
    +    "DAZ (who_descriptive) – DAZ (preliminary_standards)",
    +    breaks = seq(-0.4, 0.4, 0.1),
    +    limits = c(-0.4, 0.4)
    +  )
    +
    +f1 + f2
    +

    +
    @@ -1069,21 +1058,21 @@

    References

    -

    Developed by Stef van Buuren, Iris Eekhout, Arjan Huizing.

    +

    Developed by Stef van Buuren, Iris Eekhout, Arjan Huizing, Jonathan Seiden.

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-27-1.png b/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-27-1.png new file mode 100644 index 00000000..cadb9599 Binary files /dev/null and b/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-27-1.png differ diff --git a/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-28-1.png b/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-28-1.png new file mode 100644 index 00000000..bf47d199 Binary files /dev/null and b/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-28-1.png differ diff --git a/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-29-1.png b/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-29-1.png new file mode 100644 index 00000000..58078fa2 Binary files /dev/null and b/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-29-1.png differ diff --git a/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-31-1.png b/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-31-1.png new file mode 100644 index 00000000..8a67d35d Binary files /dev/null and b/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-31-1.png differ diff --git a/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-32-1.png b/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-32-1.png new file mode 100644 index 00000000..3365a562 Binary files /dev/null and b/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-32-1.png differ diff --git a/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-42-1.png b/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-42-1.png deleted file mode 100644 index 42cef1ea..00000000 Binary files a/docs/articles/scoring_GSED_files/figure-html/unnamed-chunk-42-1.png and /dev/null differ diff --git a/docs/articles/using_DAZ.html b/docs/articles/using_DAZ.html new file mode 100644 index 00000000..7d94d4d2 --- /dev/null +++ b/docs/articles/using_DAZ.html @@ -0,0 +1,332 @@ + + + + + + + +Understanding and using DAZ • dscore + + + + + + + + + + + +
    +
    + + + + +
    +
    + + + + +
    +

    What is DAZ? +

    +

    Development-for-Age Z-scores, more commonly known as DAZ scores, are +a way to control for the “age effect” when analyzing D-scores. Children +develop naturally over time and so comparisons on the D-score scale are +difficult when there is variation in age. Older children will almost +always have higher D-scores than younger children. This can create +analytical difficulties when attempting to understand changes over time +or compare groups of children that contain multiple ages.

    +

    DAZ is the conceptually very similar to anthropometric outcomes such +as Height-for-Age Z-scores (HAZ) and Weight-for-Age Z-scores (WAZ), and +Weight-for-Height Z-scores (WHZ) which are commonly used in public +health research (https://www.who.int/tools/child-growth-standards).

    +
    +
    +

    How is DAZ calculated? +

    +

    DAZ is estimated after calculating the D-scores for each +child. The D-scores per child are compared to a reference +sample. The DAZ is reported in standard deviation units and +represents how close the scored child’s D-score is to the D-scores of +same-aged children in the reference sample. DAZ scores +are reported in standard Z-score units, with a mean of 0 and a standard +deviation of 1. This means that:

    +
      +
    • If the D-score of the scored child is higher than those in +the reference, then the DAZ will be positive.
    • +
    • If the D-score is lower than same-aged children in the +reference sample, then the DAZ will be negative +
    • +
    • If the D-score of the child is the same as the average of +the reference sample, then the DAZ will be 0.
    • +
    +
    +
    +

    Who is in the reference population used in the D-score package? +

    +

    Before version 1.9.0, DAZ scores were calculated using the entire +Phase I validation sample of GSED data, consisting of 4,374 children +from Bangladesh, Pakistan, and Tanzania. This data included children +that were both very advantaged and those with significant constraints on +their development. In dscore 1.9.0, the reference group has +been refined to a sub-sample of 2,295 children with minimal +constraints on their early development.

    +

    The default reference group includes children who:

    +
      +
    • were of normal birth weight (above 2500 g)
    • +
    • were born term (between 37 and 42 weeks)
    • +
    • were not undernourished (according to weight-for-age, +height-for-age, or weight-for-height Z-scores)
    • +
    • had no known severe birth defects or chronic health problems
    • +
    • had a mother who had completed at least a secondary level of +education
    • +
    +

    In the future, the DAZ reference group will be updated with a larger +and more representative sample both through the inclusion of additional +countries in validation studies as well as a dedicated Norms & +Standards study (https://bmjopen.bmj.com/content/13/1/e062562).

    +
    +
    +

    Can I use a benchmark with DAZ to monitor the proportion of children +that are developmentally on track? +

    +

    Many anthropometric measures use a -2 SD benchmark to describe the +percentage of children with low height for age (stunting) weight for age +(underweight) or weight for height (wasting). DAZ scores can be +used with a benchmark for monitoring purposes, but this should be done +with extreme caution. This is because, unlike HAZ, WAZ, and WHZ, DAZ +scores are calculated using a relatively small and globally +unrepresentative reference sample.

    +

    Further guidance and a more concrete benchmark will be analyzed after +the completion of an ongoing Norms & Standards study. For now, if a +benchmark for use is required to determine the proportion of children +that are developmentally on track, we recommend using a +transitional benchmark -1.5 SD. This is slightly higher +than -2 SD but was determined to give reasonable alignment with +inferences from the ECDI2030 (https://doi.org/10.1016/j.ecresq.2023.11.004).

    +
    +
    +

    Examples of DAZ and interpretation +

    +

    Below we show some illustrative examples of what DAZ can look like in +practice and how to interpret results.

    +
    +# Create a dataset of five 13-month old children scoring 5 GSED items 
    +dm <- matrix(
    +  c(
    +    13, 0, 0, 0, 0, 0,
    +    13, 1, 0, 0, 0, 0,
    +    13, 1, 1, 1, 0, 0,
    +    13, 1, 1, 1, 1, 0,
    +    13, 1, 1, 1, 1, 1
    +  ), 
    +  ncol = 6, byrow = TRUE)
    +colnames(dm) <- c("age", "gs1moc060", "gs1moc061", "gs1lgc062", "gs1sec063", "gs1moc064")
    +
    +# Score the data using dscore function
    +output <- dscore(dm, xunit = "months")
    +
    +# Add centile rankings to the output
    +output$centile <- round(100 * pnorm(output$daz), 1)
    +
    +# View the scored data
    +head(output)
    +#>        a n    p     d      sem    daz centile
    +#> 1 1.0833 4 0.00 41.66 3.206434 -2.578     0.5
    +#> 2 1.0833 4 0.25 44.38 3.092467 -1.936     2.6
    +#> 3 1.0833 4 0.75 50.12 3.473742 -0.348    36.4
    +#> 4 1.0833 4 0.75 50.12 3.473742 -0.348    36.4
    +#> 5 1.0833 4 1.00 53.94 3.968120  0.826    79.6
    +

    In the above example, we can see that for 13-month-old children, +failing each of these 5 milestones will result in a D-score estimate of +41.16. The DAZ for this first child is calculated as -2.688, meaning +that the D-score of the child is -2.688 standard deviations below the +mean of 13-month-old children in the reference group. Converting this to +percentiles, we see that this child would score well below the first +percentile.

    +

    In contrast, the fourth child in the example (who passed 4/5 +milestones) has a DAZ estimate of -0.043. This child is very close (just +below) the average score of 13-month-old children in the reference +group. And the final child in the example, who passed all 5 milestones, +has an estimated DAZ of 0.998, nearly a full standard deviation above +the mean and higher than 84 percent of same-aged children in the +reference group.

    +
    +
    +

    +NA values for DAZ +

    +

    When scoring DAZ, dscore can return NA +values. Let’s take a look at why this happens.

    +

    NA values occur when a child’s age is missing or out of +range. D-scores can be generated even with missing age values, but DAZ +is not possible to be calculated because the calculation of DAZ compares +the child’s D-score with D-scores of same-aged children. We can see this +happen with the below data, where we try to score the same responses +patterns with children aged NA, 12, 18, 48, and -1 months +old.

    +
    +# Create a dataset of five children of different ages with the same scores
    +dm <- matrix(
    +  c(
    +    NA, 1, 1, 1, 1, 1,
    +    12, 1, 1, 1, 1, 1,
    +    18, 1, 1, 1, 1, 1,
    +    48, 1, 1, 1, 1, 1,
    +    -1, 1, 1, 1, 1, 1
    +  ), 
    +  ncol = 6, byrow = TRUE)
    +colnames(dm) <- c("age", "gs1moc060", "gs1moc061", "gs1lgc062", "gs1sec063", "gs1moc064")
    +
    +dscore(dm, xunit = "months")
    +#>         a n p     d      sem   daz
    +#> 1      NA 4 1    NA       NA    NA
    +#> 2  1.0000 4 1 52.83 3.822435 1.102
    +#> 3  1.5000 4 1 59.62 4.570882 0.202
    +#> 4  4.0000 4 1 78.63 4.995824    NA
    +#> 5 -0.0833 4 1 29.65 4.560348    NA
    +

    The children with ages NA, 48, and -0.0833 have DAZ that +are returned as NA. DAZ must be relative to age and the +reference group is for children 0-36 months old. When scoring data, +ensure that ages have been accurately recorded.

    +

    Children aged 12 and 18 months have no problem with the estimation of +the D-scores and DAZ. There are two additional notes:

    +
      +
    • While all children have an identical response pattern, the estimate +of the D-score differs. This is because there is an age prior that is +used in calculating the D-score that assumes children of higher ages +have higher D-scores. With just 5 items responded to, the prior has a +big influence on the estimated D-score.
    • +
    • While the 18-month-old child has a higher D-score estimate than the +12-month old child, that DAZ estimate is lower. This is because DAZ is +calculated relative to the reference group. For the +12-month-old child, 53.41 is about 1.283 SD higher than the mean of +D-scores for 12-month-old children in the reference group. For the +18-month-old child, 59.95 is 0.300 higher than 18-month-old children in +the reference group.
    • +
    +

    While rare, it is also possible that the dscore() +functions returns an NA value for DAZ in extreme cases, +e.g. when a three-month-old child is marked as many advanced age items +correct such as those related to jumping, talking, and reading. We can +illustrate this below:

    +
    +### Get a list of all GSED item names 
    +gsed_names <- get_itemnames(instrument = "gs1")
    +
    +### Create a sample dataframe where all responses are 1
    +df <- as.data.frame(setNames(as.list(rep(1, length(gsed_names))), gsed_names)) 
    +
    +### Add an age (in months) of 3
    +df$age <- 3
    +
    +dscore(df, xunit = "months")
    +#>      a   n p     d      sem daz
    +#> 1 0.25 136 1 76.11 1.525424  NA
    +

    If DAZ is estimated NA, age may not be recorded +properly. Recheck the data of any DAZ estimate that is estimated as +NA.

    +
    +
    + + + +
    + + + +
    + +
    +

    +

    Site built with pkgdown 2.1.3.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/authors.html b/docs/authors.html index 527704ba..a575306c 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -3,7 +3,7 @@ - +
    @@ -28,7 +28,7 @@
  • Changelog @@ -44,14 +53,14 @@
  • - +
    @@ -60,17 +69,21 @@

    Authors and Citation

    - +
    • -

      Stef van Buuren. Maintainer, author. +

      Stef van Buuren. Maintainer, author. +

      +
    • +
    • +

      Iris Eekhout. Author.

    • -

      Iris Eekhout. Author. +

      Arjan Huizing. Author.

    • -

      Arjan Huizing. Author. +

      Jonathan Seiden. Author.

    @@ -82,13 +95,32 @@

    Citation

    -

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

    +

    van Buuren S, Eekhout I, Huizing A, Seiden J (2025). +dscore: D-score for Child Development. +R package version 2.0.0, https://CRAN.R-project.org/package=dscore. +

    @Manual{dscore-package,
    -  title = {D-score for Child Development},
    -  author = {S. {van Buuren} and I. Eekhout and A. Huizing},
    -  year = {2020},
    -  note = {R package version 1.0.0},
    -  url = {https://github.com/d-score/dscore},
    +  title = {dscore: D-score for Child Development},
    +  author = {Stef {van Buuren} and Iris Eekhout and Arjan Huizing and Jonathan Seiden},
    +  year = {2025},
    +  note = {R package version 2.0.0},
    +  url = {https://CRAN.R-project.org/package=dscore},
    +}
    +

    van Buuren S, Eekhout I, McCray G, Lancaster G, Waldman M, McCoy D, Gladstone M, Cavallera V, Dua T, Black M, GSED Team (2025). +“Enhancing comparability in early child development assessment with the D-score.” +International Journal of Behavioral Development, 49(4), 348-364. +doi:10.1177/01650254241294033, https://doi.org/10.1177/01650254241294033. +

    +
    @Article{vanBuuren2025-dscore,
    +  title = {Enhancing comparability in early child development assessment with the D-score},
    +  author = {Stef {van Buuren} and Iris Eekhout and Gareth McCray and Gillian A. Lancaster and Matthew R. Waldman and Dana C. McCoy and Melissa Gladstone and Vanessa Cavallera and Tarun Dua and Maureen M. Black and {GSED Team}},
    +  journal = {International Journal of Behavioral Development},
    +  year = {2025},
    +  volume = {49},
    +  number = {4},
    +  pages = {348-364},
    +  doi = {10.1177/01650254241294033},
    +  url = {https://doi.org/10.1177/01650254241294033},
     }
    @@ -98,19 +130,19 @@

    Citation

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/index.html b/docs/index.html index ac53ee51..00d5cd24 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,14 +12,14 @@ - + - +
    @@ -45,7 +45,7 @@
  • @@ -65,7 +74,7 @@
  • - +
  • @@ -76,7 +85,7 @@
    - +
    @@ -85,12 +94,13 @@
    -

    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
    • -
    • Calculate D-score from item level responses
    • -
    • Transform the D-scores into DAZ, age-standardised Z-scores
    • +
    • Calculate D-score from item level responses
    • +
    • Transform the D-scores into DAZ, age-standardised Z-scores

    The required input consists of item level responses on milestones from widely used instruments for measuring child development.

    @@ -104,11 +114,11 @@

    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. -
    4. Calculate D-score and DAZ;
    5. +
    6. Calculate D-score and DAZ;
    7. Summarise your results.

    The dscore package provides various function that support these steps. See Getting started for more details.

    @@ -120,7 +130,7 @@

    ResourcesBooks and reports

      -
    1. D-score: Turning milestones into measurement
    2. +
    3. D-score: Turning milestones into measurement
    4. Inventory of 147 instruments for measuring early child development: Fernald et al. (2017)
    @@ -131,7 +141,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 +161,13 @@

    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.

    +

    +
    +

    License +

    +

    This package uses a Apache License 2.0.

    -
    -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 +187,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. https://www.who.int/publications/i/item/WHO-MSD-GSED-package-v1.0-2023.1. +
    @@ -194,8 +209,7 @@

    Links

    License

    @@ -210,19 +224,21 @@

    Citation

    Developers

      -
    • Stef van Buuren
      Maintainer, author
    • -
    • Iris Eekhout
      Author
    • -
    • Arjan Huizing
      Author
    • +
    • Stef van Buuren
      Maintainer, author
    • +
    • Iris Eekhout
      Author
    • +
    • Arjan Huizing
      Author
    • +
    • Jonathan Seiden
      Author

    Dev status

      -
    • Lifecycle: maturing
    • +
    • Lifecycle: stable
    • CRAN status
    • -
    • +
    • +
    • License
    @@ -232,21 +248,21 @@

    Dev status

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/news/index.html b/docs/news/index.html index e851e42f..3a657e60 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -3,7 +3,7 @@ - +
    @@ -28,7 +28,7 @@
  • Changelog @@ -44,14 +53,14 @@
  • - +
    @@ -61,42 +70,210 @@

    Changelog

    - -
    • 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 support BSID-III (by3) to key gsed2510 (adds 242 items)
      • +
      • Extends builtin_itembank to include BSID-III (by3) items in key gsed2510 +
      • +
      • Updates builtin_keys to signal new instrument by3 for key gsed2510 +
      • +
      • Updates vignettes to reflect addition of BSID-III (by3) instrument
      • +
      • Update scoring_GSED vignette: switch to html_document, improve formatting, update references section, and clarify DAZ calculation standards
      • +
    +
    + +
    • Adds support for 48-item version of GSED HF (gh1) instrument
    • +
    • Replaces 55 HF items with 48 HF items in builtin_itemtable to reflect dropping of the first three months form
    • +
    • Updates sample_hf example data to the 48-item HF version
    • +
    • Adds hf_48_2406.txt and hf_48_2510.txt key files
    • +
    • Updates builtin_itembank using 48-item version of gh1 for keys gsed2212, gsed2404 and gsed2510.
    • +
    +
    + +
    • Changes the behavior in get_reference(): If the user specifies a builtin population (e.g. gcdg, who_descriptive) and the key is not found, then it returns the specified reference for its most recent key
    • +
    • Adds an example dataset triple for demo purposes
    • +
    +
    + +
    • Updates the mu-model for "who_descriptive" populations
    • +
    • Adds tests for minimum and maximum test scores for LF and SF instruments
    • +
    • Updates builtin_keys and builtin_references +
    • +
    • Updates documentation
    - -
    • Adds reference "dutch_gsed2212" calculated from Dutch data using the “gsed2212” key. Note: This is a temporary name and will be deprecated.
    • + +
      • Added the new D-score reference for key = "gsed2510" and population = "who_descriptive". This reference replaces the (temporary) phase1 reference. (#62).
    - + +
    +

    🌍 D-score now powered by data from 7 countries!

    +
    • The default key has been updated from gsed2406 to gsed2510.
      • -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.
      • +gsed2406 was built from data in three GSED countries. +
      • +gsed2510 is a major step forward: it incorporates the full validation study across seven countries (BGD, BRA, CHN, CIV, NLD, PAK, TZA), giving a richer and more robust foundation.
      • +
    • +
    • What does this mean for you? +
      • The effect on D-scores is generally modest: in 90% of cases the difference is less than 1 point, and almost never exceeds 2 points.
      • +
      • If you need exact reproducibility with earlier calculations, you can always choose a previous key from dscore::builtin_keys and pass it explicitly via the key argument in dscore::dscore().
      • +
      • +NOTE: To calculate D-scores from instruments other than GSED SF or GSED LF, specify key = "gsed2406" in your dscore() call. Support for additional instruments will be added over time.
      • +
    • +
    • What else is new? +
      • Removed legacy keys that are no longer useful
      • +
      • Removed duplicated instrument codes gpa and gto +
      • +
      • Streamlined documentation and vignettes for easier navigation
      • +
      • Laid the groundwork for extending D-score calculations to older children
      • +
      • Now licensed under Apache 2.0 - making it easier to use, adapt, and integrate into your own applications
      • +
    • +
    • Not ready yet? +
      • Version 1.11.0 remains available as a stable fallback on CRAN, while version 2.0.0 introduces the new default key for future analyses.
      • +
    +
    - -
    • Per request from CRAN (Specified C++11: please drop specification unless essential), removes a C++11 specification
    • + +
      +

      Overview

      +

      This release brings the following enhancements to the dscore package:

      +
      • Adds new item codes for GSED LF and GSED SF
      • +
      • Better support for D-score calculation using Bayley III
      • +
      • Uses a more permissive open source license
      • +
      +
      +

      Major changes

      +
      • Adds item names starting with lf and sf to builtin_itemtable to refer to GSED LF and GSED SF, respectively
      • +
      • Replaces the by3 key in gsed2212 and gsed2406. The replacement matches many more by3 items (172 instead of 67), especially for younger children. Compared to the previous by3 key, it raises the D-score estimate for by3 by approximately 2.6 D.
      • +
      • Updates the LICENSE from AGPL to the permissive Apache 2.0 to conform to Gates Foundation Open Access policy
      +
      +

      Minor changes

      +
      • Adds support to calculate DAZ for children < 2 weeks using the reference preliminary_standards +
      • +
      • Makes rename_vector() part of the dscore package (moved from the gsedread package)
      • +
      • Updates the getting started vignette.
      • +
      • Changes deprecated arma::is_finite(val) to std::isfinite(val) to adhere to CRAN policy
      • +
      • Rebuilds builtin_itemtable to resolve problems with SF items 88 and 89 and LF B43-B51.
      • +
      • Correct description of A45 Stand on 1 foot < 5 seconds
      • +
      • Extends the item table with SF items with mode s (self-report) +
        • Mode “s” is supported in the gsed3, gsed2 and gsed lexicons
        • +
        • Adds item with mode “s” and “gs1” instrument codes
        • +
        • NOTE: there are no gpa-items with mode “s” (gsed2 lexicon)
        • +
      • +
      • It corrects an error in the definition of the gpa item names: +
        • Renames gpaclc088 –> gpaclc089 (Can you child say five or more separate words)
        • +
        • Renames gpasec089 –> gpasec088 (Is your child able to pee or poo)
        • +
      • +
      +
      +

      Breaking changes

      +
      • Retires the key gsed2212 (soft deprecation). This key is identical to gsed2406 (the current default), except that it defines its default population as phase1 instead of preliminary_standards. If you want the old behavior, specify key = "gsed2406" in combination with population = "phase1". The key gsed2212 will be removed in a future release.
      • +
      +
      +

      For developers

      +
      • Adds .toml and .vscode file` to enforce air formatting
      • +
      • Initializes air format on save
      • +
      +
    - -
    • Sets the default reference in get_reference() to phase1 to remain in sync with the default key = "gsed" + +
      +

      Overview

      +

      This release brings two enhancements to the dscore package:

      +
      • More flexible options for specifying the prior mean and prior standard deviation for the D-score calculation, and a new vignette to demonstrate these options.
      • +
      • An updated reference of preliminary_standards based on a larger sample from Bangladesh.
      • +
      +
      +

      Major changes

      +
      • Refreshes preliminary_standards with a larger sample from Bangladesh
      • +
      • Implements new and more friendly options that add increased flexibility to specify prior mean and prior standard deviation for the D-score calculation
      • +
      • Changes the default prior_mean_NA and prior_sd_NA to NULL (was 50 and 20). This is a safer option to handle missing ages. The user can emulate the previous automatic behavior (introduced in intermediate version dscore 1.9.2) by setting the prior_mean_NA = 50 and prior_sd_NA = 20 arguments to the dscore() function.
      • +
      • Rebrands count_mu() as function get_mu() to extract the prior mean from a reference table. Deprecates count_mu().
      • +
      • Adds a vignette “Custom Priors (Advanced)” to demonstrate the new options for specifying the prior mean and prior standard deviation
      • +
      • Turns ages in get_mu() below -1/12 into NA values
      • +
      +
      +

      Minor changes

      +
      • Changes warning("Reference XX for key YY not found." into warning("Reference XX for key YY not found. Using default."
      • -
      • Moves error evasion code into internal pBCT() +
      • Returns preliminary_standards from key gsed2406 in the above case.
      • +
      • Some minor edits to the “Understanding and using DAZ” vignette
      • +
      • Turns Inf values in daz() into NA values
      • +
      • Turns NaN values in SEM into NA values
      • +
      • +dscore() and dscore_posterior() now accept a matrix as input
      • +
      • Improves documentation for interpretation of NAs in D-score, SEM and DAZ
      • +
      • Adds a vignette “Understanding and using DAZ” to explain and highlight DAZ (contributed Jonathan Seiden)
      • +
      • Fixes typos in vignettes
      • +
      • Adds tests in testthat/test-prior.R
      • -
      • 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() +
      • Repairs bug that occured when no items was found resulting in error “cannot coerce class ‘function’ to a data.frame” in dscore()
      • +
      • Restores a datafile data-raw/data/keys/items_gs1_gl1.txt that was accidentally removed in a previous release
      • +
      • Evades superfluous warning ‘There was 1 warning in mutate(). In argument: daz = daz(...)
      • +
      • Makes the key column compulsory in the itembank argument, and adds a check on proper column names
      • +
      • Improves documentation for the population and key arguments
      +
    - -
    • Evades an error produced by internal pBCT() when is.na(nu) is TRUE + +
      +

      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
      -
      - -
      • Renames GSED HH to GSED HF
      • +
        +

        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)
        • +
        +
        +

        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 +
        • +
        • 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
        +
      @@ -258,19 +435,19 @@
      - - + + diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index bee5088e..56bbfbbe 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,11 +1,13 @@ -pandoc: 3.1.11 -pkgdown: 2.0.9 +pandoc: 3.6.3 +pkgdown: 2.1.3 pkgdown_sha: ~ articles: + custom_priors: custom_priors.html getting_started: getting_started.html + multiple_keys: multiple_keys.html scoring_GSED: scoring_GSED.html -last_built: 2024-05-23T13:32Z + using_DAZ: using_DAZ.html +last_built: 2025-10-24T07:37Z urls: reference: https://d-score.github.io/dscore/reference article: https://d-score.github.io/dscore/articles - diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png deleted file mode 100644 index 17a35806..00000000 Binary files a/docs/reference/Rplot001.png and /dev/null differ diff --git a/docs/reference/builtin_itembank.html b/docs/reference/builtin_itembank.html index 8191c7c8..5769e41e 100644 --- a/docs/reference/builtin_itembank.html +++ b/docs/reference/builtin_itembank.html @@ -1,12 +1,12 @@ -Built-in itembank — builtin_itembank • dscoreCollection of items fitting the Rasch model — builtin_itembank • dscore - +
      @@ -31,7 +31,7 @@
    • Changelog @@ -47,28 +56,28 @@
    - +
    -

    A data frame with administrative information per item. Includes -only items that are part of a Rasch model. -See builtin_itemtable for an overview of all currently -defined items.

    +

    A data frame with administrative information per item with difficulty +estimates (tau) from the Rasch model. The item bank provides the basic +information to calculate D-scores. The items in the item bank +are a subset of all items as collected in builtin_itemtable.

    @@ -77,50 +86,64 @@

    Built-in itembank

    Format

    -

    A data.frame with variables:

    NameLabel
    keyString indicating a specific Rasch model (the key)
    itemItem name, gsed lexicon
    tauDifficulty estimate
    labelLabel (English)
    instrumentInstrument code
    domainDomain code
    modeAdministration mode
    numberItem number
    +

    A data.frame with variables:

    NameLabel
    keyString indicating a specific Rasch model
    itemItem name, gsed lexicon
    tauDifficulty estimate
    labelLabel (English)
    instrumentInstrument code
    domainDomain code
    modeAdministration mode
    numberItem number

    Details

    -

    In general, one can only compare D-score calculated with the same -key. The current recommendation for new projects is to choose -key gsed2212.

    +

    The difficulty estimates were estimated by a Rasch model. The key +indicates the specific Rasch model used to estimate the difficulty. +Strictly speaking, one can only compare D-score calculated from the +same key.

    Note

    -

    Last update:

    • Dec 01, 2022 - Overwrite labels of gto by correct item order.

    • +

      Updates:

      • Dec 01, 2022 - Overwrite labels of gto by correct item order.

      • Dec 05, 2022 - Adds key gsed2212, adding instruments gl1 and gs1, and defining correct order for gto

      • Jan 05, 2023 - Adds instrument gh1 to key gsed2212

      • +
      • Oct 10, 2025 - Adds key gsed2510 for instruments gl1 and gs1 (281 items)

      • +
      • Oct 21, 2025 - Updates keys gsed2212, gsed2406 for gh1 (55 -> 48 items)

      • +
      • Oct 21, 2025 - Adds gh1 extension to key gsed2510 (48 items)

      • +
      • Oct 23, 2025 - Adds by3 extension to key gsed2510 (242 items)

    Examples

    -
    head(builtin_itembank)
    -#>        key      item  tau
    -#> 1 gsed2212 gs1sec001 1.10
    -#> 2 gsed2212 gs1moc002 3.22
    -#> 3 gsed2212 gs1sec003 3.60
    -#> 4 gsed2212 gs1lgc004 4.57
    -#> 5 gsed2212 gs1moc005 5.77
    -#> 6 gsed2212 gs1cgc006 6.90
    -#>                                                                         label
    -#> 1                                                      Does your child smile?
    -#> 2     When lying on his/her back, does your child move his/her arms and legs?
    -#> 3                Does your child look at your face when you speak to him/her?
    -#> 4 Does your child cry when he/she is hungry, wet, tired, or wants to be held?
    -#> 5                    Does your child grasp your finger if you touch her hand?
    -#> 6           Does your child look at and focus on objects in front of him/her?
    -#>   instrument domain mode number
    -#> 1        gs1     se    c    001
    -#> 2        gs1     mo    c    002
    -#> 3        gs1     se    c    003
    -#> 4        gs1     lg    c    004
    -#> 5        gs1     mo    c    005
    -#> 6        gs1     cg    c    006
    +    
    # count number of items per instrument in each key
    +table(builtin_itembank$instrument, builtin_itembank$key)
    +#>      
    +#>       293_0 dutch gcdg gsed1912 gsed2212 gsed2406 gsed2510
    +#>   aqi     0     0   29       17       17       17        0
    +#>   bar     0     0   15       13       13       13        0
    +#>   by1     0     0   85       76       76       76        0
    +#>   by2     0     0   16       16       16       16        0
    +#>   by3     0     0  105       67      172      172      242
    +#>   cro     0     0    0       62       64       64        0
    +#>   ddi     0    76   65       64       64       64        0
    +#>   den     0     0   67       50       50       50        0
    +#>   dmc     0     0    0       43       43       43        0
    +#>   ecd     0     0    0        0       18       18        0
    +#>   gh1     0     0    0        0       48       48       48
    +#>   gl1     0     0    0        0      155      155      145
    +#>   gpa   138     0    0        0      138      138        0
    +#>   gri     0     0  104       93       93       93        0
    +#>   gs1     0     0    0        0      139      139      136
    +#>   gsd     0     0    0        0        7        7        0
    +#>   gto   155     0    0        0      155      155        0
    +#>   iyo     0     0    0       55       57       57        0
    +#>   kdi     0     0    0       48       48       48        0
    +#>   mac     0     0    3        3        3        3        0
    +#>   mds     0     0    0        1        1        1        0
    +#>   mdt     0     0    0      126      126      126        0
    +#>   mul     0     0    0      138        0        0        0
    +#>   peg     0     0    1        1        1        1        0
    +#>   sbi     0     0    6        5        5        5        0
    +#>   sgr     0     0   19       19       19       19        0
    +#>   tep     0     0   33       31       31       31        0
    +#>   vin     0     0   17       17       17       17        0
     
    @@ -131,19 +154,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/builtin_itemtable.html b/docs/reference/builtin_itemtable.html index 49ddb21e..da29989f 100644 --- a/docs/reference/builtin_itemtable.html +++ b/docs/reference/builtin_itemtable.html @@ -1,11 +1,10 @@ -Global Scale for Early Development - itemtable — builtin_itemtable • dscoreCollection of items from instruments measuring early child development — builtin_itemtable • dscore - +
    @@ -30,7 +29,7 @@
  • Changelog @@ -46,27 +54,26 @@
  • - +
    -

    The built-in variable named builtin_itemtable -contains descriptions of all items found in the gsed -data.

    +

    The built-in variable builtin_itemtable contains the name and label +of items for measuring early child development.

    @@ -78,21 +85,23 @@

    Format

    A data.frame with variables:

    NameLabel
    itemItem name, gsed lexicon
    equateEquate group
    labelLabel (English)

    Details

    -

    Data are collected by the members of the Global Scales for Early -Development (GSED) group. -The itemtable is created by \\data-raw\\R\\save_builtin_itemtable.R.

    -

    Last update:

    • May 30, 2022 - added gto (LF) and gpa (SF) items

    • +

      The builtin_itemtable is created by script +data-raw/R/save_builtin_itemtable.R.

      +

      Updates:

      • May 30, 2022 - added gto (LF) and gpa (SF) items

      • June 1, 2022 - added seven gsd items

      • Nov 24, 2022 - Added instruments gs1, gs2

      • -
      • Dec 01, 2022 - Labels of gto replaced by correct order. This change invalidates -any analyses done on LF done after May 30, 2022 !!!

      • +
      • Dec 01, 2022 - Labels of gto replaced by correct order. +Incorrect item order affects analyses done on LF between 20220530 - 20221201 !!!

      • Dec 05, 2022 - Redefines gs1 and instrument for Phase 2, removes gs2 (139) Adds gl1 (Long Form Phase 2 items 155)

      • Jan 05, 2023 - Adds 55 items from GSED-HF

      • +
      • Jul 15, 2025 - Rename gpaclc088 –> gpaclc089 (Can you child say five or more separate words) +Rename gpasec089 –> gpasec088 (Is your child able to pee and poo)

      • +
      • Oct 20, 2025 Replace HF 55 items list by HF 48 item list

    Author

    -

    Compiled by Stef van Buuren

    +

    Compiled by Stef van Buuren using different sources

    @@ -103,19 +112,19 @@

    Author

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/builtin_keys.html b/docs/reference/builtin_keys.html new file mode 100644 index 00000000..394bf68c --- /dev/null +++ b/docs/reference/builtin_keys.html @@ -0,0 +1,119 @@ + +Available keys for calculating the D-score — builtin_keys • dscore + + +
    +
    + + + +
    +
    + + +
    +

    A key contains the item difficulty estimates from a given Rasch model. +The difficulty estimates (tau) within a given key are used to +calculate D-scores. D-scores can only be compared when calculated +from the same key.

    +
    + +
    +
    builtin_keys
    +
    + +
    +

    Format

    +

    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

    +

    Updated: 20251023 SvB: Added builtin_keys table by +data-raw\data\R\save_builtin_keys.R

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.3.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/builtin_references.html b/docs/reference/builtin_references.html index 8be0c535..4e81e7cd 100644 --- a/docs/reference/builtin_references.html +++ b/docs/reference/builtin_references.html @@ -1,15 +1,15 @@ -Age-conditional reference distribution of D-score — builtin_references • dscoreCollection of age-conditional reference distributions — builtin_references • dscore - +
    @@ -34,7 +34,7 @@
  • Changelog @@ -50,19 +59,19 @@
  • - +
    @@ -74,7 +83,7 @@

    Age-conditional reference distribution of D-score

    (Stasinopoulos & Rigby, 2022) and is equal for both boys and girls. The LMS/BCT values can be used to graph reference charts and to calculate age-conditional Z-scores, also -known as DAZ.

    +known as the Development-for-Age Z-score (DAZ).

    @@ -83,39 +92,26 @@

    Age-conditional reference distribution of D-score

    Format

    -

    A data.frame with 18 variables:

    NameLabel
    popPopulation: "dutch", "gcdg", "phase1", "phase1_healthy",

         `"dutch_gsed2212"` |

    -

    | age | Decimal age in years | -| mu | M-curve, median D-score, P50 | -| sigma | S-curve, spread expressed as coefficient of variation | -| nu | L-curve, the lambda coefficient of the LMS/BCT model for skewness | -| tau | Kurtosis parameter in the BCT model | -| P3 | P3 percentile | -| P10 | P10 percentile | -| P25 | P25 percentile | -| P50 | P50 percentile | -| P75 | P75 percentile | -| P90 | P90 percentile | -| P97 | P97 percentile | -| SDM2 | -2SD centile | -| SDM1 | -1SD centile | -| SD0 | 0SD 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 -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). -The "phase1" references were calculated from the GSED Phase 1 validation +

    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).

    +

    The "phase1" references were calculated from the GSED Phase 1 validation data (GSED-BGD, GSED-PAK, GSED-TZA) cover age range 2w-3.5 years. The -age range 3.5-5 yrs is linearly extrapolated and are only indicative. -The "phase1_healthy" references were calculated from the GSED Phase 1 validation +age range 3.5-5 yrs is linearly extrapolated and is only indicative.

    +

    The "preliminary_standards" were calculated from the GSED Phase 1 validation data (GSED-BGD, GSED-PAK, GSED-TZA) using a subset of children with -healthy development. -The "dutch_gsed2212" references were calculated from Dutch data using -the gsed2212 key. This is a temporary name, and will be deprecated.

    +covariate indicating healthy development.

    +

    The "who_descriptive" references were calculated from the GSED Phase 1 & 2 +validation data (GSED-BGD, GSED-BRA, GSED_CHN, GSED-CIV, GSED-NLD, GSED-PAK, +GSED-TZA) cover age range 2w-3.5 years. The age range 3.5-5 yrs is linearly +extrapolated and is only indicative. The source code for the relevant +calculations can be found in https://github.com/D-score/gsedscripts/blob/main/inst/scripts/phase2/models/purify.R +and https://github.com/D-score/gsedscripts/blob/main/inst/scripts/phase2/models/fit_core_model.R.

    References

    @@ -132,6 +128,11 @@

    References

    the early development of infants and toddlers across global settings. BMJ Global Health, BMJ Global Health 4: e001724. https://gh.bmj.com/content/bmjgh/4/6/e001724.full.pdf

    +

    van Buuren S, Eekhout I, McCray G, Lancaster GA, Waldman MR, McCoy DC, +Gladstone M, Cavallera, V, Dua T, Black MM, GSED Team (2025). +Enhancing comparability in early child development assessment with the +D-score. International Journal of Behavioral Development, 49(4), 348-364, +https://doi.org/10.1177/01650254241294033

    Stasinopoulos M, Rigby R (2022). gamlss.dist: Distributions for Generalized Additive Models for Location Scale and Shape, R package version 6.0-3, @@ -144,21 +145,15 @@

    See also

    Examples

    -
    head(builtin_references)
    -#>     pop    age    mu  sigma     nu tau   P3   P10   P25   P50   P75   P90   P97
    -#> 1 dutch 0.0383  8.81 0.3126 1.3917  NA 3.15  5.07  6.91  8.81 10.57 12.07 13.49
    -#> 2 dutch 0.0575 10.59 0.2801 1.4418  NA 4.32  6.49  8.52 10.59 12.50 14.12 15.64
    -#> 3 dutch 0.0767 12.27 0.2526 1.4891  NA 5.61  7.96 10.10 12.27 14.28 15.97 17.56
    -#> 4 dutch 0.0958 13.87 0.2291 1.5331  NA 6.99  9.43 11.64 13.87 15.93 17.67 19.30
    -#> 5 dutch 0.1150 15.39 0.2089 1.5722  NA 8.42 10.89 13.13 15.39 17.47 19.23 20.89
    -#> 6 dutch 0.1342 16.83 0.1916 1.6049  NA 9.86 12.32 14.56 16.83 18.92 20.69 22.36
    -#>   SDM2  SDM1   SD0  SDP1  SDP2
    -#> 1 2.78  5.94  8.81 11.39 13.76
    -#> 2 3.88  7.46 10.59 13.38 15.94
    -#> 3 5.12  8.98 12.27 15.20 17.87
    -#> 4 6.47 10.48 13.87 16.87 19.61
    -#> 5 7.89 11.95 15.39 18.43 21.21
    -#> 6 9.33 13.39 16.83 19.88 22.68
    +    
    # get an overview of available references per key
    +table(builtin_references$population, builtin_references$key)
    +#>                        
    +#>                         293_0 dutch gcdg gsed1912 gsed2212 gsed2406 gsed2510
    +#>   dutch                     0   144    0        0      185      185      185
    +#>   gcdg                      0     0  121      121        0        0        0
    +#>   phase1                  186     0    0        0      186      186        0
    +#>   preliminary_standards     0     0    0        0        0      186      186
    +#>   who_descriptive           0     0    0        0        0        0      188
     
    @@ -169,19 +164,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/builtin_translate.html b/docs/reference/builtin_translate.html new file mode 100644 index 00000000..357f1509 --- /dev/null +++ b/docs/reference/builtin_translate.html @@ -0,0 +1,120 @@ + +A table to translate between different lexicons (naming schema) — builtin_translate • dscore + + +
    +
    + + + +
    +
    + + +
    +

    The built-in variable builtin_translate contains a table for +translating among sets of item names into each other.

    +
    + +
    +
    builtin_translate
    +
    + +
    +

    Format

    +

    A data.frame with variables:

    NameLabel
    phase1Item names, Phase 1 data
    phase2Item names, Phase 2 data
    gsedgsed lexion
    gsed2gto/gpa lexicon for LF/SF
    gsed3gl1/gs1 lexicon for LF/SF
    short1Short item name, phase 1 order
    short2Short item name, phase 2 order
    instrumentInstrument code
    seq_phase1Phase 1 order
    seq_phase2Phase 2 order
    labelItem label (English)
    +
    +

    Details

    +

    The builtin_translate is created by script +data-raw/R/save_builtin_translate.R.

    +

    Updates:

    • July 2025 - Tranferred from gsedread package

    • +
    +
    +

    Author

    +

    Compiled by Stef van Buuren

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.3.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/calculate_posterior.html b/docs/reference/calculate_posterior.html index b379f4e8..30a46496 100644 --- a/docs/reference/calculate_posterior.html +++ b/docs/reference/calculate_posterior.html @@ -4,7 +4,7 @@ - +
    @@ -29,7 +29,7 @@
  • Changelog @@ -45,14 +54,14 @@
  • - +
    @@ -68,47 +77,51 @@

    Calculate posterior of ability

    -
    calculate_posterior(scores, tau, qp, mu, sd, relhi, rello)
    +
    calculate_posterior(scores, tau, qp, scale, mu, sd, relhi, rello)

    Arguments

    -
    scores
    + + +
    scores

    A vector with PASS/FAIL observations. Scores are coded numerically as pass = 1 and fail = 0.

    -
    tau
    +
    tau

    A vector containing the item difficulties for the item scores in scores estimated from the Rasch model in the preferred metric/scale.

    -
    qp
    +
    qp

    Numeric vector of equally spaced quadrature points.

    -
    mu
    +
    scale
    +

    Scale expansion

    + + +
    mu

    Numeric scalar. The mean of the prior.

    -
    sd
    +
    sd

    Numeric scalar. Standard deviation of the prior.

    -
    relhi
    +
    relhi

    Positive numeric scalar. Upper end of the relevance interval

    -
    rello
    +
    rello

    Negative numeric scalar. Lower end of the relevance interval

    Value

    - - -

    A list with three elements:

    NameLabel
    eapMean of the posterior
    gpVector of quadrature points
    posteriorVector with posterior distribution.

    Since dscore V40.1 the function does not return the "start" element.

    +

    A list with three elements:

    NameLabel
    eapMean of the posterior
    gpVector of quadrature points
    posteriorVector with posterior distribution.

    Since dscore V40.1 the function does not return the "start" element.

    Author

    @@ -123,19 +136,19 @@

    Author

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/count_mu.html b/docs/reference/count_mu.html new file mode 100644 index 00000000..6de6404a --- /dev/null +++ b/docs/reference/count_mu.html @@ -0,0 +1,134 @@ + +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, prior_mean_NA = NA_real_)
    +
    + +
    +

    Arguments

    + + +
    t
    +

    Decimal age, numeric vector

    + + +
    key
    +

    Character, key of the reference population

    + + +
    prior_mean_NA
    +

    Numeric, prior mean when age is missing

    + +
    +
    +

    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.

    +

    DEPRECATED in dscore 1.9.6

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.3.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/count_mu_dutch.html b/docs/reference/count_mu_dutch.html index e0f75c41..0cd72993 100644 --- a/docs/reference/count_mu_dutch.html +++ b/docs/reference/count_mu_dutch.html @@ -1,11 +1,11 @@ Median of Dutch references — count_mu_dutch • dscore - +
    @@ -30,7 +30,7 @@
  • Changelog @@ -46,27 +55,27 @@
  • - +

    Returns the age-interpolated median of the Dutch references (van Buuren 2014). -The working range is 0-3 years. This function should -be called when the key = "dutch".

    +The working range is 0-3 years. This function is used +to set prior mean under key "dutch".

    @@ -75,15 +84,15 @@

    Median of Dutch references

    Arguments

    -
    t
    + + +
    t

    Decimal age, numeric vector

    Value

    - - -

    A vector of length length(t) with the median of the Dutch references.

    +

    A vector of length length(t) with the median of the Dutch references.

    Note

    @@ -104,19 +113,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/count_mu_gcdg.html b/docs/reference/count_mu_gcdg.html index 2bc2611b..51882f9c 100644 --- a/docs/reference/count_mu_gcdg.html +++ b/docs/reference/count_mu_gcdg.html @@ -1,11 +1,11 @@ Median of GCDG references — count_mu_gcdg • dscore - +
    @@ -30,7 +30,7 @@
  • Changelog @@ -46,27 +55,27 @@
  • - +

    Returns the age-interpolated median of the GCDG references (Weber -et al, 2019). The working range is 0-4 years. This function should -be called when the key = "gsed" or key = "gcdg".

    +et al, 2019). The working range is 0-4 years. This function is used +to set prior mean under keys "gcdg" and "gsed1912".

    @@ -75,15 +84,15 @@

    Median of GCDG references

    Arguments

    -
    t
    + + +
    t

    Decimal age, numeric vector

    Value

    - - -

    A vector of length length(t) with the median of the GCDG references.

    +

    A vector of length length(t) with the median of the GCDG references.

    Note

    @@ -104,19 +113,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/count_mu_phase1.html b/docs/reference/count_mu_phase1.html index de97e16c..8a4cb1ca 100644 --- a/docs/reference/count_mu_phase1.html +++ b/docs/reference/count_mu_phase1.html @@ -1,10 +1,11 @@ -Median of phase1 references — count_mu_phase1 • dscoreMedian of phase1 references — count_mu_phase1 • dscore - +
    @@ -29,7 +30,7 @@
  • Changelog @@ -45,26 +55,27 @@
  • - +

    Returns the age-interpolated median of the phase1 references -based on LF & SF in GSED-BGD, GSED-PAK, GSED-TZA.

    +based on LF & SF in GSED-BGD, GSED-PAK, GSED-TZA. This function is used +to set prior mean under keys "293_0" and "gsed2212".

    @@ -73,15 +84,15 @@

    Median of phase1 references

    Arguments

    -
    t
    + + +
    t

    Decimal age, numeric vector

    Value

    - - -

    A vector of length length(t) with the median of the GCDG references.

    +

    A vector of length length(t) with the median of the GCDG references.

    Details

    @@ -99,9 +110,7 @@

    Details

    Count model: > 9MND & < 3.5 YR: 14.63748 - 12.11774 t + 69.05463(t + 0.92) Linear model: > 3.5 YRS: 61.37967 + 3.83513 t

    The working range is 0-3.5 years. After the age of 3.5 years, the function -will increase at an arbitrary rate of 3.8 D-score points per year. -This function is intended to be called when key = "gsed2212", -key = "gsed2208" or key = "293_0".

    +will increase at an arbitrary rate of 3.8 D-score points per year.

    Note

    @@ -126,19 +135,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/count_mu_phase1_healthy.html b/docs/reference/count_mu_phase1_healthy.html deleted file mode 100644 index f5e9b634..00000000 --- a/docs/reference/count_mu_phase1_healthy.html +++ /dev/null @@ -1,130 +0,0 @@ - -Median of phase1_healthy references — count_mu_phase1_healthy • dscore - - -
    -
    - - - -
    -
    - - -
    -

    Returns the age-interpolated median of the phase1 references -based on LF & SF in GSED-BGD, GSED-PAK, GSED-TZA.

    -
    - -
    -
    count_mu_phase1_healthy(t)
    -
    - -
    -

    Arguments

    -
    t
    -

    Decimal age, numeric vector

    - -
    -
    -

    Value

    - - -

    A vector of length length(t) with the median of the GCDG references.

    -
    -
    -

    Details

    -

    This function is intended to be called when key = "gsed2212", -key = "gsed2208" or key = "293_0".

    -
    -
    -

    Note

    -

    Internal function. Called by dscore()

    -
    -
    -

    Author

    -

    Stef van Buuren, on behalf of GSED project

    -
    - -
    -

    Examples

    -
    dscore:::count_mu_phase1_healthy(0:5)
    -#> Warning: Function count_mu_phase1_health() not yet updated
    -#> [1] 10.24702 47.56581 64.39981 72.61921 76.72019 80.55532
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.9.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/count_mu_preliminary_standards.html b/docs/reference/count_mu_preliminary_standards.html new file mode 100644 index 00000000..9810259d --- /dev/null +++ b/docs/reference/count_mu_preliminary_standards.html @@ -0,0 +1,139 @@ + +Median of preliminary_standards — count_mu_preliminary_standards • dscore + + +
    +
    + + + +
    +
    + + +
    +

    Returns the age-interpolated median of the preliminary_standards +based on LF & SF in seven GSED countries. This function is used +to set prior mean under keys "gsed2406" and "gsed2510".

    +
    + +
    +
    count_mu_preliminary_standards(t, key = NULL)
    +
    + +
    +

    Arguments

    + + +
    t
    +

    Decimal age, numeric vector

    + + +
    key
    +

    Character, key name

    + +
    +
    +

    Value

    +

    A vector of length length(t) with the median of the GCDG references.

    +
    +
    +

    Note

    +

    Internal function. Called by dscore()

    +
    +
    +

    Author

    +

    Stef van Buuren, on behalf of GSED project

    +
    + +
    +

    Examples

    +
    dscore:::count_mu_preliminary_standards(0:5)
    +#> [1]  9.731266 49.186179 65.661854 74.495944 78.626800 82.626800
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.3.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/daz-1.png b/docs/reference/daz-1.png deleted file mode 100644 index ac39f1b8..00000000 Binary files a/docs/reference/daz-1.png and /dev/null differ diff --git a/docs/reference/daz.html b/docs/reference/daz.html index 619a8183..d5bfc0f3 100644 --- a/docs/reference/daz.html +++ b/docs/reference/daz.html @@ -1,14 +1,11 @@ -D-score standard deviation score: DAZ — daz • dscoreCalculate Development-for-Age Z-score (DAZ) — daz • dscore - +
    @@ -33,7 +30,7 @@
  • Changelog @@ -49,74 +55,75 @@
  • - +
    -

    The daz() function calculated the -"Development for Age Z-score". -The DAZ represents a child's D-score after adjusting -for age by an external age-conditional reference. -The zad() is the inverse of daz(): Given age and -the Z-score, it finds the raw D-score.

    +

    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 = get_reference(), dec = 3)
    +    
    daz(d, x, reference_table = NULL, dec = 3, verbose = FALSE)
     
    -zad(z, x, reference = get_reference(), dec = 2)
    +zad(z, x, reference_table = NULL, dec = 2, verbose = FALSE)

    Arguments

    -
    d
    + + +
    d

    Vector of D-scores

    -
    x
    +
    x

    Vector of ages (decimal age)

    -
    reference
    -

    A data.frame with the LMS reference values. -The default uses the get_reference() function. This selects -a subset of rows from the builtin_references.

    +
    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
    +
    dec

    The number of decimals (default dec = 3).

    -
    z
    +
    verbose
    +

    Print out the used reference table (default verbose = FALSE).

    + + +
    z

    Vector of standard deviation scores (DAZ)

    Value

    - - -

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

    - - +

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

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

    Details

    -

    Note 1: The Box-Cox Cole and Green (BCCG) and Box-Cox t (BCT) +

    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.

    @@ -132,46 +139,53 @@

    References

    See also

    - +

    Author

    -

    Stef van Buuren 2020

    +

    Stef van Buuren

    Examples

    -
    # using GSED Phase 1 reference
    +    
    # using default reference and key
     daz(d = c(35, 50), x = c(0.5, 1.0))
    -#> [1] 0.788 0.587
    +#> [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:         gsed2510 
    +#> population:  preliminary_standards 
    +#> [1] 0.499 0.218
     
    -# using Dutch reference
    -daz(d = c(35, 50), x = c(0.5, 1.0), reference = get_reference("gcdg"))
    +# 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
    -daz(d = c(35, 50), x = c(0.5, 1.0), reference = get_reference("dutch"))
    -#> [1] -0.091  0.357
    -# population median at ages 0.5, 1 and 2 years, phase1 reference
    +# using Dutch reference in default key
    +reftab <- get_reference(population = "dutch", verbose = TRUE)
    +#> key:         gsed2510 
    +#> 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] 32.28 47.93 64.30
    +#> [1] 33.39 49.29 65.33
     
    -# population median at ages 0.5, 1 and 2 years, gcdg reference
    -zad(z = rep(0, 3), x = c(0.5, 1, 2), reference = get_reference("gcdg"))
    +# 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 reference
    -zad(z = rep(0, 3), x = c(0.5, 1, 2), reference = get_reference("dutch"))
    +# 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
    -
    -# percentiles of D-score reference
    -g <- expand.grid(age = seq(0.1, 2, 0.1), p = c(0.1, 0.5, 0.9))
    -d <- zad(z = qnorm(g$p), x = g$age)
    -matplot(
    -  x = matrix(g$age, ncol = 3), y = matrix(d, ncol = 3), type = "l",
    -  lty = 1, col = "blue", xlab = "Age (years)", ylab = "D-score"
    -)
    -
     
    @@ -182,19 +196,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/decompose_itemnames.html b/docs/reference/decompose_itemnames.html index 1af253b5..07446d0c 100644 --- a/docs/reference/decompose_itemnames.html +++ b/docs/reference/decompose_itemnames.html @@ -4,7 +4,7 @@ - +
    @@ -29,7 +29,7 @@
  • Changelog @@ -45,14 +54,14 @@
  • - +
    @@ -73,15 +82,15 @@

    Decomposes item names into their four components

    Arguments

    -
    x
    -

    A character vector containing item names (gcdg lexicon)

    + + +
    x
    +

    A character vector containing item names (gsed lexicon)

    Value

    - - -

    A data.frame with length(x) rows and +

    A data.frame with length(x) rows and four columns, named: instrument, domain, mode, and number.

    @@ -124,19 +133,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/dscore-1.png b/docs/reference/dscore-1.png index 5bd78567..e0664258 100644 Binary files a/docs/reference/dscore-1.png and b/docs/reference/dscore-1.png differ diff --git a/docs/reference/dscore-2.png b/docs/reference/dscore-2.png new file mode 100644 index 00000000..84ddc44d Binary files /dev/null and b/docs/reference/dscore-2.png differ diff --git a/docs/reference/dscore-package.html b/docs/reference/dscore-package.html index f65553de..fb8f8079 100644 --- a/docs/reference/dscore-package.html +++ b/docs/reference/dscore-package.html @@ -1,11 +1,11 @@ -dscore: D-score for Child Development — dscore-package • dscoreD-score for child development — dscore-package • dscore - +
    @@ -30,7 +30,7 @@
  • Changelog @@ -46,37 +55,44 @@
  • - +
    -

    The dscore package implements several tools needed to -calculate the D-score, a numerical score that measures -generic development in children.

    +

    The dscore package implements tools needed to calculate the D-score, +a numerical score that summarizes early development in children by +one number, the D-score.

    -
    -

    Note

    -

    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.

    +
    +

    User functions

    + + +

    The available functions are:

    FunctionDescription
    get_itemnames()Extract item names from an itemtable
    order_itemnames()Order item names
    sort_itemnames()Sort item names
    decompose_itemnames()Get four components from itemname
     
    get_itemtable()Get a subset from the itemtable
    get_labels()Get labels for items
    rename_gcdg_gsed()Rename gcdg into gsed lexicon
     
    dscore()Estimate D-score and DAZ
    dscore_posterior()Calculate full posterior of D-score
    get_tau()Get difficulty parameters from item bank
     
    daz()Transform to age-adjusted standardized D-score
    zad()Inverse of daz()
    get_reference()Get D-score reference tables
    get_age_equivalent()Translate difficulty to age
    +
    +

    Built-in data

    + + +

    The package contains the following built-in data:

    DataDescription
    builtin_keys()Available keys for calculating the D-score
    builtin_itembank()Collection of items fitting the Rasch model
    builtin_itemtable()Collection of items from instruments measuring early child development
    builtin_references()Collection of age-conditional reference distributions
     
    milestones()Dataset with PASS/FAIL responses for 27 preterms
    gsampleSample of 10 children from the GSED Phase 1 study, gsed lexicon
    sample_sfSample of 10 children from GSED Short Form (GSED-SF)
    sample_lfSample of 10 children from GSED Long Form (GSED-LF)
    sample_hfSample of 10 children from GSED Household Form (GSED-HF)
    +
    +

    Acknowledgements

    + +

    The authors wish to recognize the principal investigators and their study team members for their generous contribution of the data that made this tool @@ -94,17 +110,12 @@

    Note

    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.

    -
    -

    User functions

    - - -

    The available functions are:

    FunctionDescription
    get_itemnames()Extract item names from an itemtable
    order_itemnames()Order item names
    sort_itemnames()Sort item names
    decompose_itemnames()Get four components from itemname
     
    get_itemtable()Get a subset from the itemtable
    get_labels()Get labels for items
    rename_gcdg_gsed()Rename gcdg into gsed lexicon
     
    dscore()Estimate D-score and DAZ
    dscore_posterior()Calculate full posterior of D-score
    get_tau()Get difficulty parameters from item bank
     
    daz()Transform to age-adjusted standardized D-score
    zad()Inverse of daz()
    get_reference()Get D-score age-reference
    get_age_equivalent()Translate difficulty to age
    -
    -

    Built-in data

    - - -

    The package contains the following built-in data:

    DataDescription
    builtin_itembank()A data.frame containing the difficulty estimates of items according to final Rasch models.
    builtin_itemtable()A data.frame containing names and descriptions of items from 22 instruments.
    builtin_references()A data.frame with LMS reference values used to transform from D-score to DAZ, DAZ to D-score.
    milestones()A small demo dataset with PASS/FAIL responses from 27 preterms, measured at various ages between birth
    and 2.5 years.

    References

    Jacobusse, G., S. van Buuren, and P.H. Verkerk. 2006. “An Interval Scale @@ -142,6 +153,7 @@

    Author

    Maintainer: Stef van Buuren stef.vanbuuren@tno.nl

    Authors:

    @@ -152,19 +164,19 @@

    Author

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/dscore.html b/docs/reference/dscore.html index a08420cb..6240d726 100644 --- a/docs/reference/dscore.html +++ b/docs/reference/dscore.html @@ -1,11 +1,12 @@ -D-score estimation — dscore • dscoreD-score estimation — dscore • dscore - +
    @@ -30,7 +31,7 @@
  • Changelog @@ -46,14 +56,14 @@
  • - +
    @@ -64,60 +74,71 @@

    D-score estimation

    -

    The function dscore() function estimates the D-score, -a numeric score that measures child development, from PASS/FAIL -observations on milestones.

    +

    The dscore() function estimates the following quantities: D-score, +a numeric score that quantifies child development by one number, +Development-for-Age Z-score (DAZ) that corrects the D-score for age, +standard error of measurement (SEM) of the D-score.

    dscore(
       data,
       items = names(data),
    +  key = NULL,
    +  population = NULL,
       xname = "age",
       xunit = c("decimal", "days", "months"),
       prepend = NULL,
    -  key = NULL,
    -  itembank = dscore::builtin_itembank,
    +  itembank = NULL,
       metric = c("dscore", "logit"),
       prior_mean = NULL,
    +  prior_mean_NA = NULL,
       prior_sd = NULL,
    +  prior_sd_NA = NULL,
       transform = NULL,
    -  qp = -10:100,
    -  population = NULL,
    +  qp = NULL,
       dec = c(2L, 3L),
    -  relevance = c(-Inf, Inf)
    +  relevance = c(-Inf, Inf),
    +  algorithm = c("current", "1.8.7"),
    +  verbose = FALSE
     )
     
     dscore_posterior(
       data,
       items = names(data),
    +  key = NULL,
    +  population = NULL,
       xname = "age",
       xunit = c("decimal", "days", "months"),
       prepend = NULL,
    -  key = NULL,
    -  itembank = dscore::builtin_itembank,
    +  itembank = NULL,
       metric = c("dscore", "logit"),
       prior_mean = NULL,
    +  prior_mean_NA = NULL,
       prior_sd = NULL,
    +  prior_sd_NA = NULL,
       transform = NULL,
    -  qp = -10:100,
    -  population = NULL,
    +  qp = NULL,
       dec = c(2L, 3L),
    -  relevance = c(-Inf, Inf)
    +  relevance = c(-Inf, Inf),
    +  algorithm = c("current", "1.8.7"),
    +  verbose = FALSE
     )

    Arguments

    -
    data
    -

    A data.frame with the data. + + +

    data
    +

    A data.frame or matrix with the data. A row collects all observations made on a child on a set of milestones administered at a given age. The function calculates -a D-score for each row. Different rows correspond to different -children or different ages.

    +a D-score for each row. Different rows can correspond to different +children or ages.

    -
    items
    +
    items

    A character vector containing names of items to be included into the D-score calculation. Milestone scores are coded numerically as 1 (pass) and 0 (fail). By default, @@ -125,102 +146,114 @@

    Arguments

    that have a difficulty parameter under the specified key.

    -
    xname
    +
    key
    +

    String. They key identifies 1) the difficulty estimates +pertaining to a particular Rasch model, and 2) the prior mean and standard +deviation of the prior distribution for calculating the D-score. +The default key NULL sets key = "gsed2406". +View builtin_keys for an overview of the available keys.

    + + +
    population
    +

    String. The name of the reference population to calculate +DAZ. +Use with(builtin_references, table(key, population)) to see which +built-in references are available for key - population combinations. +If not specified, the function set the default population as +builtin_keys$base_population[key == builtin_keys$key].

    + + +
    xname

    A string with the name of the age variable in -data. The default is "age".

    +data. The default is "age". Do not round age.

    -
    xunit
    +
    xunit

    A string specifying the unit in which age is measured (either "decimal", "days" or "months"). -The default ("decimal") means decimal age in years.

    +The default "decimal" corresponds to decimal age in years.

    -
    prepend
    +
    prepend

    Character vector with column names in data that will be prepended to the returned data frame. This is useful for copying columns from data into the result, e.g., for matching.

    -
    key
    -

    A string that selects a subset in the itembank that -makes up the key, the set of difficulty -estimates from a fitted Rasch model. -The built-in keys are: "gsed2212" (default), "gsed2208" (deprecated), -"gsed2206" (deprecated), "gsed1912", "lf2206", "sf2206", "gcdg", -and "dutch". Since version 1.5.0, the key = "gsed" -selects the latest key starting with the string "gsed". -Use key = "" to use all item names, -which should only be done if there are no duplicate itemnames -in the itembank.

    - - -
    itembank
    -

    A data.frame with columns -key, item, tau, instrument, domain, -mode, number and label. Only columns item -and tau are required. -The function uses dscore::builtin_itembank by -default.

    +
    itembank
    +

    A data.frame with at least three columns named +key, item and tau. By default, the function uses +dscore::builtin_itembank. If you specify your own itembank, +then you should also provide the relevant transform and qp arguments.

    -
    metric
    +
    metric

    A string, either "dscore" (default) or -"logit", signalling the metric in which ability is estimated.

    - - -
    prior_mean
    -

    A string specifying where the mean of the -prior for the D-score calculation should come from. It could be -a column name in data (when you want your own prior for every row), -but normally this is one of the keywords ".dutch", ".gcdg" -or ".phase1". -The default depends on the key. If key == "dutch" then -prior_mean = ".dutch". The choice prior_mean = ".dutch" -calculates prior_mean from the Count model coded in -dscore:::count_mu_dutch()). -If key is #' "gcdg", "gsed1912", -"gsed2206", "lf2206" or "sf2206" then prior_mean = ".gcdg". -This setting calculates an age-dependent prior mean internally according -to function dscore:::count_mu_gcdg(). -In other cases, prior_mean = ".phase1" -which uses the function dscore:::count_mu_phase1() or -dscore:::count_mu_phase1_healthy(). -Normally, you should not touch this parameter, but feel free to use -prior_mean to override the automatic choices.

    - - -
    prior_sd
    -

    A string specifying a column name in data -with the standard deviation of the prior for the D-score calculation. -If not specified, the standard deviation is taken as 5 for every row.

    - - -
    transform
    -

    Vector of length 2, signalling the intercept -and slope respectively of the linear transform that converts an -observation in the logit scale to the the D-score scale. Only -needed if metric == "logit".

    - - -
    qp
    +"logit", signalling the metric in which ability is estimated. +daz is not calculated for the logit scale.

    + + +
    prior_mean
    +

    NULL (default), a string, a numeric scalar, or +a numeric vector with nrow(data) elements. The default value +NULL will consult the base_population field in builtin_keys, +and use the corresponding median of that reference as prior mean for +the D-score. The string should refer to a column name in data +that contains user-supplied values of the prior mean for each observation. +A numeric scalar will be expanded to all observations. A numeric vector +will be used as is.

    + + +
    prior_mean_NA
    +

    NULL (default) or a scalar numeric, representing +the prior mean for observations with missing ages. By default, D-scores +with missing ages will we NA. We suggest setting +prior_mean_NA = 50 as a reasonable choice for samples between 0-3 +years. The argument is ignored if prior_mean is specified per +observation, which gives you full control of priors for observations +with missing ages.

    + + +
    prior_sd
    +

    NULL (default), a string, a numeric scalar, or +a numeric vector with nrow(data) elements. The default (NULL) +uses a value of 5 for all ages. The string should refer to a column +name in data that contains user-supplied values of the prior sd +for each observation. A numeric scalar will be expanded to all +observations. A numeric vector will be used as is.

    + + +
    prior_sd_NA
    +

    NULL (default) or a scalar numeric, representing +the prior sd for observations with missing ages. By default, D-scores +with missing ages will we NA. We suggest setting +prior_sd_NA = 20 as a reasonable choice for samples between 0-3 +years. The argument is ignored if prior_sd is specified per +observation, which gives you full control of priors for observations +with missing ages.

    + + +
    transform
    +

    Numeric vector, length 2, containing the intercept +and slope of the linear transform from the logit scale into the +the D-score scale. The default (NULL) searches builtin_keys +for intercept and slope values.

    + + +
    qp

    Numeric vector of equally spaced quadrature points. -This vector should span the range of all D-score values. The default -(qp = -10:100) is suitable for age range 0-4 years.

    +This vector should span the range of all D-score or logit values. +The default (NULL) creates seq(from, to, by) searching the +arguments from builtin_keys.

    -
    population
    -

    A string describing the population. Currently -supported are "phase1" (default), "dutch", "gcdg".

    - - -
    dec
    +
    dec

    A vector of two integers specifying the number of decimals for rounding the D-score and DAZ, respectively. The default is dec = c(2L, 3L).

    -
    relevance
    +
    relevance

    A numeric vector of length with the lower and upper bounds of the relevance interval. The procedure calculates a dynamic EAP for each item. If the difficulty level (tau) of the @@ -228,44 +261,60 @@

    Arguments

    ignore the score on the item. The default is c(-Inf, +Inf) does not ignore scores.

    -
    -
    -

    Value

    - -

    The dscore() function returns a data.frame with nrow(data) rows. -Optionally, the first block of columns can be specified by prepend

    +
    algorithm
    +

    Computational method, for backward compatibility. +Either "current" (default) or "1.8.7" (deprecated).

    -

    are copied from data. The second block consists of the -following columns:

    NameLabel
    aDecimal age
    nNumber of items with valid (0/1) data
    pPercentage of passed milestones
    dAbility estimate, mean of posterior
    semStandard error of measurement, standard deviation of the posterior
    dazD-score corrected for age, calculated in Z-scale

    The dscore_posterior() function returns a data frame with -nrow(data) rows and length(qp) plus prepended columns with the -density at each quadrature point. A row vector representes the full -posterior ability distribution. If no valid responses are found, -dscore_posterior() returns the prior density. Versions prior to -1.8.5 returned a matrix (instead of a data.frame). Code that depends on -the result being a matrix may break and needs to be adapted.

    +
    verbose
    +

    Logical. Print settings.

    + +
    +
    +

    Value

    +

    The dscore() function returns a data.frame with nrow(data) rows. +Optionally, the first block of columns can be copied to the +result by using prepend. The second block consists of the +following columns:

    NameLabel
    aDecimal age (years)
    nNumber of items with valid (0/1) data
    pPercentage of passed milestones
    dD-score, mean of posterior distribution
    semStandard error of measurement, standard deviation of the posterior
    dazD-score corrected for age, calculated in Z-scale (for metric "dscore")

    The D-score in column d is a linear scale, with values usually ranging +from 0 to 100. The D-score is NA if age is missing or if age is lower +than -1/12. It is possible to calculate D-scores for cases with missing ages +by setting prior_mean_NA and prior_sd_NA to some reasonable value, e.g., +prior_mean_NA = 50 and prior_sd_NA = 20, for the sample at hand.

    +

    The SEM is a positive number that quantifies the uncertainty of the D-score. +It is NA if the D-score is NA.

    +

    The DAZ in column daz is a Z-score that corrects the D-score for age. It +is NA when there are no reference values for the given age, or when +the D-score is extremely unlikely to be valid at the given age.

    +

    Advanced applications: The dscore_posterior() function returns a +data frame with nrow(data) rows and length(qp) plus prepended columns +with the full posterior density of the D-score at each quadrature point. +If no valid responses are found, dscore_posterior() returns the +prior density. Versions prior to 1.8.5 returned a matrix (instead of +a data.frame). Code that depends on the result being a matrix may break +and may need adaptation.

    Details

    -

    The algorithm is based on the method by Bock and Mislevy (1982). The -method uses Bayes rule to update a prior ability into a posterior +

    The scoring algorithm is based on the method by Bock and Mislevy (1982). +The method uses Bayes rule to update a prior ability into a posterior ability.

    The item names should correspond to the "gsed" lexicon.

    -

    A key is defined by the set of estimated item difficulties.

    KeyModelQuadratureInstrumentsDirect/CaregiverReference
    "dutch"75_0-10:801directVan Buuren, 2014/2020
    "gcdg"565_18-10:10014directWeber, 2019
    "gsed1912"807_17-10:10020mixedGSED Team, 2019
    "gsed2206"818_17-10:10022mixedGSED Team, 2022
    "gsed2208"818_6-10:10022mixedGSED Team, 2022
    "gsed2212"818_6-10:10022mixedGSED Team, 2022
    "lf2206"155_0-10:1001directGSED Team, 2022
    "sf2206"139_0-10:1001caregiverGSED Team, 2022

    As a general rule, one should only compare D-scores +

    A key is defined by the set of estimated item difficulties.

    KeyModelQuadratureInstrumentsDirect/CaregiverReference
    "dutch"75_0-10:801directVan Buuren, 2014/2020
    "gcdg"565_18-10:10013directWeber, 2019
    "gsed1912"807_17-10:10021mixedGSED Team, 2019
    "293_0"293_0-10:1002mixedGSED Team, 2022
    "gsed2212"818_6-10:10027mixedGSED Team, 2022
    "gsed2406"818_6-10:10027mixedGSED Team, 2024
    "gsed2510"281_0-10:1253mixedGSED Team, 2025

    As a general rule, one should only compare D-scores that are calculated using the same key and the same set of quadrature points. For calculating D-scores on new data, -the advice is to use the default, which currently links to -"gsed2212".

    +the advice is to use the default, which currently is "gsed2510". +Currently, key "gsed2510" is defined for instrument codes gs1 +(GSED SF), gl1 (GSED LF) and gh1 (GSED HF). If you +have another instrument, use the key "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 internal functions -dscore:::count_mu_phase1(), dscore:::count_mu_gcdg() and -dscore:::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 [get_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 thus somewhat informative for low numbers of -valid 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

    @@ -285,9 +334,8 @@

    References

    Author

    @@ -296,50 +344,76 @@

    Author

    Examples

    -
    data <- data.frame(
    -  id = c("Jane", "Martin", "ID-3", "No. 4", "Five", "6",
    -        NA_character_, as.character(8:10)),
    +    
    # using all defaults and properly formatted data
    +sf <- dscore::triple[, 1:141]
    +ds <- dscore(sf)
    +head(ds)
    +#>        a  n      p     d      sem    daz
    +#> 1 1.9493 65 0.6769 68.95 1.210561  1.186
    +#> 2 2.5325 34 0.7059 73.23 1.458141  0.572
    +#> 3 2.3874 36 0.5833 65.89 1.404537 -0.966
    +#> 4 0.8980  8 0.5000 38.64 2.527097 -2.228
    +#> 5 2.1903 31 0.2258 57.84 1.605532 -2.289
    +#> 6 0.8980 80 0.7625 54.78 1.325298  2.517
    +
    +# step-by-step example demonstrating
    +# all possible response vectors for 3 items
    +data <- data.frame(
    +  id = c(
    +    "Jane", "Martin", "ID-3", "No. 4", "Five", "6",
    +    NA_character_, as.character(8:10)),
       age = rep(round(21 / 365.25, 4), 10),
    -  ddifmd001 = c(NA, NA, 0, 0, 0, 1, 0, 1, 1, 1),
    -  ddicmm029 = c(NA, NA, NA, 0, 1, 0, 1, 0, 1, 1),
    -  ddigmd053 = c(NA, 0, 0, 1, 0, 0, 1, 1, 0, 1)
    +  gs1sec001 = c(NA, NA, 0, 0, 0, 1, 0, 1, 1, 1),
    +  gs1moc002 = c(NA, NA, NA, 0, 1, 0, 1, 0, 1, 1),
    +  gs1sec003 = c(NA, 0, 0, 1, 0, 0, 1, 1, 0, 1)
     )
    +
    +# what are these items?
     items <- names(data)[3:5]
    +get_labels(items)
    +#>                                                                       gs1sec001 
    +#>                                                  "SF001 Does your child smile?" 
    +#>                                                                       gs1moc002 
    +#> "SF002 When lying on his/her back, does your child move his/her arms and legs?" 
    +#>                                                                       gs1sec003 
    +#>            "SF003 Does your child look at your face when you speak to him/her?" 
     
    -# third item is not part of default key
    -get_tau(items)
    -#> ddifmd001 ddicmm029 ddigmd053 
    -#>      8.61      8.47        NA 
    +# difficulty parameter in default key
    +get_tau(items, verbose = TRUE)
    +#> key:         gsed2510 
    +#> gs1sec001 gs1moc002 gs1sec003 
    +#>      2.56      0.40      3.12 
     
     # calculate D-score
    +# the same sumscore leads to the same D-score (column d)
     dscore(data)
    -#>         a n   p     d      sem    daz
    -#> 1      NA 0  NA    NA       NA     NA
    -#> 2      NA 0  NA    NA       NA     NA
    -#> 3  0.0575 1 0.0  6.61 2.763004 -2.019
    -#> 4  0.0575 2 0.0  5.60 2.459750 -2.235
    -#> 5  0.0575 2 0.5  9.09 1.695326 -1.447
    -#> 6  0.0575 2 0.5  9.09 1.695326 -1.447
    -#> 7  0.0575 2 0.5  9.09 1.695326 -1.447
    -#> 8  0.0575 2 0.5  9.09 1.695326 -1.447
    -#> 9  0.0575 2 1.0 15.30 3.851173  0.277
    -#> 10 0.0575 2 1.0 15.30 3.851173  0.277
    +#>         a n      p     d      sem    daz
    +#> 1      NA 0     NA    NA       NA     NA
    +#> 2  0.0575 1 0.0000  8.22 4.413632 -1.821
    +#> 3  0.0575 2 0.0000  4.91 3.791544 -2.617
    +#> 4  0.0575 3 0.3333  5.77 3.547318 -2.424
    +#> 5  0.0575 3 0.3333  5.77 3.547318 -2.424
    +#> 6  0.0575 3 0.3333  5.77 3.547318 -2.424
    +#> 7  0.0575 3 0.6667  9.64 3.953138 -1.426
    +#> 8  0.0575 3 0.6667  9.64 3.953138 -1.426
    +#> 9  0.0575 3 0.6667  9.64 3.953138 -1.426
    +#> 10 0.0575 3 1.0000 14.58 4.470412  0.192
     
     # prepend id variable to output
     dscore(data, prepend = "id")
    -#>        id      a n   p     d      sem    daz
    -#> 1    Jane     NA 0  NA    NA       NA     NA
    -#> 2  Martin     NA 0  NA    NA       NA     NA
    -#> 3    ID-3 0.0575 1 0.0  6.61 2.763004 -2.019
    -#> 4   No. 4 0.0575 2 0.0  5.60 2.459750 -2.235
    -#> 5    Five 0.0575 2 0.5  9.09 1.695326 -1.447
    -#> 6       6 0.0575 2 0.5  9.09 1.695326 -1.447
    -#> 7    <NA> 0.0575 2 0.5  9.09 1.695326 -1.447
    -#> 8       8 0.0575 2 0.5  9.09 1.695326 -1.447
    -#> 9       9 0.0575 2 1.0 15.30 3.851173  0.277
    -#> 10     10 0.0575 2 1.0 15.30 3.851173  0.277
    +#>        id      a n      p     d      sem    daz
    +#> 1    Jane     NA 0     NA    NA       NA     NA
    +#> 2  Martin 0.0575 1 0.0000  8.22 4.413632 -1.821
    +#> 3    ID-3 0.0575 2 0.0000  4.91 3.791544 -2.617
    +#> 4   No. 4 0.0575 3 0.3333  5.77 3.547318 -2.424
    +#> 5    Five 0.0575 3 0.3333  5.77 3.547318 -2.424
    +#> 6       6 0.0575 3 0.3333  5.77 3.547318 -2.424
    +#> 7    <NA> 0.0575 3 0.6667  9.64 3.953138 -1.426
    +#> 8       8 0.0575 3 0.6667  9.64 3.953138 -1.426
    +#> 9       9 0.0575 3 0.6667  9.64 3.953138 -1.426
    +#> 10     10 0.0575 3 1.0000 14.58 4.470412  0.192
     
    -# prepend all data
    +# or prepend all data
     # dscore(data, prepend = colnames(data))
     
     # calculate full posterior
    @@ -347,14 +421,33 @@ 

    Examples

    # check that rows sum to 1 rowSums(p) -#> [1] 0.9999992 0.9999992 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 +#> [1] 0.9999992 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 #> [8] 1.0000000 1.0000000 1.0000000 -# plot posterior for row 7 -barplot(as.matrix(p[7, 12:29]), names = 1:18, - xlab = "D-score", ylab = "Density", - main = "Full D-score posterior for measurement in row 7") +# plot full posterior for measurement 7 +barplot(as.matrix(p[7, 12:36]), + names = 1:25, + xlab = "D-score", ylab = "Density", col = "grey", + main = "Full D-score posterior for measurement in row 7", + sub = "D-score (EAP) = 11.58, SEM = 3.99") + +# 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: gsed2510 +#> 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", + main = "D-score preliminary standards: P10, P50 and P90") +abline(h = seq(10, 80, 10), v = seq(0, 4, 0.5), col = "gray", lty = 2) + +# add measurements made on very preterms, ga < 32 weeks +# we need key = "gsed2406" because DDI is not yet in key "gsed2510" +ds <- dscore(milestones, key = "gsed2406") +points(x = ds$a, y = ds$d, pch = 19, col = "red") +
    @@ -365,19 +458,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/dscore_posterior.html b/docs/reference/dscore_posterior.html new file mode 100644 index 00000000..953fb581 --- /dev/null +++ b/docs/reference/dscore_posterior.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/reference/get_age_equivalent.html b/docs/reference/get_age_equivalent.html index 4db439fc..035870d7 100644 --- a/docs/reference/get_age_equivalent.html +++ b/docs/reference/get_age_equivalent.html @@ -4,7 +4,7 @@ - +
    @@ -29,7 +29,7 @@
  • Changelog @@ -45,14 +54,14 @@
  • - +
    @@ -72,15 +81,19 @@

    Get age equivalents of items that have a difficulty estimate

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

    Arguments

    -
    items
    + + +
    items

    A character vector containing names of items to be included into the D-score calculation. Milestone scores are coded numerically as 1 (pass) and 0 (fail). By default, @@ -88,71 +101,79 @@

    Arguments

    that have a difficulty parameter under the specified key.

    -
    pct
    +
    pct

    Numeric vector with requested percentiles (0-100). The default is pct = c(10, 50, 90).

    -
    key
    -

    A string that selects a subset in the itembank that -makes up the key, the set of difficulty -estimates from a fitted Rasch model. -The built-in keys are: "gsed2212" (default), "gsed2208" (deprecated), -"gsed2206" (deprecated), "gsed1912", "lf2206", "sf2206", "gcdg", -and "dutch". Since version 1.5.0, the key = "gsed" -selects the latest key starting with the string "gsed". -Use key = "" to use all item names, -which should only be done if there are no duplicate itemnames -in the itembank.

    +
    key
    +

    String. They key identifies 1) the difficulty estimates +pertaining to a particular Rasch model, and 2) the prior mean and standard +deviation of the prior distribution for calculating the D-score. +The default key NULL sets key = "gsed2406". +View builtin_keys for an overview of the available keys.

    + + +
    population
    +

    String. The name of the reference population to calculate +DAZ. +Use with(builtin_references, table(key, population)) to see which +built-in references are available for key - population combinations. +If not specified, the function set the default population as +builtin_keys$base_population[key == builtin_keys$key].

    -
    itembank
    -

    A data.frame with columns -key, item, tau, instrument, domain, -mode, number and label. Only columns item -and tau are required. -The function uses dscore::builtin_itembank by -default.

    +
    transform
    +

    Numeric vector, length 2, containing the intercept +and slope of the linear transform from the logit scale into the +the D-score scale. The default (NULL) searches builtin_keys +for intercept and slope values.

    -
    population
    -

    A string describing the population. Currently -supported are "phase1" (default), "dutch", "gcdg".

    +
    itembank
    +

    A data.frame with at least three columns named +key, item and tau. By default, the function uses +dscore::builtin_itembank. If you specify your own itembank, +then you should also provide the relevant transform and qp arguments.

    -
    xunit
    +
    xunit

    A string specifying the unit in which age is measured (either "decimal", "days" or "months"). -The default ("decimal") means decimal age in years.

    +The default "decimal" corresponds to decimal age in years.

    + + +
    verbose
    +

    Logical. Print settings.

    Value

    - - -

    Tibble with four columns: item, d (D-score), +

    data.frame with four columns: item, d (D-score), pct (percentile), and a (age-equivalent, in xunit units).

    -
    -

    Details

    +
    +

    Note

    The function internally defines a scale factor given the key.

    Examples

    -
    get_age_equivalent(c("gpagmc018", "gtogmd026", "ddicmm050"))
    -#> # A tibble: 9 × 4
    -#>   item          d   pct       a
    -#>   <chr>     <dbl> <dbl>   <dbl>
    -#> 1 gpagmc018  14.5    10  0.0610
    -#> 2 gpagmc018  23.4    50  0.295 
    -#> 3 gpagmc018  32.3    90  0.501 
    -#> 4 gtogmd026  31.1    10  0.473 
    -#> 5 gtogmd026  40      50  0.708 
    -#> 6 gtogmd026  48.9    90  1.04  
    -#> 7 ddicmm050  68.7    10  2.44  
    -#> 8 ddicmm050  77.7    50  4.25  
    -#> 9 ddicmm050  86.6    90 NA     
    +    
    get_age_equivalent(c("gpagmc018", "gtogmd026", "ddicmm050"),
    +  key = "gsed2406", population = "dutch", verbose = TRUE)
    +#> key:         gsed2406 
    +#> population:  dutch 
    +#> transform:   54.93915 4.064264 
    +#>        item       d pct         a
    +#> 1 gpagmc018 14.4799  10 0.0769278
    +#> 2 gpagmc018 23.4100  50 0.3423000
    +#> 3 gpagmc018 32.3401  90 0.5882360
    +#> 4 gtogmd026 31.0699  10 0.5544452
    +#> 5 gtogmd026 40.0000  50 0.8031094
    +#> 6 gtogmd026 48.9301  90 1.1108040
    +#> 7 ddicmm050 68.7399  10 2.2574919
    +#> 8 ddicmm050 77.6700  50 3.2182231
    +#> 9 ddicmm050 86.6001  90        NA
     
    @@ -163,19 +184,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/get_itemnames.html b/docs/reference/get_itemnames.html index a291d230..0ad3eb7b 100644 --- a/docs/reference/get_itemnames.html +++ b/docs/reference/get_itemnames.html @@ -5,7 +5,7 @@ - +
    @@ -30,7 +30,7 @@
  • Changelog @@ -46,14 +55,14 @@
  • - +
    @@ -84,48 +93,50 @@

    Extract item names

    Arguments

    -
    x
    + + +
    x

    A character vector, data.frame or an object of class lean. If not specified, the function will return all item names in itemtable.

    -
    instrument
    +
    instrument

    A character vector with 3-position codes of instruments that should match. The default instrument = NULL allows for all instruments.

    -
    domain
    +
    domain

    A character vector with 2-position codes of domains that should match. The default instrument = NULL allows for all domains.

    -
    mode
    +
    mode

    A character vector with 1-position codes of the mode of administration. The default mode = NULL allows for all modes.

    -
    number
    +
    number

    A numeric or character vector with item numbers. The default number = NULL allows for all numbers.

    -
    strict
    +
    strict

    A logical specifying whether the resulting item names must conform to one of the built-in names. The default is strict = FALSE.

    -
    itemtable
    +
    itemtable

    A data.frame set up according to the same structure as builtin_itemtable(). If not specified, the builtin_itemtable is used.

    -
    order
    +
    order

    A four-letter string specifying the sorting order. The four letters are: i for instrument, d for domain, m for mode and n for number. The default is @@ -134,9 +145,7 @@

    Arguments

    Value

    - - -

    A vector with names of items

    +

    A vector with names of items

    Details

    @@ -150,7 +159,7 @@

    See also

    Author

    -

    Stef van Buuren 2020

    +

    Stef van Buuren

    @@ -191,6 +200,14 @@

    Examples

    # get all item numbers 70 and 73 from gm domain get_itemnames(number = c(70, 73), domain = "gm") #> [1] "by3gmd070" "ddigmd070" "ddigmm073" "mulgmd070" + +# get item names from GSED SF (2023 version) in published order +items_sf <- get_itemnames(instrument = "gs1", order = "indm") + +# get item names from GSED LF (2023 version) in published order +items_lf <- get_itemnames(instrument = "gl1") +items_lf <- items_lf[c(55:155, 1:54)] +
    @@ -201,19 +218,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/get_itemtable.html b/docs/reference/get_itemtable.html index 538856a9..6cb57aa8 100644 --- a/docs/reference/get_itemtable.html +++ b/docs/reference/get_itemtable.html @@ -7,7 +7,7 @@ - +
    @@ -32,7 +32,7 @@
  • Changelog @@ -48,14 +57,14 @@
  • - +
    @@ -79,28 +88,28 @@

    Get a subset of items from the itemtable

    Arguments

    -
    items
    + + +
    items

    A logical or character vector of item names to return. The default (NULL) returns all items.

    -
    itemtable
    +
    itemtable

    A data.frame set up according to the same structure as builtin_itemtable(). If not specified, the builtin_itemtable is used. If itemtable = "", then a dynamic item table is created from any specified item names.

    -
    decompose
    +
    decompose

    If TRUE, the function adds four columns: instrument, domain, mode and number.

    Value

    - - -

    A data.frame with seven columns.

    +

    A data.frame with seven columns.

    See also

    @@ -111,13 +120,13 @@

    See also

    Examples

    head(get_itemtable(), 3)
     #>        item equate
    -#> 1 aqicmc001   <NA>
    -#> 2 aqicmc002   <NA>
    -#> 3 aqicmc003   <NA>
    -#>                                                                                      label
    -#> 1                                Does your baby sometimes make throaty or gurgling sounds?
    -#> 2 After you have been out of sight, does your baby smile or get excited when she sees you?
    -#> 3               "Does your baby make cooing sounds such as ""ooo"", ""gah,"" and  ""ah""?"
    +#> 1 aqiNAc005   FM97
    +#> 2 aqicmc001   <NA>
    +#> 3 aqicmc002   <NA>
    +#>                                                                                                                                         label
    +#> 1 Does your baby pick up a crumb or Cheerio with the tips of his thumb and a finger? He may rest his arm or hand on the table while doing it.
    +#> 2                                                                                   Does your baby sometimes make throaty or gurgling sounds?
    +#> 3                                                    After you have been out of sight, does your baby smile or get excited when she sees you?
     get_itemtable(LETTERS[1:3], "")
     #>   item equate       label
     #> 1    A   <NA> Label for A
    @@ -133,19 +142,19 @@ 

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/get_labels.html b/docs/reference/get_labels.html index f936d9a0..e2649a3d 100644 --- a/docs/reference/get_labels.html +++ b/docs/reference/get_labels.html @@ -4,7 +4,7 @@ - +
    @@ -29,7 +29,7 @@
  • Changelog @@ -45,14 +54,14 @@
  • - +
    @@ -73,17 +82,19 @@

    Get labels for items

    Arguments

    -
    items
    + + +
    items

    A character vector of item names to return. The default (NULL) returns the labels of all items.

    -
    trim
    +
    trim

    The maximum number of characters in the label. The default trim = NULL does not trim labels.

    -
    itemtable
    +
    itemtable

    A data.frame set up according to the same structure as builtin_itemtable(). If not specified, the builtin_itemtable is used.

    @@ -91,9 +102,7 @@

    Arguments

    Value

    - - -

    A named character vector with length(items) elements with +

    A named character vector with length(items) elements with item labels, in the same order as in items.

    @@ -117,19 +126,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/get_mu.html b/docs/reference/get_mu.html new file mode 100644 index 00000000..eb419625 --- /dev/null +++ b/docs/reference/get_mu.html @@ -0,0 +1,132 @@ + +Median D-score from the base population for a given key — get_mu • dscore + + +
    +
    + + + +
    +
    + + +
    +

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

    +
    + +
    +
    get_mu(t, key, prior_mean_NA = NA_real_)
    +
    + +
    +

    Arguments

    + + +
    t
    +

    Decimal age, numeric vector

    + + +
    key
    +

    Character, key of the reference population

    + + +
    prior_mean_NA
    +

    Numeric, prior mean when age is missing

    + +
    +
    +

    Value

    +

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

    +
    +
    +

    Details

    +

    Use get_reference() for more options.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.3.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/get_reference.html b/docs/reference/get_reference.html index 7dab75b2..b12a4f01 100644 --- a/docs/reference/get_reference.html +++ b/docs/reference/get_reference.html @@ -4,7 +4,7 @@ - +
    @@ -29,7 +29,7 @@
  • Changelog @@ -45,14 +54,14 @@
  • - +
    @@ -68,42 +77,73 @@

    Get D-score reference

    -
    get_reference(population = "phase1", references = dscore::builtin_references)
    +
    get_reference(
    +  population = NULL,
    +  key = NULL,
    +  references = dscore::builtin_references,
    +  verbose = FALSE,
    +  ...
    +)

    Arguments

    -
    population
    -

    A string describing the population. Currently supported -are "dutch", "gcdg", "phase1" or "phase1_health". -The default is "phase1", in sync with the default key = "gsed".

    -
    references
    -

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

    +
    population
    +

    String. The name of the reference population to calculate +DAZ. +Use with(builtin_references, table(key, population)) to see which +built-in references are available for key - population combinations. +If not specified, the function set the default population as +builtin_keys$base_population[key == builtin_keys$key].

    + + +
    key
    +

    String. They key identifies 1) the difficulty estimates +pertaining to a particular Rasch model, and 2) the prior mean and standard +deviation of the prior distribution for calculating the D-score. +The default key NULL sets key = "gsed2406". +View builtin_keys for an overview of the available keys.

    + + +
    references
    +

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

    + + +
    verbose
    +

    Logical. Print settings.

    + + +
    ...
    +

    Used to test whether the call contained the deprecated argument +references.

    Value

    - - -

    A data.frame with the LMS reference values.

    +

    A data.frame with the LMS reference values.

    Note

    No references for population "gsed" exist. The function will silently rewrite population = "gsed" into to the population = "gsed".

    -

    The "dutch" reference was published in Van Buuren (2014) -The "gcdg" was calculated from 15 cohorts with direct -observations (Weber, 2019). -The "phase1" references were calculated from the GSED Phase 1 validation +

    The "dutch" reference was published in Van Buuren (2014)

    +

    The "gcdg" was calculated from 15 cohorts with direct +observations (Weber, 2019).

    +

    The "phase1" references were calculated from the GSED Phase 1 validation data (GSED-BGD, GSED-PAK, GSED-TZA) cover age range 2w-3.5 years. The age range 3.5-5 yrs is linearly extrapolated and are only indicative. -The "phase1_healthy" references were calculated from the GSED Phase 1 validation -using a subset of children with healthy development.

    +(Van Buuren et al, 2025)

    +

    The "preliminary_standards" references were calculated from the GSED +Phase 1 validation using a subset of children with healthy development. +(Van Buuren et al, 2025)

    +

    The "who_descriptive" references were calculated from the GSED +Phase 1 + 2 (Seven countries) validation study using the "gsed2510" key. +It is a descriptive reference, i.e., no selection of children growing +up in healthy environments was made. (In preparation for publication).

    References

    @@ -116,12 +156,70 @@

    References

    the early development of infants and toddlers across global settings. BMJ Global Health, BMJ Global Health 4: e001724. https://gh.bmj.com/content/bmjgh/4/6/e001724.full.pdf.

    +

    van Buuren S, Eekhout I, McCray G, Lancaster GA, Waldman MR, McCoy DC, +Gladstone M, Cavallera, V, Dua T, Black MM, GSED Team (2025). +Enhancing comparability in early child development assessment with the +D-score. International Journal of Behavioral Development, 49(4), 348-364, +https://doi.org/10.1177/01650254241294033

    +
    +

    Examples

    +
    # see key-population combinations of builtin_references
    +table(builtin_references$key, builtin_references$population)
    +#>           
    +#>            dutch gcdg phase1 preliminary_standards who_descriptive
    +#>   293_0        0    0    186                     0               0
    +#>   dutch      144    0      0                     0               0
    +#>   gcdg         0  121      0                     0               0
    +#>   gsed1912     0  121      0                     0               0
    +#>   gsed2212   185    0    186                     0               0
    +#>   gsed2406   185    0    186                   186               0
    +#>   gsed2510   185    0      0                   186             188
    +
    +# get the default reference
    +reftab <- get_reference()
    +head(reftab, 2)
    +#>                 population      key distribution    age    mu  sigma   nu
    +#> 1501 preliminary_standards gsed2510          BCT 0.0000 11.46 0.2075 1.42
    +#> 1502 preliminary_standards gsed2510          BCT 0.0383 13.18 0.2075 1.42
    +#>         tau       P3      P10       P25      P50      P75      P90      P97
    +#> 1501 34.189 6.333258 8.150177  9.791339 11.46264 13.03831 14.41592 15.76832
    +#> 1502 34.189 7.283800 9.373415 11.260895 13.18304 14.99519 16.57957 18.13494
    +#>          SDM2     SDM1      SD0     SDP1     SDP2
    +#> 1501 5.941355  8.93160 11.46264 13.77963 16.03876
    +#> 1502 6.833076 10.27212 13.18304 15.84778 18.44597
    +
    +# get the default reference for the key "gsed2212"
    +reftab <- get_reference(key = "gsed2212", verbose = TRUE)
    +#> key:         gsed2212 
    +#> population:  phase1 
    +
    +# get dutch reference for default key
    +reftab <- get_reference(population = "dutch", verbose = TRUE)
    +#> key:         gsed2510 
    +#> population:  dutch 
    +
    +# loading a non-existing reference yield fallback to default
    +reftab <- get_reference(population = "france", verbose = TRUE)
    +#> key:         gsed2510 
    +#> population:  france 
    +#> Warning: Reference 'france' for key 'gsed2510' not found. Fallback: 'preliminary_standards' for key 'gsed2406'.
    +
    +# if user specifies a builtin population (e.g. who_descriptive) and the key
    +# is not found, then it returns the specified reference for its most recent key
    +reftab <- get_reference(key = "none", population = "preliminary_standards", verbose = TRUE)
    +#> key:         none 
    +#> population:  preliminary_standards 
    +#> Using key:   gsed2510 
    +nrow(reftab)
    +#> [1] 186
    +
    +
    - - + + diff --git a/docs/reference/get_tau.html b/docs/reference/get_tau.html index ea68e828..7cad0a86 100644 --- a/docs/reference/get_tau.html +++ b/docs/reference/get_tau.html @@ -5,7 +5,7 @@ - +
    @@ -30,7 +30,7 @@
  • Changelog @@ -46,14 +55,14 @@
  • - +
    @@ -70,12 +79,19 @@

    Obtain difficulty parameters from item bank

    -
    get_tau(items, key = NULL, itembank = dscore::builtin_itembank)
    +
    get_tau(
    +  items,
    +  key = NULL,
    +  itembank = dscore::builtin_itembank,
    +  verbose = FALSE
    +)

    Arguments

    -
    items
    + + +
    items

    A character vector containing names of items to be included into the D-score calculation. Milestone scores are coded numerically as 1 (pass) and 0 (fail). By default, @@ -83,33 +99,28 @@

    Arguments

    that have a difficulty parameter under the specified key.

    -
    key
    -

    A string that selects a subset in the itembank that -makes up the key, the set of difficulty -estimates from a fitted Rasch model. -The built-in keys are: "gsed2212" (default), "gsed2208" (deprecated), -"gsed2206" (deprecated), "gsed1912", "lf2206", "sf2206", "gcdg", -and "dutch". Since version 1.5.0, the key = "gsed" -selects the latest key starting with the string "gsed". -Use key = "" to use all item names, -which should only be done if there are no duplicate itemnames -in the itembank.

    +
    key
    +

    String. They key identifies 1) the difficulty estimates +pertaining to a particular Rasch model, and 2) the prior mean and standard +deviation of the prior distribution for calculating the D-score. +The default key NULL sets key = "gsed2406". +View builtin_keys for an overview of the available keys.

    + +
    itembank
    +

    A data.frame with at least three columns named +key, item and tau. By default, the function uses +dscore::builtin_itembank. If you specify your own itembank, +then you should also provide the relevant transform and qp arguments.

    -
    itembank
    -

    A data.frame with columns -key, item, tau, instrument, domain, -mode, number and label. Only columns item -and tau are required. -The function uses dscore::builtin_itembank by -default.

    + +
    verbose
    +

    Logical. Print settings.

    Value

    - - -

    A named vector with the difficulty estimate per item with +

    A named vector with the difficulty estimate per item with length(items) elements.

    @@ -126,7 +137,7 @@

    Examples

    # difficulty levels in the GHAP lexicon
     get_tau(items = c("ddifmd001", "DDigmd052", "xyz"))
     #> ddifmd001 DDigmd052       xyz 
    -#>      8.61        NA        NA 
    +#>        NA        NA        NA 
     
    @@ -137,19 +148,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/gsample.html b/docs/reference/gsample.html index 4923002e..8f1c377b 100644 --- a/docs/reference/gsample.html +++ b/docs/reference/gsample.html @@ -4,7 +4,7 @@ - +
    @@ -29,7 +29,7 @@
  • Changelog @@ -45,14 +54,14 @@
  • - +
    @@ -75,6 +84,12 @@

    Sample of 10 children from the GSED Phase 1 study

    Format

    A data.frame with 10 rows and 295 variables:

    NameLabel
    idInteger, child ID
    agedaysInteger, age in days
    gpalac001Integer, Cry when hungry...: 1 = yes, 0 = no, NA = not administered
    gpalac002Integer, Look at/focus...: 1 = yes, 0 = no, NA = not administered
    ...and so on..

    There are 138 gpa items (item gpamoc008 (clench fists) removed) from GSED SF and and 155 gto items from GSED LF.

    +
    +
    +

    Details

    +

    On July 15, 2025, the item gpaclc088 was renamed to gpaclc089 +(Can you child say five or more separate words) and gpasec089 was renamed +to gpasec088 (Is your child able to pee and poo).

    See also

    @@ -168,7 +183,7 @@

    Examples

    #> 4 NA NA NA NA NA NA NA #> 5 NA NA NA NA NA NA NA #> 6 NA NA NA NA NA NA NA -#> gpasec085 gpasec086 gpaxxc087 gpasec089 gpaclc088 gpacmc090 gpaclc091 +#> gpasec085 gpasec086 gpaxxc087 gpasec088 gpaclc089 gpacmc090 gpaclc091 #> 1 NA NA 1 1 1 1 1 #> 2 NA NA 0 1 1 1 1 #> 3 NA NA NA NA NA NA NA @@ -388,19 +403,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/index.html b/docs/reference/index.html index 311bc502..7cdc7175 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,9 +1,9 @@ -Function reference • dscorePackage index • dscore - +
    @@ -28,7 +28,7 @@
  • Changelog @@ -44,14 +53,14 @@
  • - +
    @@ -66,7 +75,7 @@

    Package documentation dscore-package

    -

    dscore: D-score for Child Development

    +

    D-score for child development

    Identify whether your milestones are supported

    Functions to identify supported milestones and instruments.

    @@ -95,6 +104,10 @@

    Get your data into shape rename_gcdg_gsed()

    Rename items from gcdg into gsed lexicon

    + +

    rename_vector()

    + +

    Rename character vector

    sort_itemnames() order_itemnames()

    @@ -117,12 +130,12 @@

    Calculate D-score and DAZ

    Working with references

    -

    Specification of the imputation models can be made more convenient using the following set of helpers.

    +

    Specification of the models can be made more convenient using the following set of helpers.

    daz() zad()

    -

    D-score standard deviation score: DAZ

    +

    Calculate Development-for-Age Z-score (DAZ)

    get_reference()

    @@ -131,11 +144,19 @@

    Working with references get_age_equivalent()

    Get age equivalents of items that have a difficulty estimate

    + +

    get_mu()

    + +

    Median D-score from the base population for a given key

    Internal functions

    -

    While documented, these internal functions should not be called directly.

    +

    For research purposes only.

    +

    count_mu()

    + +

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

    +

    count_mu_dutch()

    Median of Dutch references

    @@ -148,9 +169,9 @@

    Internal functions

    Median of phase1 references

    -

    count_mu_phase1_healthy()

    +

    count_mu_preliminary_standards()

    -

    Median of phase1_healthy references

    +

    Median of preliminary_standards

    posterior()

    @@ -164,17 +185,25 @@

    Datasets

    builtin_itemtable

    +

    builtin_keys

    -

    Global Scale for Early Development - itemtable

    +

    Available keys for calculating the D-score

    builtin_itembank

    -

    Built-in itembank

    +

    Collection of items fitting the Rasch model

    + +

    builtin_itemtable

    + +

    Collection of items from instruments measuring early child development

    builtin_references

    -

    Age-conditional reference distribution of D-score

    +

    Collection of age-conditional reference distributions

    + +

    builtin_translate

    + +

    A table to translate between different lexicons (naming schema)

    milestones

    @@ -195,6 +224,10 @@

    Datasets sample_hf

    Sample of 10 children from GSED HF

    + +

    triple

    + +

    Sample of 50 children measured with three instruments

    - - + + diff --git a/docs/reference/milestones.html b/docs/reference/milestones.html index e1bfb675..a107049e 100644 --- a/docs/reference/milestones.html +++ b/docs/reference/milestones.html @@ -4,7 +4,7 @@ - +
    @@ -29,7 +29,7 @@
  • Changelog @@ -45,14 +54,14 @@
  • - +
    @@ -155,19 +164,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/normalize.html b/docs/reference/normalize.html index 7c7a3ead..ceeb9ca8 100644 --- a/docs/reference/normalize.html +++ b/docs/reference/normalize.html @@ -3,7 +3,7 @@ - +
    @@ -28,7 +28,7 @@
  • Changelog @@ -44,14 +53,14 @@
  • - +
    @@ -71,20 +80,20 @@

    Normalize distribution

    Arguments

    -
    d
    + + +
    d

    A vector with length(qp) elements representing the unscaled density at each quadrature point.

    -
    qp
    +
    qp

    Vector of equally spaced quadrature points.

    Value

    - - -

    A vector of length(d) elements with +

    A vector of length(d) elements with the prior density estimate at each quadature point.

    @@ -109,19 +118,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/order_itemnames.html b/docs/reference/order_itemnames.html new file mode 100644 index 00000000..cb48c52c --- /dev/null +++ b/docs/reference/order_itemnames.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/reference/posterior.html b/docs/reference/posterior.html index 19e5d9c9..dfb40af8 100644 --- a/docs/reference/posterior.html +++ b/docs/reference/posterior.html @@ -3,7 +3,7 @@ - +
    @@ -28,7 +28,7 @@
  • Changelog @@ -44,14 +53,14 @@
  • - +
    @@ -66,34 +75,36 @@

    Calculate posterior for one item given score, difficulty and prior

    -
    posterior(score, tau, prior, qp)
    +
    posterior(score, tau, prior, qp, scale)

    Arguments

    -
    score
    + + +
    score

    Integer, either 0 (fail) and 1 (pass)

    -
    tau
    +
    tau

    Numeric, difficulty parameter

    -
    prior
    +
    prior

    Vector of prior values on quadrature points qp

    -
    qp
    +
    qp

    vector of equally spaced quadrature points

    + +
    scale
    +

    expansion relative to the logit scale

    +

    Value

    - - -

    A vector of length length(prior)

    - - +

    A vector of length length(prior)

    Details

    @@ -122,19 +133,19 @@

    Author

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/rename_gcdg_gsed.html b/docs/reference/rename_gcdg_gsed.html index 3e4bfc70..57771637 100644 --- a/docs/reference/rename_gcdg_gsed.html +++ b/docs/reference/rename_gcdg_gsed.html @@ -4,7 +4,7 @@ - +
    @@ -29,7 +29,7 @@
  • Changelog @@ -45,14 +54,14 @@
  • - +
    @@ -73,20 +82,20 @@

    Rename items from gcdg into gsed lexicon

    Arguments

    -
    x
    + + +
    x

    A character vector containing item names in the gcdg lexicon

    -
    copy
    +
    copy

    A logical indicating whether any unmatches names should be copied (copy = TRUE) or set to an empty string.

    Value

    - - -

    A character vector of length length(x) with gcdg +

    A character vector of length length(x) with gcdg item names replaced by gsed item name.

    @@ -132,19 +141,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/rename_vector.html b/docs/reference/rename_vector.html new file mode 100644 index 00000000..a575cf07 --- /dev/null +++ b/docs/reference/rename_vector.html @@ -0,0 +1,199 @@ + +Rename character vector — rename_vector • dscore + + +
    +
    + + + +
    +
    + + +
    +

    Translates names between different lexicons (naming schema).

    +
    + +
    +
    rename_vector(
    +  input,
    +  lexin = c("phase2", "phase1", "short1", "short2", "gsed", "gsed2", "gsed3"),
    +  lexout = c("gsed3", "gsed2", "gsed", "short2", "short1", "phase1", "phase2"),
    +  notfound = "copy",
    +  contains = c("", "Ma_SF_", "Ma_LF_", "bsid_"),
    +  underscore = TRUE,
    +  trim = "Ma_",
    +  lowercase = TRUE,
    +  force_subjid_agedays = FALSE
    +)
    +
    + +
    +

    Arguments

    + + +
    input
    +

    A character vector with names to be translated

    + + +
    lexin
    +

    A string indicating the input lexicon. One of "phase1", +"phase2", "short1", "short2", "gsed", "gsed2" or "gsed3". +Default is "phase2", which orders item names according to the +published 2023 version of the SF and LF instruments.

    + + +
    lexout
    +

    A string indicating the output lexicon. One of "phase1", +"phase2", "short1", "short2", "gsed", "gsed2", "gsed3". +Default is "gsed3". The default output "gsed3" applies instrument +codes gs1 (SF) and gl1 (LF), which can be understood by the dscore +package.

    + + +
    notfound
    +

    A string indicating what to do some input value is not found

    + + +
    contains
    +

    A string to filter the translation table prior to matching. +Needed to prevent double matches. The default ("") does not filter.

    + + +
    underscore
    +

    Replaces space (" ") and dash ("-") by underscore ("_")

    + + +
    trim
    +

    A substring to be removed from input. Defaults to "Ma_".

    + + +
    lowercase
    +

    Sets all variables in lower case. +in lexin? The default notfound = "copy" copies the input values into the +output value. In other cases (e.g. "" or NA_character_), the function +uses the string specified in notfound as a replacement value.

    + + +
    force_subjid_agedays
    +

    If TRUE, forces the output to have "subjid" +and "agedays" as names for the "ID" and "age", respectively.

    + +
    +
    +

    Value

    +

    A character vector of the same length as input with processed +names.

    +
    +
    +

    Details

    +

    The recommended approach for reading new data is to name the columns +according to the names defined by "short2" and the apply rename_vector() +to translate the names to the "gsed3" lexicon.

    +

    The lexicons "phase1", "short1", "gsed" and "gsed2" are included +for backward compatibility, and are not recommended for use with new +data.

    +
    + +
    +

    Examples

    +
    # Using Ma_SF_Cxx as input names, 2023 SF/LF version
    +input <- c("file", "GSED_ID", "Ma_SF_Parent ID", "Ma_SF_C01", "Ma_SF_C02")
    +rename_vector(input)
    +#> [1] "file"         "gsed_id"      "sf_parent_id" "gs1sec001"    "gs1moc002"   
    +rename_vector(input, lexout = "short2", lowercase = FALSE)
    +#> [1] "file"         "GSED_ID"      "SF_Parent_ID" "SF001"        "SF002"       
    +rename_vector(input, lexout = "gsed3", trim = "Ma_SF_")
    +#> [1] "file"      "gsed_id"   "parent_id" "gs1sec001" "gs1moc002"
    +
    +# Convert short names to gsed names
    +input <- c("file", "GSED_ID", "Ma_SF_Parent ID", paste0("SF00", 1:3))
    +rename_vector(input, lexin = "short2", lowercase = TRUE)
    +#> [1] "file"         "gsed_id"      "sf_parent_id" "gs1sec001"    "gs1moc002"   
    +#> [6] "gs1sec003"   
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.3.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/sample_hf.html b/docs/reference/sample_hf.html index dddf456c..80644abf 100644 --- a/docs/reference/sample_hf.html +++ b/docs/reference/sample_hf.html @@ -4,7 +4,7 @@ - +
    @@ -29,7 +29,7 @@
  • Changelog @@ -45,14 +54,14 @@
  • - +
    @@ -73,7 +82,12 @@

    Sample of 10 children from GSED HF

    Format

    -

    A data.frame with 10 rows and 57 variables:

    NameLabel
    subjidInteger, child ID
    agedaysInteger, age in days
    hf001Integer, ...: 1 = yes, 0 = no, NA = not administered
    hf002Integer, ...: 1 = yes, 0 = no, NA = not administered
    ...and so on..

    Sample data for 55 gpa items forming GSED HF V1

    +

    A data.frame with 10 rows and 50 variables:

    NameLabel
    subjidInteger, child ID
    agedaysInteger, age in days
    hf001Integer, ...: 1 = yes, 0 = no, NA = not administered
    hf002Integer, ...: 1 = yes, 0 = no, NA = not administered
    ...and so on..

    Sample data for 48 gpa items forming GSED HF V1

    +
    +
    +

    Note

    +

    The HF item set was revised on October 20, 2025 to contain 48 items. +This dataset reflects that change.

    See also

    @@ -86,38 +100,31 @@

    Examples

    #> subjid agedays hf001 hf002 hf003 hf004 hf005 hf006 hf007 hf008 hf009 hf010 #> 1 1 811 NA NA NA NA NA NA NA NA NA NA #> 2 2 898 NA NA NA NA NA NA NA NA NA NA -#> 3 3 203 NA NA NA NA NA NA NA NA NA NA +#> 3 3 203 NA NA NA NA NA NA 1 1 1 NA #> 4 4 966 NA NA NA NA NA NA NA NA NA NA #> 5 8 770 NA NA NA NA NA NA NA NA NA NA -#> 6 9 306 NA NA NA NA NA NA NA NA NA NA +#> 6 9 306 NA NA NA NA NA NA 1 1 1 NA #> hf011 hf012 hf013 hf014 hf015 hf016 hf017 hf018 hf019 hf020 hf021 hf022 hf023 #> 1 NA NA NA NA NA NA NA NA NA NA NA NA NA #> 2 NA NA NA NA NA NA NA NA NA NA NA NA NA -#> 3 NA NA NA 1 1 1 1 1 1 1 1 1 1 +#> 3 1 NA 1 1 1 1 1 1 1 1 1 1 0 #> 4 NA NA NA NA NA NA NA NA NA NA NA NA NA #> 5 NA NA NA NA NA NA NA NA NA NA NA NA NA -#> 6 NA NA NA 1 1 1 1 1 1 1 1 1 1 +#> 6 1 NA 1 1 1 0 1 1 1 1 1 1 1 #> hf024 hf025 hf026 hf027 hf028 hf029 hf030 hf031 hf032 hf033 hf034 hf035 hf036 #> 1 NA NA NA NA NA NA NA NA NA NA NA NA NA #> 2 NA NA NA NA NA NA NA NA NA NA NA NA NA -#> 3 1 1 1 1 1 1 0 1 0 0 1 0 NA +#> 3 1 0 0 1 0 NA 0 NA 0 0 0 0 NA #> 4 NA NA NA NA NA NA NA NA NA NA NA NA NA #> 5 NA NA NA NA NA NA NA NA NA NA NA NA NA -#> 6 1 1 1 1 1 1 1 1 1 1 1 0 0 -#> hf037 hf038 hf039 hf040 hf041 hf042 hf043 hf044 hf045 hf046 hf047 hf048 hf049 -#> 1 NA NA NA NA NA NA NA NA NA NA 1 1 NA -#> 2 NA NA NA NA NA NA NA NA NA NA 1 1 NA -#> 3 0 NA 0 0 0 0 NA 0 0 NA NA NA NA -#> 4 NA NA NA NA NA NA NA NA NA NA NA NA NA -#> 5 NA NA NA NA NA NA NA NA NA NA 1 1 NA -#> 6 0 NA 0 0 0 0 NA 0 0 NA NA NA NA -#> hf050 hf051 hf052 hf053 hf054 hf055 -#> 1 1 1 1 0 1 0 -#> 2 1 1 1 1 1 1 -#> 3 NA NA NA NA NA NA -#> 4 NA NA NA 1 1 1 -#> 5 1 1 1 1 1 NA -#> 6 NA NA NA NA NA NA +#> 6 1 1 1 1 0 0 0 NA 0 0 0 0 NA +#> hf037 hf038 hf039 hf040 hf041 hf042 hf043 hf044 hf045 hf046 hf047 hf048 +#> 1 NA NA NA 1 1 NA 1 1 1 0 1 0 +#> 2 NA NA NA 1 1 NA 1 1 1 1 1 1 +#> 3 0 0 NA NA NA NA NA NA NA NA NA NA +#> 4 NA NA NA NA NA NA NA NA NA 1 1 1 +#> 5 NA NA NA 1 1 NA 1 1 1 1 1 NA +#> 6 0 0 NA NA NA NA NA NA NA NA NA NA
    @@ -128,19 +135,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/sample_lf.html b/docs/reference/sample_lf.html index a215e571..5f6a9be5 100644 --- a/docs/reference/sample_lf.html +++ b/docs/reference/sample_lf.html @@ -4,7 +4,7 @@ - +
    @@ -29,7 +29,7 @@
  • Changelog @@ -45,14 +54,14 @@
  • - +
    @@ -184,19 +193,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/sample_sf.html b/docs/reference/sample_sf.html index 799b84e4..645e4fcd 100644 --- a/docs/reference/sample_sf.html +++ b/docs/reference/sample_sf.html @@ -4,7 +4,7 @@ - +
    @@ -29,7 +29,7 @@
  • Changelog @@ -45,14 +54,14 @@
  • - +
    @@ -74,6 +83,10 @@

    Sample of 10 children from gpa (SF)

    Format

    A data.frame with 10 rows and 141 variables:

    NameLabel
    subjidInteger, child ID
    agedaysInteger, age in days
    sf001Integer, Cry when hungry...: 1 = yes, 0 = no, NA = not administered
    sf002Integer, Look at/focus...: 1 = yes, 0 = no, NA = not administered
    ...and so on..

    Sample data for 139 gpa items from GSED SF

    +

    #' @details +On July 15, 2025, the item gpaclc088 was renamed to gpaclc089 +(Can you child say five or more separate words) and gpasec089 was renamed +to gpasec088 (Is your child able to pee and poo).

    See also

    @@ -170,19 +183,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/sort_itemnames.html b/docs/reference/sort_itemnames.html index 4fa76d57..aba50d07 100644 --- a/docs/reference/sort_itemnames.html +++ b/docs/reference/sort_itemnames.html @@ -5,7 +5,7 @@ - +
    @@ -30,7 +30,7 @@
  • Changelog @@ -46,14 +55,14 @@
  • - +
    @@ -77,11 +86,13 @@

    Sorts item names according to user-specified priority

    Arguments

    -
    x
    + + +
    x

    A character vector containing item names (gsed lexicon)

    -
    order
    +
    order

    A four-letter string specifying the sorting order. The four letters are: i for instrument, d for domain, m for mode and n for number. The default is @@ -90,9 +101,7 @@

    Arguments

    Value

    - - -

    sort_itemnames() return a character vector with +

    sort_itemnames() return a character vector with length(x) sorted elements. order_itemnames() return an integer vector of length length(x) with positions of the sorted elements.

    @@ -121,19 +130,19 @@

    Examples

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.3.

    - - + + diff --git a/docs/reference/triple.html b/docs/reference/triple.html new file mode 100644 index 00000000..558f60e5 --- /dev/null +++ b/docs/reference/triple.html @@ -0,0 +1,157 @@ + +Sample of 50 children measured with three instruments — triple • dscore + + +
    +
    + + + +
    +
    + + +
    +

    An example dataset with developmental scores at the item level for +50 random children from the GSED Validation Study (Cavellera et al, 2023). +Each child has measurements from GSED SF (gs1), GSED LF (gl1) and +BSID-III (by3).

    +
    + +
    +
    triple
    +
    + +
    +

    Format

    +

    A data.frame with 50 rows and 559 variables:

    NameLabel
    idInteger, child ID
    ageNumeric, age in decimal years
    agedaysInteger, age in days
    gs1sec001Integer, SF001 Does your child smile?
    gs1moc002Integer, SF002 When lying on his/her back, ...
    ...and so on..

    The dataset contains 138 items from GSED SF (gs1), +(item gs1moc028 was skipped), 155 items from GSED LF (gl1), +and 263 (out of 326) items from BSID-III (by3).

    +
    +
    +

    References

    +

    Cavallera et al. (2023). Protocol for validation of the Global +Scales for Early Development (GSED) for children under 3 years of +age in seven countries. BMJ Open, 13(1), e062562. +DOI: 10.1136/bmjopen-2022-062562. +https://bmjopen.bmj.com/content/13/1/e062562

    +

    World Health Organization (WHO) (2023). Global Scales for Early +Development (GSED) V1.0: Technical Report. Geneva: World Health +Organization. +https://www.who.int/publications/i/item/WHO-MSD-GSED-package-v1.0-2023.1

    +
    +
    +

    See also

    + +
    + +
    +

    Examples

    +
    # calculate D-score from all instruments
    +ds_all <- dscore(triple)
    +head(ds_all)
    +#>        a   n      p     d       sem    daz
    +#> 1 1.9493 200 0.6050 66.62 0.6909583  0.527
    +#> 2 2.5325 147 0.6463 73.00 0.7293837  0.509
    +#> 3 2.3874 163 0.5153 64.92 0.7418813 -1.200
    +#> 4 0.8980 274 0.4124 43.78 0.8729957 -0.862
    +#> 5 2.1903 150 0.4533 59.58 0.7704544 -1.933
    +#> 6 0.8980 216 0.6759 51.06 0.7463839  1.380
    +# calculate D-score from only GSED SF items
    +ds_sf <- dscore(triple, items = get_itemnames(instrument = "gs1"))
    +head(ds_sf)
    +#>        a  n      p     d      sem    daz
    +#> 1 1.9493 65 0.6769 68.95 1.210561  1.186
    +#> 2 2.5325 34 0.7059 73.23 1.458141  0.572
    +#> 3 2.3874 36 0.5833 65.89 1.404537 -0.966
    +#> 4 0.8980  8 0.5000 38.64 2.527097 -2.228
    +#> 5 2.1903 31 0.2258 57.84 1.605532 -2.289
    +#> 6 0.8980 80 0.7625 54.78 1.325298  2.517
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.3.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/zad.html b/docs/reference/zad.html new file mode 100644 index 00000000..7821db5a --- /dev/null +++ b/docs/reference/zad.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 49fc1c3a..f610fc37 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -1,111 +1,47 @@ - - - - https://d-score.github.io/dscore/404.html - - - https://d-score.github.io/dscore/LICENSE.html - - - https://d-score.github.io/dscore/articles/getting_started.html - - - https://d-score.github.io/dscore/articles/index.html - - - https://d-score.github.io/dscore/articles/scoring_GSED.html - - - https://d-score.github.io/dscore/authors.html - - - https://d-score.github.io/dscore/index.html - - - https://d-score.github.io/dscore/news/index.html - - - https://d-score.github.io/dscore/reference/builtin_itembank.html - - - https://d-score.github.io/dscore/reference/builtin_itemtable.html - - - https://d-score.github.io/dscore/reference/builtin_references.html - - - https://d-score.github.io/dscore/reference/calculate_posterior.html - - - https://d-score.github.io/dscore/reference/count_mu_dutch.html - - - https://d-score.github.io/dscore/reference/count_mu_gcdg.html - - - https://d-score.github.io/dscore/reference/count_mu_phase1.html - - - https://d-score.github.io/dscore/reference/count_mu_phase1_healthy.html - - - https://d-score.github.io/dscore/reference/daz.html - - - https://d-score.github.io/dscore/reference/decompose_itemnames.html - - - https://d-score.github.io/dscore/reference/dscore-package.html - - - https://d-score.github.io/dscore/reference/dscore.html - - - https://d-score.github.io/dscore/reference/get_age_equivalent.html - - - https://d-score.github.io/dscore/reference/get_itemnames.html - - - https://d-score.github.io/dscore/reference/get_itemtable.html - - - https://d-score.github.io/dscore/reference/get_labels.html - - - https://d-score.github.io/dscore/reference/get_reference.html - - - https://d-score.github.io/dscore/reference/get_tau.html - - - https://d-score.github.io/dscore/reference/gsample.html - - - https://d-score.github.io/dscore/reference/index.html - - - https://d-score.github.io/dscore/reference/milestones.html - - - https://d-score.github.io/dscore/reference/normalize.html - - - https://d-score.github.io/dscore/reference/posterior.html - - - https://d-score.github.io/dscore/reference/rename_gcdg_gsed.html - - - https://d-score.github.io/dscore/reference/sample_hf.html - - - https://d-score.github.io/dscore/reference/sample_lf.html - - - https://d-score.github.io/dscore/reference/sample_sf.html - - - https://d-score.github.io/dscore/reference/sort_itemnames.html - + +https://d-score.github.io/dscore/404.html +https://d-score.github.io/dscore/articles/custom_priors.html +https://d-score.github.io/dscore/articles/getting_started.html +https://d-score.github.io/dscore/articles/index.html +https://d-score.github.io/dscore/articles/multiple_keys.html +https://d-score.github.io/dscore/articles/scoring_GSED.html +https://d-score.github.io/dscore/articles/using_DAZ.html +https://d-score.github.io/dscore/authors.html +https://d-score.github.io/dscore/index.html +https://d-score.github.io/dscore/news/index.html +https://d-score.github.io/dscore/reference/builtin_itembank.html +https://d-score.github.io/dscore/reference/builtin_itemtable.html +https://d-score.github.io/dscore/reference/builtin_keys.html +https://d-score.github.io/dscore/reference/builtin_references.html +https://d-score.github.io/dscore/reference/builtin_translate.html +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 +https://d-score.github.io/dscore/reference/count_mu_gcdg.html +https://d-score.github.io/dscore/reference/count_mu_phase1.html +https://d-score.github.io/dscore/reference/count_mu_preliminary_standards.html +https://d-score.github.io/dscore/reference/daz.html +https://d-score.github.io/dscore/reference/decompose_itemnames.html +https://d-score.github.io/dscore/reference/dscore-package.html +https://d-score.github.io/dscore/reference/dscore.html +https://d-score.github.io/dscore/reference/get_age_equivalent.html +https://d-score.github.io/dscore/reference/get_itemnames.html +https://d-score.github.io/dscore/reference/get_itemtable.html +https://d-score.github.io/dscore/reference/get_labels.html +https://d-score.github.io/dscore/reference/get_mu.html +https://d-score.github.io/dscore/reference/get_reference.html +https://d-score.github.io/dscore/reference/get_tau.html +https://d-score.github.io/dscore/reference/gsample.html +https://d-score.github.io/dscore/reference/index.html +https://d-score.github.io/dscore/reference/milestones.html +https://d-score.github.io/dscore/reference/normalize.html +https://d-score.github.io/dscore/reference/posterior.html +https://d-score.github.io/dscore/reference/rename_gcdg_gsed.html +https://d-score.github.io/dscore/reference/rename_vector.html +https://d-score.github.io/dscore/reference/sample_hf.html +https://d-score.github.io/dscore/reference/sample_lf.html +https://d-score.github.io/dscore/reference/sample_sf.html +https://d-score.github.io/dscore/reference/sort_itemnames.html +https://d-score.github.io/dscore/reference/triple.html + diff --git a/inst/CITATION b/inst/CITATION index 623e1484..895931cd 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -1,12 +1,66 @@ -citHeader("To cite dscore in publications use:") +citHeader("To cite the dscore package in publications, please use:") -citEntry( - entry = "Manual", - title = "D-score for Child Development", - author = as.person("S. van Buuren [aut], I. Eekhout [aut], A. Huizing [aut]"), - year = "2020", - note = "R package version 1.0.0", - url = "https://github.com/d-score/dscore", - key = "dscore-package", - textVersion = "Van Buuren S, Eekhout I, Huizing A (2020). D-score for Child Development. The dscore R package, version 1.0.0." +bibentry( + bibtype = "Manual", + title = "dscore: D-score for Child Development", + author = c( + person( + "Stef", + "van Buuren", + role = c("cre", "aut"), + comment = "ORCID: 0000-0003-1098-2119" + ), + person( + "Iris", + "Eekhout", + role = "aut", + comment = "ORCID: 0000-0002-0030-1458" + ), + person( + "Arjan", + "Huizing", + role = "aut", + comment = "ORCID: 0000-0002-2385-6800" + ), + person( + "Jonathan", + "Seiden", + role = "aut", + comment = "ORCID: 0000-0002-0318-8016" + ) + ), + year = "2025", + note = "R package version 2.0.0", + url = "https://CRAN.R-project.org/package=dscore", + key = "dscore-package" +) + +bibentry( + bibtype = "Article", + title = "Enhancing comparability in early child development assessment with the D-score", + author = c( + person("Stef", "van Buuren"), + person("Iris", "Eekhout"), + person("Gareth", "McCray"), + person("Gillian A.", "Lancaster"), + person("Matthew R.", "Waldman"), + person("Dana C.", "McCoy"), + person("Melissa", "Gladstone"), + person("Vanessa", "Cavallera"), + person("Tarun", "Dua"), + person("Maureen M.", "Black"), + person("GSED Team", role = "aut") + ), + journal = "International Journal of Behavioral Development", + year = "2025", + volume = "49", + number = "4", + pages = "348-364", + doi = "10.1177/01650254241294033", + url = "https://doi.org/10.1177/01650254241294033", + key = "vanBuuren2025-dscore" +) + +citFooter( + "For the underlying methodology, please cite van Buuren et al. (2025), International Journal of Behavioral Development, 49(4), 348-364." ) diff --git a/man/builtin_itembank.Rd b/man/builtin_itembank.Rd index fba7a6a2..850cced8 100644 --- a/man/builtin_itembank.Rd +++ b/man/builtin_itembank.Rd @@ -3,11 +3,11 @@ \docType{data} \name{builtin_itembank} \alias{builtin_itembank} -\title{Built-in itembank} +\title{Collection of items fitting the Rasch model} \format{ A \code{data.frame} with variables:\tabular{ll}{ Name \tab Label \cr - \code{key} \tab String indicating a specific Rasch model (the key) \cr + \code{key} \tab String indicating a specific Rasch model \cr \code{item} \tab Item name, gsed lexicon \cr \code{tau} \tab Difficulty estimate \cr \code{label} \tab Label (English) \cr @@ -21,30 +21,35 @@ A \code{data.frame} with variables:\tabular{ll}{ builtin_itembank } \description{ -A data frame with administrative information per item. Includes -only items that are part of a Rasch model. -See \link{builtin_itemtable} for an overview of all currently -defined items. +A data frame with administrative information per item with difficulty +estimates (\code{tau}) from the Rasch model. The item bank provides the basic +information to calculate D-scores. The items in the item bank +are a subset of all items as collected in \link{builtin_itemtable}. } \details{ -In general, one can only compare D-score calculated with the same -key. The current recommendation for new projects is to choose -key \code{gsed2212}. +The difficulty estimates were estimated by a Rasch model. The \code{key} +indicates the specific Rasch model used to estimate the difficulty. +Strictly speaking, one can only compare D-score calculated from the +same \code{key}. } \note{ -Last update: +Updates: \itemize{ \item Dec 01, 2022 - Overwrite labels of gto by correct item order. \item Dec 05, 2022 - Adds key \code{gsed2212}, adding instruments \code{gl1} and \code{gs1}, and defining correct order for \code{gto} \item Jan 05, 2023 - Adds instrument \code{gh1} to key \code{gsed2212} +\item Oct 10, 2025 - Adds key \code{gsed2510} for instruments \code{gl1} and \code{gs1} (281 items) +\item Oct 21, 2025 - Updates keys \code{gsed2212}, \code{gsed2406} for \code{gh1} (55 -> 48 items) +\item Oct 21, 2025 - Adds \code{gh1} extension to key \code{gsed2510} (48 items) +\item Oct 23, 2025 - Adds \code{by3} extension to key \code{gsed2510} (242 items) } } \examples{ -head(builtin_itembank) +# count number of items per instrument in each key +table(builtin_itembank$instrument, builtin_itembank$key) } \seealso{ -\code{\link[=dscore]{dscore()}}, \code{\link[=get_tau]{get_tau()}}, -\code{\link[=builtin_itemtable]{builtin_itemtable()}} +\code{\link[=dscore]{dscore()}}, \code{\link[=get_tau]{get_tau()}}, \code{\link[=builtin_itemtable]{builtin_itemtable()}} } \keyword{datasets} diff --git a/man/builtin_itemtable.Rd b/man/builtin_itemtable.Rd index bcf210f0..0c5f3faa 100644 --- a/man/builtin_itemtable.Rd +++ b/man/builtin_itemtable.Rd @@ -3,7 +3,7 @@ \docType{data} \name{builtin_itemtable} \alias{builtin_itemtable} -\title{Global Scale for Early Development - itemtable} +\title{Collection of items from instruments measuring early child development} \format{ A \code{data.frame} with variables:\tabular{ll}{ Name \tab Label \cr @@ -16,28 +16,29 @@ A \code{data.frame} with variables:\tabular{ll}{ builtin_itemtable } \description{ -The built-in variable named \code{builtin_itemtable} -contains descriptions of all items found in the \code{gsed} -data. +The built-in variable \code{builtin_itemtable} contains the name and label +of items for measuring early child development. } \details{ -Data are collected by the members of the Global Scales for Early -Development (GSED) group. -The \code{itemtable} is created by \verb{\\\\data-raw\\\\R\\\\save_builtin_itemtable.R}. +The \code{builtin_itemtable} is created by script +\code{data-raw/R/save_builtin_itemtable.R}. -Last update: +Updates: \itemize{ \item May 30, 2022 - added gto (LF) and gpa (SF) items \item June 1, 2022 - added seven gsd items \item Nov 24, 2022 - Added instruments gs1, gs2 -\item Dec 01, 2022 - Labels of gto replaced by correct order. This change invalidates -any analyses done on LF done after May 30, 2022 !!! +\item Dec 01, 2022 - Labels of gto replaced by correct order. +Incorrect item order affects analyses done on LF between 20220530 - 20221201 !!! \item Dec 05, 2022 - Redefines gs1 and instrument for Phase 2, removes gs2 (139) Adds gl1 (Long Form Phase 2 items 155) \item Jan 05, 2023 - Adds 55 items from GSED-HF +\item Jul 15, 2025 - Rename gpaclc088 --> gpaclc089 (Can you child say five or more separate words) +Rename gpasec089 --> gpasec088 (Is your child able to pee and poo) +\item Oct 20, 2025 Replace HF 55 items list by HF 48 item list } } \author{ -Compiled by Stef van Buuren +Compiled by Stef van Buuren using different sources } \keyword{datasets} diff --git a/man/builtin_keys.Rd b/man/builtin_keys.Rd new file mode 100644 index 00000000..bea90ffe --- /dev/null +++ b/man/builtin_keys.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/builtin_keys.R +\docType{data} +\name{builtin_keys} +\alias{builtin_keys} +\title{Available keys for calculating the D-score} +\format{ +\code{builtin_keys} is a \code{data.frame} with variables:\tabular{ll}{ + Name \tab Label \cr + \code{key} \tab String. Name of the key indicating the Rasch model \cr + \code{base_population} \tab String. Name of the base population for the key \cr + \code{n_items} \tab Number of items in the key \cr + \code{n_instruments} \tab Number of instruments in the key \cr + \code{intercept} \tab Intercept to convert logit into D-score \cr + \code{slope} \tab Slope to convert logit into D-score \cr + \code{from} \tab Starting value of the quadrature points \cr + \code{to} \tab Stopping value of the quadrature points \cr + \code{by} \tab Increment of the quadrature points \cr + \code{retired} \tab Has the key been retired? \cr +} +} +\usage{ +builtin_keys +} +\description{ +A key contains the item difficulty estimates from a given Rasch model. +The difficulty estimates (\code{tau}) within a given key are used to +calculate D-scores. D-scores can only be compared when calculated +from the same key. +} +\note{ +Updated: 20251023 SvB: Added \code{builtin_keys} table by +\verb{data-raw\\data\\R\\save_builtin_keys.R} +} +\keyword{datasets} diff --git a/man/builtin_references.Rd b/man/builtin_references.Rd index 9c7fce27..648f71ef 100644 --- a/man/builtin_references.Rd +++ b/man/builtin_references.Rd @@ -3,34 +3,31 @@ \docType{data} \name{builtin_references} \alias{builtin_references} -\title{Age-conditional reference distribution of D-score} +\title{Collection of age-conditional reference distributions} \format{ -A \code{data.frame} with 18 variables:\tabular{ll}{ +A \code{data.frame} with the following variables:\tabular{ll}{ Name \tab Label \cr - \code{pop} \tab Population: \code{"dutch"}, \code{"gcdg"}, \code{"phase1"}, \code{"phase1_healthy"}, \cr + \code{population} \tab Name of the reference population \cr + \code{key} \tab D-score key, e.g., \code{"dutch"}, \code{"gcdg"} or \code{"gsed"} \cr + \code{distribution} \tab Distribution family: \code{"LMS"} or \code{"BCT"} \cr + \code{age} \tab Decimal age in years \cr + \code{mu} \tab M-curve, median D-score, P50 \cr + \code{sigma} \tab S-curve, spread expressed as coefficient of variation \cr + \code{nu} \tab L-curve, the lambda coefficient of the LMS/BCT model for skewness \cr + \code{tau} \tab Kurtosis parameter in the BCT model \cr + \code{P3} \tab P3 percentile \cr + \code{P10} \tab P10 percentile \cr + \code{P25} \tab P25 percentile \cr + \code{P50} \tab P50 percentile \cr + \code{P75} \tab P75 percentile \cr + \code{P90} \tab P90 percentile \cr + \code{P97} \tab P97 percentile \cr + \code{SDM2} \tab -2SD centile \cr + \code{SDM1} \tab -1SD centile \cr + \code{SD0} \tab 0SD centile, median \cr + \code{SDP1} \tab +1SD centile \cr + \code{SDP2} \tab +2SD centile \cr } - - -\if{html}{\out{
    }}\preformatted{ `"dutch_gsed2212"` | -}\if{html}{\out{
    }} - -| \code{age} | Decimal age in years | -| \code{mu} | M-curve, median D-score, P50 | -| \code{sigma} | S-curve, spread expressed as coefficient of variation | -| \code{nu} | L-curve, the lambda coefficient of the LMS/BCT model for skewness | -| \code{tau} | Kurtosis parameter in the BCT model | -| \code{P3} | P3 percentile | -| \code{P10} | P10 percentile | -| \code{P25} | P25 percentile | -| \code{P50} | P50 percentile | -| \code{P75} | P75 percentile | -| \code{P90} | P90 percentile | -| \code{P97} | P97 percentile | -| \code{SDM2} | -2SD centile | -| \code{SDM1} | -1SD centile | -| \code{SD0} | 0SD centile, median | -| \code{SDP1} | +1SD centile | -| \code{SDP2} | +2SD centile | } \usage{ builtin_references @@ -42,24 +39,34 @@ after the LMS distribution (Cole & Green, 1992) or BCT model (Stasinopoulos & Rigby, 2022) and is equal for both boys and girls. The LMS/BCT values can be used to graph reference charts and to calculate age-conditional Z-scores, also -known as DAZ. +known as the \emph{Development-for-Age Z-score (DAZ)}. } \details{ +Here are more details on the reference population: The \code{"dutch"} references were calculated from the SMOCC data, and cover age range 0-2.5 years (van Buuren, 2014). + The \code{"gcdg"} references were calculated from the 15 cohorts of the GCDG-study, and cover age range 0-5 years (Weber, 2019). + The \code{"phase1"} references were calculated from the GSED Phase 1 validation data (GSED-BGD, GSED-PAK, GSED-TZA) cover age range 2w-3.5 years. The -age range 3.5-5 yrs is linearly extrapolated and are only indicative. -The \code{"phase1_healthy"} references were calculated from the GSED Phase 1 validation +age range 3.5-5 yrs is linearly extrapolated and is only indicative. + +The \code{"preliminary_standards"} were calculated from the GSED Phase 1 validation data (GSED-BGD, GSED-PAK, GSED-TZA) using a subset of children with -healthy development. -The \code{"dutch_gsed2212"} references were calculated from Dutch data using -the \code{gsed2212} key. This is a temporary name, and will be deprecated. +covariate indicating healthy development. + +The \code{"who_descriptive"} references were calculated from the GSED Phase 1 & 2 +validation data (GSED-BGD, GSED-BRA, GSED_CHN, GSED-CIV, GSED-NLD, GSED-PAK, +GSED-TZA) cover age range 2w-3.5 years. The age range 3.5-5 yrs is linearly +extrapolated and is only indicative. The source code for the relevant +calculations can be found in \url{https://github.com/D-score/gsedscripts/blob/main/inst/scripts/phase2/models/purify.R} +and \url{https://github.com/D-score/gsedscripts/blob/main/inst/scripts/phase2/models/fit_core_model.R}. } \examples{ -head(builtin_references) +# get an overview of available references per key +table(builtin_references$population, builtin_references$key) } \references{ Cole TJ, Green PJ (1992). Smoothing reference centile curves: The LMS @@ -78,6 +85,12 @@ the early development of infants and toddlers across global settings. BMJ Global Health, BMJ Global Health 4: e001724. \url{https://gh.bmj.com/content/bmjgh/4/6/e001724.full.pdf} +van Buuren S, Eekhout I, McCray G, Lancaster GA, Waldman MR, McCoy DC, +Gladstone M, Cavallera, V, Dua T, Black MM, GSED Team (2025). +Enhancing comparability in early child development assessment with the +D-score. International Journal of Behavioral Development, 49(4), 348-364, +\url{https://doi.org/10.1177/01650254241294033} + Stasinopoulos M, Rigby R (2022). gamlss.dist: Distributions for Generalized Additive Models for Location Scale and Shape, R package version 6.0-3, diff --git a/man/builtin_translate.Rd b/man/builtin_translate.Rd new file mode 100644 index 00000000..5c327783 --- /dev/null +++ b/man/builtin_translate.Rd @@ -0,0 +1,42 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/builtin_translate.R +\docType{data} +\name{builtin_translate} +\alias{builtin_translate} +\title{A table to translate between different lexicons (naming schema)} +\format{ +A \code{data.frame} with variables:\tabular{ll}{ + Name \tab Label \cr + \code{phase1} \tab Item names, Phase 1 data \cr + \code{phase2} \tab Item names, Phase 2 data \cr + \code{gsed} \tab gsed lexion \cr + \code{gsed2} \tab gto/gpa lexicon for LF/SF \cr + \code{gsed3} \tab gl1/gs1 lexicon for LF/SF \cr + \code{short1} \tab Short item name, phase 1 order \cr + \code{short2} \tab Short item name, phase 2 order \cr + \code{instrument} \tab Instrument code \cr + \code{seq_phase1} \tab Phase 1 order \cr + \code{seq_phase2} \tab Phase 2 order \cr + \code{label} \tab Item label (English) \cr +} +} +\usage{ +builtin_translate +} +\description{ +The built-in variable \code{builtin_translate} contains a table for +translating among sets of item names into each other. +} +\details{ +The \code{builtin_translate} is created by script +\code{data-raw/R/save_builtin_translate.R}. + +Updates: +\itemize{ +\item July 2025 - Tranferred from gsedread package +} +} +\author{ +Compiled by Stef van Buuren +} +\keyword{datasets} diff --git a/man/calculate_posterior.Rd b/man/calculate_posterior.Rd index 1d75daa2..d2d5072d 100644 --- a/man/calculate_posterior.Rd +++ b/man/calculate_posterior.Rd @@ -4,7 +4,7 @@ \alias{calculate_posterior} \title{Calculate posterior of ability} \usage{ -calculate_posterior(scores, tau, qp, mu, sd, relhi, rello) +calculate_posterior(scores, tau, qp, scale, mu, sd, relhi, rello) } \arguments{ \item{scores}{A vector with PASS/FAIL observations. @@ -16,6 +16,8 @@ preferred metric/scale.} \item{qp}{Numeric vector of equally spaced quadrature points.} +\item{scale}{Scale expansion} + \item{mu}{Numeric scalar. The mean of the prior.} \item{sd}{Numeric scalar. Standard deviation of the prior.} diff --git a/man/count_mu.Rd b/man/count_mu.Rd new file mode 100644 index 00000000..cfe6f5b1 --- /dev/null +++ b/man/count_mu.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/get_mu.R +\name{count_mu} +\alias{count_mu} +\title{Median D-score from the default references for the given key} +\usage{ +count_mu(t, key, prior_mean_NA = NA_real_) +} +\arguments{ +\item{t}{Decimal age, numeric vector} + +\item{key}{Character, key of the reference population} + +\item{prior_mean_NA}{Numeric, prior mean when age is missing} +} +\value{ +A vector of length \code{length(t)} with the median of the default reference +population for the key. +} +\description{ +Returns the age-interpolated median of the D-score of the default +reference for a given key. +} +\details{ +Do not use this function if you want the median D-score for a specific +reference. + +DEPRECATED in dscore 1.9.6 +} diff --git a/man/count_mu_dutch.Rd b/man/count_mu_dutch.Rd index 535f1e7f..e1637461 100644 --- a/man/count_mu_dutch.Rd +++ b/man/count_mu_dutch.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/count_mu.R +% Please edit documentation in R/get_mu.R \name{count_mu_dutch} \alias{count_mu_dutch} \title{Median of Dutch references} @@ -14,8 +14,8 @@ A vector of length \code{length(t)} with the median of the Dutch references. } \description{ Returns the age-interpolated median of the Dutch references (van Buuren 2014). -The working range is 0-3 years. This function should -be called when the \code{key = "dutch"}. +The working range is 0-3 years. This function is used +to set prior mean under key \code{"dutch"}. } \note{ Internal function. Called by \code{dscore()} diff --git a/man/count_mu_gcdg.Rd b/man/count_mu_gcdg.Rd index 68978513..e51304a5 100644 --- a/man/count_mu_gcdg.Rd +++ b/man/count_mu_gcdg.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/count_mu.R +% Please edit documentation in R/get_mu.R \name{count_mu_gcdg} \alias{count_mu_gcdg} \title{Median of GCDG references} @@ -14,8 +14,8 @@ A vector of length \code{length(t)} with the median of the GCDG references. } \description{ Returns the age-interpolated median of the GCDG references (Weber -et al, 2019). The working range is 0-4 years. This function should -be called when the \code{key = "gsed"} or \code{key = "gcdg"}. +et al, 2019). The working range is 0-4 years. This function is used +to set prior mean under keys \code{"gcdg"} and \code{"gsed1912"}. } \note{ Internal function. Called by \code{dscore()} diff --git a/man/count_mu_phase1.Rd b/man/count_mu_phase1.Rd index 9e45bf1a..c110f7b7 100644 --- a/man/count_mu_phase1.Rd +++ b/man/count_mu_phase1.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/count_mu.R +% Please edit documentation in R/get_mu.R \name{count_mu_phase1} \alias{count_mu_phase1} \title{Median of phase1 references} @@ -14,7 +14,8 @@ A vector of length \code{length(t)} with the median of the GCDG references. } \description{ Returns the age-interpolated median of the phase1 references -based on LF & SF in GSED-BGD, GSED-PAK, GSED-TZA. +based on LF & SF in GSED-BGD, GSED-PAK, GSED-TZA. This function is used +to set prior mean under keys \code{"293_0"} and \code{"gsed2212"}. } \details{ The interpolation is done in two rounds. First round: Calculate D-scores @@ -35,8 +36,6 @@ Linear model: > 3.5 YRS: 61.37967 + 3.83513 t The working range is 0-3.5 years. After the age of 3.5 years, the function will increase at an arbitrary rate of 3.8 D-score points per year. -This function is intended to be called when \code{key = "gsed2212"}, -\code{key = "gsed2208"} or \code{key = "293_0"}. } \note{ Internal function. Called by \code{dscore()} diff --git a/man/count_mu_phase1_healthy.Rd b/man/count_mu_phase1_healthy.Rd deleted file mode 100644 index 35b5332f..00000000 --- a/man/count_mu_phase1_healthy.Rd +++ /dev/null @@ -1,31 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/count_mu.R -\name{count_mu_phase1_healthy} -\alias{count_mu_phase1_healthy} -\title{Median of phase1_healthy references} -\usage{ -count_mu_phase1_healthy(t) -} -\arguments{ -\item{t}{Decimal age, numeric vector} -} -\value{ -A vector of length \code{length(t)} with the median of the GCDG references. -} -\description{ -Returns the age-interpolated median of the phase1 references -based on LF & SF in GSED-BGD, GSED-PAK, GSED-TZA. -} -\details{ -This function is intended to be called when \code{key = "gsed2212"}, -\code{key = "gsed2208"} or \code{key = "293_0"}. -} -\note{ -Internal function. Called by \code{dscore()} -} -\examples{ -dscore:::count_mu_phase1_healthy(0:5) -} -\author{ -Stef van Buuren, on behalf of GSED project -} diff --git a/man/count_mu_preliminary_standards.Rd b/man/count_mu_preliminary_standards.Rd new file mode 100644 index 00000000..a364a15a --- /dev/null +++ b/man/count_mu_preliminary_standards.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/get_mu.R +\name{count_mu_preliminary_standards} +\alias{count_mu_preliminary_standards} +\title{Median of preliminary_standards} +\usage{ +count_mu_preliminary_standards(t, key = NULL) +} +\arguments{ +\item{t}{Decimal age, numeric vector} + +\item{key}{Character, key name} +} +\value{ +A vector of length \code{length(t)} with the median of the GCDG references. +} +\description{ +Returns the age-interpolated median of the preliminary_standards +based on LF & SF in seven GSED countries. This function is used +to set prior mean under keys \code{"gsed2406"} and \code{"gsed2510"}. +} +\note{ +Internal function. Called by \code{dscore()} +} +\examples{ +dscore:::count_mu_preliminary_standards(0:5) +} +\author{ +Stef van Buuren, on behalf of GSED project +} diff --git a/man/daz.Rd b/man/daz.Rd index dd844e88..f7b9501d 100644 --- a/man/daz.Rd +++ b/man/daz.Rd @@ -3,23 +3,25 @@ \name{daz} \alias{daz} \alias{zad} -\title{D-score standard deviation score: DAZ} +\title{Calculate Development-for-Age Z-score (DAZ)} \usage{ -daz(d, x, reference = get_reference(), dec = 3) +daz(d, x, reference_table = NULL, dec = 3, verbose = FALSE) -zad(z, x, reference = get_reference(), dec = 2) +zad(z, x, reference_table = NULL, dec = 2, verbose = FALSE) } \arguments{ \item{d}{Vector of D-scores} \item{x}{Vector of ages (decimal age)} -\item{reference}{A \code{data.frame} with the LMS reference values. -The default uses the \code{get_reference()} function. This selects -a subset of rows from the \code{builtin_references}.} +\item{reference_table}{A \code{data.frame} with the LMS or BCT reference values. +The default \code{NULL} selects the default reference belonging to the \code{key}, +as specified in the \code{base_population} field in \code{dscore::builtin_keys}.} \item{dec}{The number of decimals (default \code{dec = 3}).} +\item{verbose}{Print out the used reference table (default \code{verbose = FALSE}).} + \item{z}{Vector of standard deviation scores (DAZ)} } \value{ @@ -28,14 +30,14 @@ Unnamed numeric vector with Z-scores of length \code{length(d)}. Unnamed numeric vector with D-scores of length \code{length(z)}. } \description{ -The \code{daz()} function calculated the -"Development for Age Z-score". -The DAZ represents a child's D-score after adjusting -for age by an external age-conditional reference. -The \code{zad()} is the inverse of \code{daz()}: Given age and -the Z-score, it finds the raw D-score. +The \code{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. } \details{ +The \code{zad()} is the inverse of \code{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 \code{daz()} and \code{zad()} functions will round up any @@ -46,30 +48,29 @@ Note 2: The \code{daz()} and \code{zad()} function call modified version of the of \code{NA}'s and rounding. } \examples{ -# using GSED Phase 1 reference +# using default reference and key daz(d = c(35, 50), x = c(0.5, 1.0)) -# using Dutch reference -daz(d = c(35, 50), x = c(0.5, 1.0), reference = get_reference("gcdg")) +# print out names of the used reference table +daz(d = c(35, 50), x = c(0.5, 1.0), verbose = TRUE) -# using Dutch reference -daz(d = c(35, 50), x = c(0.5, 1.0), reference = get_reference("dutch")) -# population median at ages 0.5, 1 and 2 years, phase1 reference -zad(z = rep(0, 3), x = c(0.5, 1, 2)) +# 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) -# population median at ages 0.5, 1 and 2 years, gcdg reference -zad(z = rep(0, 3), x = c(0.5, 1, 2), reference = get_reference("gcdg")) +# using Dutch reference in default key +reftab <- get_reference(population = "dutch", verbose = TRUE) +daz(d = c(35, 50), x = c(0.5, 1.0), reference_table = reftab) +# population median at ages 0.5, 1 and 2 years, default reference +zad(z = rep(0, 3), x = c(0.5, 1, 2)) -# population median at ages 0.5, 1 and 2 years, dutch reference -zad(z = rep(0, 3), x = c(0.5, 1, 2), reference = get_reference("dutch")) +# population median at ages 0.5, 1 and 2 years, gcdg key +reftab <- get_reference(key = "gcdg", verbose = TRUE) +zad(z = rep(0, 3), x = c(0.5, 1, 2), reference_table = reftab) -# percentiles of D-score reference -g <- expand.grid(age = seq(0.1, 2, 0.1), p = c(0.1, 0.5, 0.9)) -d <- zad(z = qnorm(g$p), x = g$age) -matplot( - x = matrix(g$age, ncol = 3), y = matrix(d, ncol = 3), type = "l", - lty = 1, col = "blue", xlab = "Age (years)", ylab = "D-score" -) +# population median at ages 0.5, 1 and 2 years, dutch key +reftab <- get_reference(key = "dutch", verbose = TRUE) +zad(z = rep(0, 3), x = c(0.5, 1, 2), reference = reftab) } \references{ Cole TJ, Green PJ (1992). Smoothing reference centile curves: The LMS @@ -77,8 +78,8 @@ method and penalized likelihood. Statistics in Medicine, 11(10), 1305-1319. } \seealso{ -\code{\link[=dscore]{dscore()}} +\link[=get_reference]{dscore()} } \author{ -Stef van Buuren 2020 +Stef van Buuren } diff --git a/man/decompose_itemnames.Rd b/man/decompose_itemnames.Rd index ed875cee..7e28817d 100644 --- a/man/decompose_itemnames.Rd +++ b/man/decompose_itemnames.Rd @@ -7,7 +7,7 @@ decompose_itemnames(x) } \arguments{ -\item{x}{A character vector containing item names (gcdg lexicon)} +\item{x}{A character vector containing item names (gsed lexicon)} } \value{ A \code{data.frame} with \code{length(x)} rows and diff --git a/man/dscore-package.Rd b/man/dscore-package.Rd index 7a777f74..31f0994d 100644 --- a/man/dscore-package.Rd +++ b/man/dscore-package.Rd @@ -3,36 +3,11 @@ \docType{package} \name{dscore-package} \alias{dscore-package} -\title{dscore: D-score for Child Development} +\title{D-score for child development} \description{ -The \code{dscore} package implements several tools needed to -calculate the D-score, a numerical score that measures -generic development in children. -} -\note{ -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. +The \code{dscore} package implements tools needed to calculate the D-score, +a numerical score that summarizes early development in children by +one number, the D-score. } \section{User functions}{ @@ -53,7 +28,7 @@ The available functions are:\tabular{ll}{   \tab \cr \code{\link[=daz]{daz()}} \tab Transform to age-adjusted standardized D-score \cr \code{\link[=zad]{zad()}} \tab Inverse of \code{\link[=daz]{daz()}} \cr - \code{\link[=get_reference]{get_reference()}} \tab Get D-score age-reference \cr + \code{\link[=get_reference]{get_reference()}} \tab Get D-score reference tables \cr \code{\link[=get_age_equivalent]{get_age_equivalent()}} \tab Translate difficulty to age \cr } } @@ -62,12 +37,44 @@ The available functions are:\tabular{ll}{ The package contains the following built-in data:\tabular{ll}{ Data \tab Description \cr - \code{\link[=builtin_itembank]{builtin_itembank()}} \tab A \code{data.frame} containing the difficulty estimates of items according to final Rasch models. \cr - \code{\link[=builtin_itemtable]{builtin_itemtable()}} \tab A \code{data.frame} containing names and descriptions of items from 22 instruments. \cr - \code{\link[=builtin_references]{builtin_references()}} \tab A \code{data.frame} with LMS reference values used to transform from D-score to DAZ, DAZ to D-score. \cr - \code{\link[=milestones]{milestones()}} \tab A small demo dataset with PASS/FAIL responses from 27 preterms, measured at various ages between birth \cr - and 2.5 years. \tab \cr + \code{\link[=builtin_keys]{builtin_keys()}} \tab Available keys for calculating the D-score \cr + \code{\link[=builtin_itembank]{builtin_itembank()}} \tab Collection of items fitting the Rasch model \cr + \code{\link[=builtin_itemtable]{builtin_itemtable()}} \tab Collection of items from instruments measuring early child development \cr + \code{\link[=builtin_references]{builtin_references()}} \tab Collection of age-conditional reference distributions \cr +   \tab \cr + \code{\link[=milestones]{milestones()}} \tab Dataset with PASS/FAIL responses for 27 preterms \cr + \link{gsample} \tab Sample of 10 children from the GSED Phase 1 study, gsed lexicon \cr + \link{sample_sf} \tab Sample of 10 children from GSED Short Form (GSED-SF) \cr + \link{sample_lf} \tab Sample of 10 children from GSED Long Form (GSED-LF) \cr + \link{sample_hf} \tab Sample of 10 children from GSED Household Form (GSED-HF) \cr +} } + +\section{Acknowledgements}{ + +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. } \references{ @@ -113,6 +120,8 @@ Authors: \itemize{ \item Iris Eekhout \email{iris.eekhout@tno.nl} \item Arjan Huizing \email{arjan.huizing@tno.nl} + \item Jonathan Seiden \email{jseiden@g.harvard.edu} } } +\keyword{internal} diff --git a/man/dscore.Rd b/man/dscore.Rd index f1547af4..33ed178e 100644 --- a/man/dscore.Rd +++ b/man/dscore.Rd @@ -8,45 +8,53 @@ dscore( data, items = names(data), + key = NULL, + population = NULL, xname = "age", xunit = c("decimal", "days", "months"), prepend = NULL, - key = NULL, - itembank = dscore::builtin_itembank, + itembank = NULL, metric = c("dscore", "logit"), prior_mean = NULL, + prior_mean_NA = NULL, prior_sd = NULL, + prior_sd_NA = NULL, transform = NULL, - qp = -10:100, - population = NULL, + qp = NULL, dec = c(2L, 3L), - relevance = c(-Inf, Inf) + relevance = c(-Inf, Inf), + algorithm = c("current", "1.8.7"), + verbose = FALSE ) dscore_posterior( data, items = names(data), + key = NULL, + population = NULL, xname = "age", xunit = c("decimal", "days", "months"), prepend = NULL, - key = NULL, - itembank = dscore::builtin_itembank, + itembank = NULL, metric = c("dscore", "logit"), prior_mean = NULL, + prior_mean_NA = NULL, prior_sd = NULL, + prior_sd_NA = NULL, transform = NULL, - qp = -10:100, - population = NULL, + qp = NULL, dec = c(2L, 3L), - relevance = c(-Inf, Inf) + relevance = c(-Inf, Inf), + algorithm = c("current", "1.8.7"), + verbose = FALSE ) } \arguments{ -\item{data}{A \code{data.frame} with the data. +\item{data}{A \code{data.frame} or \code{matrix} with the data. A row collects all observations made on a child on a set of milestones administered at a given age. The function calculates -a D-score for each row. Different rows correspond to different -children or different ages.} +a D-score for each row. Different rows can correspond to different +children or ages.} \item{items}{A character vector containing names of items to be included into the D-score calculation. Milestone scores are coded @@ -54,72 +62,80 @@ numerically as \code{1} (pass) and \code{0} (fail). By default, D-score calculation is done on all items found in the data that have a difficulty parameter under the specified \code{key}.} +\item{key}{String. They key identifies 1) the difficulty estimates +pertaining to a particular Rasch model, and 2) the prior mean and standard +deviation of the prior distribution for calculating the D-score. +The default key \code{NULL} sets \code{key = "gsed2406"}. +View \code{builtin_keys} for an overview of the available keys.} + +\item{population}{String. The name of the reference population to calculate +DAZ. +Use \code{with(builtin_references, table(key, population))} to see which +built-in references are available for \code{key - population} combinations. +If not specified, the function set the default population as +\code{builtin_keys$base_population[key == builtin_keys$key]}.} + \item{xname}{A string with the name of the age variable in -\code{data}. The default is \code{"age"}.} +\code{data}. The default is \code{"age"}. Do not round age.} \item{xunit}{A string specifying the unit in which age is measured (either \code{"decimal"}, \code{"days"} or \code{"months"}). -The default (\code{"decimal"}) means decimal age in years.} +The default \code{"decimal"} corresponds to decimal age in years.} \item{prepend}{Character vector with column names in \code{data} that will be prepended to the returned data frame. This is useful for copying columns from data into the result, e.g., for matching.} -\item{key}{A string that selects a subset in the itembank that -makes up the key, the set of difficulty -estimates from a fitted Rasch model. -The built-in keys are: \code{"gsed2212"} (default), \code{"gsed2208"} (deprecated), -\code{"gsed2206"} (deprecated), \code{"gsed1912"}, \code{"lf2206"}, \code{"sf2206"}, \code{"gcdg"}, -and \code{"dutch"}. Since version 1.5.0, the \code{key = "gsed"} -selects the latest key starting with the string "gsed". -Use \code{key = ""} to use all item names, -which should only be done if there are no duplicate itemnames -in the itembank.} - -\item{itembank}{A \code{data.frame} with columns -\code{key}, \code{item}, \code{tau}, \code{instrument}, \code{domain}, -\code{mode}, \code{number} and \code{label}. Only columns \code{item} -and \code{tau} are required. -The function uses \code{dscore::builtin_itembank} by -default.} +\item{itembank}{A \code{data.frame} with at least three columns named +\code{key}, \code{item} and \code{tau}. By default, the function uses +\code{dscore::builtin_itembank}. If you specify your own \code{itembank}, +then you should also provide the relevant \code{transform} and \code{qp} arguments.} \item{metric}{A string, either \code{"dscore"} (default) or -\code{"logit"}, signalling the metric in which ability is estimated.} - -\item{prior_mean}{A string specifying where the mean of the -prior for the D-score calculation should come from. It could be -a column name in \code{data} (when you want your own prior for every row), -but normally this is one of the keywords \code{".dutch"}, \code{".gcdg"} -or \code{".phase1"}. -The default depends on the \code{key}. If \code{key == "dutch"} then -\code{prior_mean = ".dutch"}. The choice \code{prior_mean = ".dutch"} -calculates \code{prior_mean} from the Count model coded in -\code{dscore:::count_mu_dutch()}). -If \code{key} is #' \code{"gcdg"}, \code{"gsed1912"}, -\code{"gsed2206"}, \code{"lf2206"} or \code{"sf2206"} then \code{prior_mean = ".gcdg"}. -This setting calculates an age-dependent prior mean internally according -to function \code{dscore:::count_mu_gcdg()}. -In other cases, \code{prior_mean = ".phase1"} -which uses the function \code{dscore:::count_mu_phase1()} or -\code{dscore:::count_mu_phase1_healthy()}. -Normally, you should not touch this parameter, but feel free to use -\code{prior_mean} to override the automatic choices.} - -\item{prior_sd}{A string specifying a column name in \code{data} -with the standard deviation of the prior for the D-score calculation. -If not specified, the standard deviation is taken as 5 for every row.} - -\item{transform}{Vector of length 2, signalling the intercept -and slope respectively of the linear transform that converts an -observation in the logit scale to the the D-score scale. Only -needed if \code{metric == "logit"}.} +\code{"logit"}, signalling the metric in which ability is estimated. +\code{daz} is not calculated for the logit scale.} -\item{qp}{Numeric vector of equally spaced quadrature points. -This vector should span the range of all D-score values. The default -(\code{qp = -10:100}) is suitable for age range 0-4 years.} +\item{prior_mean}{\code{NULL} (default), a string, a numeric scalar, or +a numeric vector with \code{nrow(data)} elements. The default value +\code{NULL} will consult the \code{base_population} field in \code{builtin_keys}, +and use the corresponding median of that reference as prior mean for +the D-score. The string should refer to a column name in \code{data} +that contains user-supplied values of the prior mean for each observation. +A numeric scalar will be expanded to all observations. A numeric vector +will be used as is.} + +\item{prior_mean_NA}{\code{NULL} (default) or a scalar numeric, representing +the prior mean for observations with missing ages. By default, D-scores +with missing ages will we \code{NA}. We suggest setting +\code{prior_mean_NA = 50} as a reasonable choice for samples between 0-3 +years. The argument is ignored if \code{prior_mean} is specified per +observation, which gives you full control of priors for observations +with missing ages.} + +\item{prior_sd}{\code{NULL} (default), a string, a numeric scalar, or +a numeric vector with \code{nrow(data)} elements. The default (\code{NULL}) +uses a value of 5 for all ages. The string should refer to a column +name in \code{data} that contains user-supplied values of the prior sd +for each observation. A numeric scalar will be expanded to all +observations. A numeric vector will be used as is.} -\item{population}{A string describing the population. Currently -supported are \code{"phase1"} (default), \code{"dutch"}, \code{"gcdg"}.} +\item{prior_sd_NA}{\code{NULL} (default) or a scalar numeric, representing +the prior sd for observations with missing ages. By default, D-scores +with missing ages will we \code{NA}. We suggest setting +\code{prior_sd_NA = 20} as a reasonable choice for samples between 0-3 +years. The argument is ignored if \code{prior_sd} is specified per +observation, which gives you full control of priors for observations +with missing ages.} + +\item{transform}{Numeric vector, length 2, containing the intercept +and slope of the linear transform from the logit scale into the +the D-score scale. The default (\code{NULL}) searches \code{builtin_keys} +for intercept and slope values.} + +\item{qp}{Numeric vector of equally spaced quadrature points. +This vector should span the range of all D-score or logit values. +The default (\code{NULL}) creates \code{seq(from, to, by)} searching the +arguments from \code{builtin_keys}.} \item{dec}{A vector of two integers specifying the number of decimals for rounding the D-score and DAZ, respectively. @@ -131,38 +147,57 @@ a dynamic EAP for each item. If the difficulty level (tau) of the next item is outside the relevance interval around EAP, the procedure ignore the score on the item. The default is \code{c(-Inf, +Inf)} does not ignore scores.} + +\item{algorithm}{Computational method, for backward compatibility. +Either \code{"current"} (default) or \code{"1.8.7"} (deprecated).} + +\item{verbose}{Logical. Print settings.} } \value{ The \code{dscore()} function returns a \code{data.frame} with \code{nrow(data)} rows. -Optionally, the first block of columns can be specified by \code{prepend} -are copied from \code{data}. The second block consists of the +Optionally, the first block of columns can be copied to the +result by using \code{prepend}. The second block consists of the following columns:\tabular{ll}{ Name \tab Label \cr - \code{a} \tab Decimal age \cr + \code{a} \tab Decimal age (years) \cr \code{n} \tab Number of items with valid (0/1) data \cr \code{p} \tab Percentage of passed milestones \cr - \code{d} \tab Ability estimate, mean of posterior \cr + \code{d} \tab D-score, mean of posterior distribution \cr \code{sem} \tab Standard error of measurement, standard deviation of the posterior \cr - \code{daz} \tab D-score corrected for age, calculated in Z-scale \cr + \code{daz} \tab D-score corrected for age, calculated in Z-scale (for metric \code{"dscore"}) \cr } -The \code{dscore_posterior()} function returns a data frame with -\code{nrow(data)} rows and \code{length(qp)} plus prepended columns with the -density at each quadrature point. A row vector representes the full -posterior ability distribution. If no valid responses are found, -\code{dscore_posterior()} returns the prior density. Versions prior to -1.8.5 returned a \code{matrix} (instead of a \code{data.frame}). Code that depends on -the result being a \code{matrix} may break and needs to be adapted. +The D-score in column \code{d} is a linear scale, with values usually ranging +from 0 to 100. The D-score is \code{NA} if age is missing or if age is lower +than -1/12. It is possible to calculate D-scores for cases with missing ages +by setting \code{prior_mean_NA} and \code{prior_sd_NA} to some reasonable value, e.g., +\code{prior_mean_NA = 50} and \code{prior_sd_NA = 20}, for the sample at hand. + +The SEM is a positive number that quantifies the uncertainty of the D-score. +It is \code{NA} if the D-score is \code{NA}. + +The DAZ in column \code{daz} is a Z-score that corrects the D-score for age. It +is \code{NA} when there are no reference values for the given age, or when +the D-score is extremely unlikely to be valid at the given age. + +Advanced applications: The \code{dscore_posterior()} function returns a +data frame with \code{nrow(data)} rows and \code{length(qp)} plus prepended columns +with the full posterior density of the D-score at each quadrature point. +If no valid responses are found, \code{dscore_posterior()} returns the +prior density. Versions prior to 1.8.5 returned a \code{matrix} (instead of +a \code{data.frame}). Code that depends on the result being a \code{matrix} may break +and may need adaptation. } \description{ -The function \code{dscore()} function estimates the D-score, -a numeric score that measures child development, from PASS/FAIL -observations on milestones. +The \code{dscore()} function estimates the following quantities: \emph{D-score}, +a numeric score that quantifies child development by one number, +\emph{Development-for-Age Z-score (DAZ)} that corrects the D-score for age, +\emph{standard error of measurement (SEM)} of the D-score. } \details{ -The algorithm is based on the method by Bock and Mislevy (1982). The -method uses Bayes rule to update a prior ability into a posterior +The scoring algorithm is based on the method by Bock and Mislevy (1982). +The method uses Bayes rule to update a prior ability into a posterior ability. The item names should correspond to the \code{"gsed"} lexicon. @@ -170,53 +205,65 @@ The item names should correspond to the \code{"gsed"} lexicon. A key is defined by the set of estimated item difficulties.\tabular{lrrrcl}{ Key \tab Model \tab Quadrature \tab Instruments \tab Direct/Caregiver \tab Reference \cr \code{"dutch"} \tab \verb{75_0} \tab \code{-10:80} \tab 1 \tab direct \tab Van Buuren, 2014/2020 \cr - \code{"gcdg"} \tab \verb{565_18} \tab \code{-10:100} \tab 14 \tab direct \tab Weber, 2019 \cr - \code{"gsed1912"} \tab \verb{807_17} \tab \code{-10:100} \tab 20 \tab mixed \tab GSED Team, 2019 \cr - \code{"gsed2206"} \tab \verb{818_17} \tab \code{-10:100} \tab 22 \tab mixed \tab GSED Team, 2022 \cr - \code{"gsed2208"} \tab \verb{818_6} \tab \code{-10:100} \tab 22 \tab mixed \tab GSED Team, 2022 \cr - \code{"gsed2212"} \tab \verb{818_6} \tab \code{-10:100} \tab 22 \tab mixed \tab GSED Team, 2022 \cr - \code{"lf2206"} \tab \verb{155_0} \tab \code{-10:100} \tab 1 \tab direct \tab GSED Team, 2022 \cr - \code{"sf2206"} \tab \verb{139_0} \tab \code{-10:100} \tab 1 \tab caregiver \tab GSED Team, 2022 \cr + \code{"gcdg"} \tab \verb{565_18} \tab \code{-10:100} \tab 13 \tab direct \tab Weber, 2019 \cr + \code{"gsed1912"} \tab \verb{807_17} \tab \code{-10:100} \tab 21 \tab mixed \tab GSED Team, 2019 \cr + \code{"293_0"} \tab \verb{293_0} \tab \code{-10:100} \tab 2 \tab mixed \tab GSED Team, 2022 \cr + \code{"gsed2212"} \tab \verb{818_6} \tab \code{-10:100} \tab 27 \tab mixed \tab GSED Team, 2022 \cr + \code{"gsed2406"} \tab \verb{818_6} \tab \code{-10:100} \tab 27 \tab mixed \tab GSED Team, 2024 \cr + \code{"gsed2510"} \tab \verb{281_0} \tab \code{-10:125} \tab 3 \tab mixed \tab GSED Team, 2025 \cr } As a general rule, one should only compare D-scores that are calculated using the same key and the same set of quadrature points. For calculating D-scores on new data, -the advice is to use the default, which currently links to -\code{"gsed2212"}. +the advice is to use the default, which currently is \code{"gsed2510"}. +Currently, key \code{"gsed2510"} is defined for instrument codes \code{gs1} +(GSED SF), \code{gl1} (GSED LF) and \code{gh1} (GSED HF). If you +have another instrument, use the key \code{"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 internal functions -\code{dscore:::count_mu_phase1()}, \code{dscore:::count_mu_gcdg()} and -\code{dscore:::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 \verb{[get_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 thus somewhat informative for low numbers of -valid 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. } \examples{ +# using all defaults and properly formatted data +sf <- dscore::triple[, 1:141] +ds <- dscore(sf) +head(ds) + +# step-by-step example demonstrating +# all possible response vectors for 3 items data <- data.frame( - id = c("Jane", "Martin", "ID-3", "No. 4", "Five", "6", - NA_character_, as.character(8:10)), + id = c( + "Jane", "Martin", "ID-3", "No. 4", "Five", "6", + NA_character_, as.character(8:10)), age = rep(round(21 / 365.25, 4), 10), - ddifmd001 = c(NA, NA, 0, 0, 0, 1, 0, 1, 1, 1), - ddicmm029 = c(NA, NA, NA, 0, 1, 0, 1, 0, 1, 1), - ddigmd053 = c(NA, 0, 0, 1, 0, 0, 1, 1, 0, 1) + gs1sec001 = c(NA, NA, 0, 0, 0, 1, 0, 1, 1, 1), + gs1moc002 = c(NA, NA, NA, 0, 1, 0, 1, 0, 1, 1), + gs1sec003 = c(NA, 0, 0, 1, 0, 0, 1, 1, 0, 1) ) + +# what are these items? items <- names(data)[3:5] +get_labels(items) -# third item is not part of default key -get_tau(items) +# difficulty parameter in default key +get_tau(items, verbose = TRUE) # calculate D-score +# the same sumscore leads to the same D-score (column d) dscore(data) # prepend id variable to output dscore(data, prepend = "id") -# prepend all data +# or prepend all data # dscore(data, prepend = colnames(data)) # calculate full posterior @@ -225,10 +272,26 @@ p <- dscore_posterior(data) # check that rows sum to 1 rowSums(p) -# plot posterior for row 7 -barplot(as.matrix(p[7, 12:29]), names = 1:18, - xlab = "D-score", ylab = "Density", - main = "Full D-score posterior for measurement in row 7") +# plot full posterior for measurement 7 +barplot(as.matrix(p[7, 12:36]), + names = 1:25, + xlab = "D-score", ylab = "Density", col = "grey", + main = "Full D-score posterior for measurement in row 7", + sub = "D-score (EAP) = 11.58, SEM = 3.99") + +# 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) +matplot( + x = matrix(g$age, ncol = 3), y = matrix(d, ncol = 3), type = "l", + lty = 1, col = "blue", xlab = "Age (years)", ylab = "D-score", + main = "D-score preliminary standards: P10, P50 and P90") +abline(h = seq(10, 80, 10), v = seq(0, 4, 0.5), col = "gray", lty = 2) + +# add measurements made on very preterms, ga < 32 weeks +# we need key = "gsed2406" because DDI is not yet in key "gsed2510" +ds <- dscore(milestones, key = "gsed2406") +points(x = ds$a, y = ds$d, pch = 19, col = "red") } \references{ Bock DD, Mislevy RJ (1982). @@ -248,9 +311,8 @@ BMJ Global Health, BMJ Global Health 4: e001724. \url{https://gh.bmj.com/content/bmjgh/4/6/e001724.full.pdf} } \seealso{ -\code{\link[=get_tau]{get_tau()}}, -\code{\link[=builtin_itembank]{builtin_itembank()}}, \code{\link[=posterior]{posterior()}}, -\code{\link[=builtin_references]{builtin_references()}} +\code{\link[=builtin_keys]{builtin_keys()}}, \code{\link[=builtin_itembank]{builtin_itembank()}}, \code{\link[=builtin_itemtable]{builtin_itemtable()}}, +\code{\link[=builtin_references]{builtin_references()}}, \code{\link[=get_tau]{get_tau()}}, \code{\link[=posterior]{posterior()}}, \code{\link[=milestones]{milestones()}} } \author{ Stef van Buuren, Iris Eekhout, Arjan Huizing (2022) diff --git a/man/get_age_equivalent.Rd b/man/get_age_equivalent.Rd index d54af155..d9fea2ac 100644 --- a/man/get_age_equivalent.Rd +++ b/man/get_age_equivalent.Rd @@ -8,9 +8,11 @@ get_age_equivalent( items, pct = c(10, 50, 90), key = NULL, - itembank = dscore::builtin_itembank, population = NULL, - xunit = c("decimal", "days", "months") + transform = NULL, + itembank = dscore::builtin_itembank, + xunit = c("decimal", "days", "months"), + verbose = FALSE ) } \arguments{ @@ -23,42 +25,47 @@ that have a difficulty parameter under the specified \code{key}.} \item{pct}{Numeric vector with requested percentiles (0-100). The default is \code{pct = c(10, 50, 90)}.} -\item{key}{A string that selects a subset in the itembank that -makes up the key, the set of difficulty -estimates from a fitted Rasch model. -The built-in keys are: \code{"gsed2212"} (default), \code{"gsed2208"} (deprecated), -\code{"gsed2206"} (deprecated), \code{"gsed1912"}, \code{"lf2206"}, \code{"sf2206"}, \code{"gcdg"}, -and \code{"dutch"}. Since version 1.5.0, the \code{key = "gsed"} -selects the latest key starting with the string "gsed". -Use \code{key = ""} to use all item names, -which should only be done if there are no duplicate itemnames -in the itembank.} +\item{key}{String. They key identifies 1) the difficulty estimates +pertaining to a particular Rasch model, and 2) the prior mean and standard +deviation of the prior distribution for calculating the D-score. +The default key \code{NULL} sets \code{key = "gsed2406"}. +View \code{builtin_keys} for an overview of the available keys.} -\item{itembank}{A \code{data.frame} with columns -\code{key}, \code{item}, \code{tau}, \code{instrument}, \code{domain}, -\code{mode}, \code{number} and \code{label}. Only columns \code{item} -and \code{tau} are required. -The function uses \code{dscore::builtin_itembank} by -default.} +\item{population}{String. The name of the reference population to calculate +DAZ. +Use \code{with(builtin_references, table(key, population))} to see which +built-in references are available for \code{key - population} combinations. +If not specified, the function set the default population as +\code{builtin_keys$base_population[key == builtin_keys$key]}.} -\item{population}{A string describing the population. Currently -supported are \code{"phase1"} (default), \code{"dutch"}, \code{"gcdg"}.} +\item{transform}{Numeric vector, length 2, containing the intercept +and slope of the linear transform from the logit scale into the +the D-score scale. The default (\code{NULL}) searches \code{builtin_keys} +for intercept and slope values.} + +\item{itembank}{A \code{data.frame} with at least three columns named +\code{key}, \code{item} and \code{tau}. By default, the function uses +\code{dscore::builtin_itembank}. If you specify your own \code{itembank}, +then you should also provide the relevant \code{transform} and \code{qp} arguments.} \item{xunit}{A string specifying the unit in which age is measured (either \code{"decimal"}, \code{"days"} or \code{"months"}). -The default (\code{"decimal"}) means decimal age in years.} +The default \code{"decimal"} corresponds to decimal age in years.} + +\item{verbose}{Logical. Print settings.} } \value{ -Tibble with four columns: \code{item}, \code{d} (\emph{D}-score), +\code{data.frame} with four columns: \code{item}, \code{d} (D-score), \code{pct} (percentile), and \code{a} (age-equivalent, in \code{xunit} units). } \description{ This function calculates the ages at which a certain percent in the reference population passes the items. } -\details{ +\note{ The function internally defines a scale factor given the key. } \examples{ -get_age_equivalent(c("gpagmc018", "gtogmd026", "ddicmm050")) +get_age_equivalent(c("gpagmc018", "gtogmd026", "ddicmm050"), + key = "gsed2406", population = "dutch", verbose = TRUE) } diff --git a/man/get_itemnames.Rd b/man/get_itemnames.Rd index b00d3d40..eaecc207 100644 --- a/man/get_itemnames.Rd +++ b/man/get_itemnames.Rd @@ -80,10 +80,18 @@ get_itemnames(domain = "se", mode = "d") # get all item numbers 70 and 73 from gm domain get_itemnames(number = c(70, 73), domain = "gm") + +# get item names from GSED SF (2023 version) in published order +items_sf <- get_itemnames(instrument = "gs1", order = "indm") + +# get item names from GSED LF (2023 version) in published order +items_lf <- get_itemnames(instrument = "gl1") +items_lf <- items_lf[c(55:155, 1:54)] + } \seealso{ \code{\link[=sort_itemnames]{sort_itemnames()}} } \author{ -Stef van Buuren 2020 +Stef van Buuren } diff --git a/man/get_mu.Rd b/man/get_mu.Rd new file mode 100644 index 00000000..a5d0a2ca --- /dev/null +++ b/man/get_mu.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/get_mu.R +\name{get_mu} +\alias{get_mu} +\title{Median D-score from the base population for a given key} +\usage{ +get_mu(t, key, prior_mean_NA = NA_real_) +} +\arguments{ +\item{t}{Decimal age, numeric vector} + +\item{key}{Character, key of the reference population} + +\item{prior_mean_NA}{Numeric, prior mean when age is missing} +} +\value{ +A vector of length \code{length(t)} with the median of the default reference +population for the key. +} +\description{ +Returns the age-interpolated median of the D-score of the default +reference for a given key. +} +\details{ +Use \code{get_reference()} for more options. +} diff --git a/man/get_reference.Rd b/man/get_reference.Rd index 3d1b52ad..a7124177 100644 --- a/man/get_reference.Rd +++ b/man/get_reference.Rd @@ -4,16 +4,35 @@ \alias{get_reference} \title{Get D-score reference} \usage{ -get_reference(population = "phase1", references = dscore::builtin_references) +get_reference( + population = NULL, + key = NULL, + references = dscore::builtin_references, + verbose = FALSE, + ... +) } \arguments{ -\item{population}{A string describing the population. Currently supported -are \code{"dutch"}, \code{"gcdg"}, \code{"phase1"} or \code{"phase1_health"}. -The default is \code{"phase1"}, in sync with the default \code{key = "gsed"}.} +\item{population}{String. The name of the reference population to calculate +DAZ. +Use \code{with(builtin_references, table(key, population))} to see which +built-in references are available for \code{key - population} combinations. +If not specified, the function set the default population as +\code{builtin_keys$base_population[key == builtin_keys$key]}.} -\item{references}{A \code{data.frame} with the same structure -as \code{builtin_references}. The default is to use -\code{builtin_references}.} +\item{key}{String. They key identifies 1) the difficulty estimates +pertaining to a particular Rasch model, and 2) the prior mean and standard +deviation of the prior distribution for calculating the D-score. +The default key \code{NULL} sets \code{key = "gsed2406"}. +View \code{builtin_keys} for an overview of the available keys.} + +\item{references}{A \code{data.frame} with the same structure as \code{builtin_references}. +The default is to use \code{builtin_references}.} + +\item{verbose}{Logical. Print settings.} + +\item{\dots}{Used to test whether the call contained the deprecated argument +\code{references}.} } \value{ A \code{data.frame} with the LMS reference values. @@ -28,13 +47,45 @@ The function will silently rewrite \code{population = "gsed"} into to the \code{population = "gsed"}. The \code{"dutch"} reference was published in Van Buuren (2014) + The \code{"gcdg"} was calculated from 15 cohorts with direct observations (Weber, 2019). + The \code{"phase1"} references were calculated from the GSED Phase 1 validation data (GSED-BGD, GSED-PAK, GSED-TZA) cover age range 2w-3.5 years. The age range 3.5-5 yrs is linearly extrapolated and are only indicative. -The \code{"phase1_healthy"} references were calculated from the GSED Phase 1 validation -using a subset of children with healthy development. +(Van Buuren et al, 2025) + +The \code{"preliminary_standards"} references were calculated from the GSED +Phase 1 validation using a subset of children with healthy development. +(Van Buuren et al, 2025) + +The \code{"who_descriptive"} references were calculated from the GSED +Phase 1 + 2 (Seven countries) validation study using the \code{"gsed2510"} key. +It is a descriptive reference, i.e., no selection of children growing +up in healthy environments was made. (In preparation for publication). +} +\examples{ +# see key-population combinations of builtin_references +table(builtin_references$key, builtin_references$population) + +# get the default reference +reftab <- get_reference() +head(reftab, 2) + +# get the default reference for the key "gsed2212" +reftab <- get_reference(key = "gsed2212", verbose = TRUE) + +# get dutch reference for default key +reftab <- get_reference(population = "dutch", verbose = TRUE) + +# loading a non-existing reference yield fallback to default +reftab <- get_reference(population = "france", verbose = TRUE) + +# if user specifies a builtin population (e.g. who_descriptive) and the key +# is not found, then it returns the specified reference for its most recent key +reftab <- get_reference(key = "none", population = "preliminary_standards", verbose = TRUE) +nrow(reftab) } \references{ Van Buuren S (2014). Growth charts of human development. @@ -47,6 +98,12 @@ Richter L, Black MM (2019). The D-score: a metric for interpreting the early development of infants and toddlers across global settings. BMJ Global Health, BMJ Global Health 4: e001724. \url{https://gh.bmj.com/content/bmjgh/4/6/e001724.full.pdf}. + +van Buuren S, Eekhout I, McCray G, Lancaster GA, Waldman MR, McCoy DC, +Gladstone M, Cavallera, V, Dua T, Black MM, GSED Team (2025). +Enhancing comparability in early child development assessment with the +D-score. International Journal of Behavioral Development, 49(4), 348-364, +\url{https://doi.org/10.1177/01650254241294033} } \seealso{ \code{\link[=builtin_references]{builtin_references()}} diff --git a/man/get_tau.Rd b/man/get_tau.Rd index b010c25f..0bdc2ebd 100644 --- a/man/get_tau.Rd +++ b/man/get_tau.Rd @@ -4,7 +4,12 @@ \alias{get_tau} \title{Obtain difficulty parameters from item bank} \usage{ -get_tau(items, key = NULL, itembank = dscore::builtin_itembank) +get_tau( + items, + key = NULL, + itembank = dscore::builtin_itembank, + verbose = FALSE +) } \arguments{ \item{items}{A character vector containing names of items to be @@ -13,23 +18,18 @@ numerically as \code{1} (pass) and \code{0} (fail). By default, D-score calculation is done on all items found in the data that have a difficulty parameter under the specified \code{key}.} -\item{key}{A string that selects a subset in the itembank that -makes up the key, the set of difficulty -estimates from a fitted Rasch model. -The built-in keys are: \code{"gsed2212"} (default), \code{"gsed2208"} (deprecated), -\code{"gsed2206"} (deprecated), \code{"gsed1912"}, \code{"lf2206"}, \code{"sf2206"}, \code{"gcdg"}, -and \code{"dutch"}. Since version 1.5.0, the \code{key = "gsed"} -selects the latest key starting with the string "gsed". -Use \code{key = ""} to use all item names, -which should only be done if there are no duplicate itemnames -in the itembank.} +\item{key}{String. They key identifies 1) the difficulty estimates +pertaining to a particular Rasch model, and 2) the prior mean and standard +deviation of the prior distribution for calculating the D-score. +The default key \code{NULL} sets \code{key = "gsed2406"}. +View \code{builtin_keys} for an overview of the available keys.} -\item{itembank}{A \code{data.frame} with columns -\code{key}, \code{item}, \code{tau}, \code{instrument}, \code{domain}, -\code{mode}, \code{number} and \code{label}. Only columns \code{item} -and \code{tau} are required. -The function uses \code{dscore::builtin_itembank} by -default.} +\item{itembank}{A \code{data.frame} with at least three columns named +\code{key}, \code{item} and \code{tau}. By default, the function uses +\code{dscore::builtin_itembank}. If you specify your own \code{itembank}, +then you should also provide the relevant \code{transform} and \code{qp} arguments.} + +\item{verbose}{Logical. Print settings.} } \value{ A named vector with the difficulty estimate per item with diff --git a/man/gsample.Rd b/man/gsample.Rd index a0da1edf..191df609 100644 --- a/man/gsample.Rd +++ b/man/gsample.Rd @@ -25,6 +25,11 @@ gsample A demo dataset with developmental scores at the item level for 10 random children from the GSED Phase 1 data. } +\details{ +On July 15, 2025, the item \code{gpaclc088} was renamed to \code{gpaclc089} +(Can you child say five or more separate words) and \code{gpasec089} was renamed +to \code{gpasec088} (Is your child able to pee and poo). +} \examples{ head(gsample) } diff --git a/man/posterior.Rd b/man/posterior.Rd index 4084d6f3..51271f2d 100644 --- a/man/posterior.Rd +++ b/man/posterior.Rd @@ -4,7 +4,7 @@ \alias{posterior} \title{Calculate posterior for one item given score, difficulty and prior} \usage{ -posterior(score, tau, prior, qp) +posterior(score, tau, prior, qp, scale) } \arguments{ \item{score}{Integer, either 0 (fail) and 1 (pass)} @@ -14,6 +14,8 @@ posterior(score, tau, prior, qp) \item{prior}{Vector of prior values on quadrature points \code{qp}} \item{qp}{vector of equally spaced quadrature points} + +\item{scale}{expansion relative to the logit scale} } \value{ A vector of length \code{length(prior)} diff --git a/man/rename_vector.Rd b/man/rename_vector.Rd new file mode 100644 index 00000000..ce60d49e --- /dev/null +++ b/man/rename_vector.Rd @@ -0,0 +1,76 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/rename_vector.R +\name{rename_vector} +\alias{rename_vector} +\title{Rename character vector} +\usage{ +rename_vector( + input, + lexin = c("phase2", "phase1", "short1", "short2", "gsed", "gsed2", "gsed3"), + lexout = c("gsed3", "gsed2", "gsed", "short2", "short1", "phase1", "phase2"), + notfound = "copy", + contains = c("", "Ma_SF_", "Ma_LF_", "bsid_"), + underscore = TRUE, + trim = "Ma_", + lowercase = TRUE, + force_subjid_agedays = FALSE +) +} +\arguments{ +\item{input}{A character vector with names to be translated} + +\item{lexin}{A string indicating the input lexicon. One of \code{"phase1"}, +\code{"phase2"}, \code{"short1"}, \code{"short2"}, \code{"gsed"}, \code{"gsed2"} or \code{"gsed3"}. +Default is \code{"phase2"}, which orders item names according to the +published 2023 version of the SF and LF instruments.} + +\item{lexout}{A string indicating the output lexicon. One of \code{"phase1"}, +\code{"phase2"}, \code{"short1"}, \code{"short2"}, \code{"gsed"}, \code{"gsed2"}, \code{"gsed3"}. +Default is \code{"gsed3"}. The default output \code{"gsed3"} applies instrument +codes \code{gs1} (SF) and \code{gl1} (LF), which can be understood by the \code{dscore} +package.} + +\item{notfound}{A string indicating what to do some input value is not found} + +\item{contains}{A string to filter the translation table prior to matching. +Needed to prevent double matches. The default ("") does not filter.} + +\item{underscore}{Replaces space (" ") and dash ("-") by underscore ("_")} + +\item{trim}{A substring to be removed from \code{input}. Defaults to "Ma_".} + +\item{lowercase}{Sets all variables in lower case. +in \code{lexin}? The default \code{notfound = "copy"} copies the input values into the +output value. In other cases (e.g. \code{""} or \code{NA_character_}), the function +uses the string specified in \code{notfound} as a replacement value.} + +\item{force_subjid_agedays}{If \code{TRUE}, forces the output to have \code{"subjid"} +and \code{"agedays"} as names for the \code{"ID"} and \code{"age"}, respectively.} +} +\value{ +A character vector of the same length as \code{input} with processed +names. +} +\description{ +Translates names between different lexicons (naming schema). +} +\details{ +The recommended approach for reading new data is to name the columns +according to the names defined by \code{"short2"} and the apply \code{rename_vector()} +to translate the names to the \code{"gsed3"} lexicon. + +The lexicons \code{"phase1"}, \code{"short1"}, \code{"gsed"} and \code{"gsed2"} are included +for backward compatibility, and are not recommended for use with new +data. +} +\examples{ +# Using Ma_SF_Cxx as input names, 2023 SF/LF version +input <- c("file", "GSED_ID", "Ma_SF_Parent ID", "Ma_SF_C01", "Ma_SF_C02") +rename_vector(input) +rename_vector(input, lexout = "short2", lowercase = FALSE) +rename_vector(input, lexout = "gsed3", trim = "Ma_SF_") + +# Convert short names to gsed names +input <- c("file", "GSED_ID", "Ma_SF_Parent ID", paste0("SF00", 1:3)) +rename_vector(input, lexin = "short2", lowercase = TRUE) +} diff --git a/man/sample_hf.Rd b/man/sample_hf.Rd index 136a645b..0c194afe 100644 --- a/man/sample_hf.Rd +++ b/man/sample_hf.Rd @@ -5,7 +5,7 @@ \alias{sample_hf} \title{Sample of 10 children from GSED HF} \format{ -A \code{data.frame} with 10 rows and 57 variables:\tabular{ll}{ +A \code{data.frame} with 10 rows and 50 variables:\tabular{ll}{ Name \tab Label \cr \code{subjid} \tab Integer, child ID \cr \code{agedays} \tab Integer, age in days \cr @@ -15,7 +15,7 @@ A \code{data.frame} with 10 rows and 57 variables:\tabular{ll}{ } -Sample data for 55 \code{gpa} items forming GSED HF V1 +Sample data for 48 \code{gpa} items forming GSED HF V1 } \usage{ sample_hf @@ -24,6 +24,10 @@ sample_hf A demo dataset with developmental scores at the item level for 10 random children from the GSED Phase 1 data. } +\note{ +The HF item set was revised on October 20, 2025 to contain 48 items. +This dataset reflects that change. +} \examples{ head(sample_hf) } diff --git a/man/sample_sf.Rd b/man/sample_sf.Rd index 043fc597..7e745a5b 100644 --- a/man/sample_sf.Rd +++ b/man/sample_sf.Rd @@ -16,6 +16,11 @@ A \code{data.frame} with 10 rows and 141 variables:\tabular{ll}{ Sample data for 139 \code{gpa} items from GSED SF + +#' @details +On July 15, 2025, the item \code{gpaclc088} was renamed to \code{gpaclc089} +(Can you child say five or more separate words) and \code{gpasec089} was renamed +to \code{gpasec088} (Is your child able to pee and poo). } \usage{ sample_sf diff --git a/man/triple.Rd b/man/triple.Rd new file mode 100644 index 00000000..470ffbf2 --- /dev/null +++ b/man/triple.Rd @@ -0,0 +1,55 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/triple.R +\docType{data} +\name{triple} +\alias{triple} +\title{Sample of 50 children measured with three instruments} +\format{ +A \code{data.frame} with 50 rows and 559 variables:\tabular{ll}{ + Name \tab Label \cr + \code{id} \tab Integer, child ID \cr + \code{age} \tab Numeric, age in decimal years \cr + \code{agedays} \tab Integer, age in days \cr + \code{gs1sec001} \tab Integer, SF001 Does your child smile? \cr + \code{gs1moc002} \tab Integer, SF002 When lying on his/her back, ... \cr + \code{...} \tab and so on.. \cr +} + + +The dataset contains 138 items from GSED SF (\code{gs1}), +(item \code{gs1moc028} was skipped), 155 items from GSED LF (\code{gl1}), +and 263 (out of 326) items from BSID-III (\code{by3}). +} +\usage{ +triple +} +\description{ +An example dataset with developmental scores at the item level for +50 random children from the GSED Validation Study (Cavellera et al, 2023). +Each child has measurements from GSED SF (\code{gs1}), GSED LF (\code{gl1}) and +BSID-III (\code{by3}). +} +\examples{ +# calculate D-score from all instruments +ds_all <- dscore(triple) +head(ds_all) +# calculate D-score from only GSED SF items +ds_sf <- dscore(triple, items = get_itemnames(instrument = "gs1")) +head(ds_sf) +} +\references{ +Cavallera et al. (2023). Protocol for validation of the Global +Scales for Early Development (GSED) for children under 3 years of +age in seven countries. BMJ Open, 13(1), e062562. +DOI: 10.1136/bmjopen-2022-062562. +\url{https://bmjopen.bmj.com/content/13/1/e062562} + +World Health Organization (WHO) (2023). Global Scales for Early +Development (GSED) V1.0: Technical Report. Geneva: World Health +Organization. +\url{https://www.who.int/publications/i/item/WHO-MSD-GSED-package-v1.0-2023.1} +} +\seealso{ +\code{\link[=dscore]{dscore()}} +} +\keyword{datasets} diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp index e0a6ff98..c366ceb8 100644 --- a/src/RcppExports.cpp +++ b/src/RcppExports.cpp @@ -24,8 +24,8 @@ BEGIN_RCPP END_RCPP } // posterior -NumericVector posterior(int score, double tau, NumericVector prior, NumericVector qp); -RcppExport SEXP _dscore_posterior(SEXP scoreSEXP, SEXP tauSEXP, SEXP priorSEXP, SEXP qpSEXP) { +NumericVector posterior(int score, double tau, NumericVector prior, NumericVector qp, double scale); +RcppExport SEXP _dscore_posterior(SEXP scoreSEXP, SEXP tauSEXP, SEXP priorSEXP, SEXP qpSEXP, SEXP scaleSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; @@ -33,32 +33,34 @@ BEGIN_RCPP Rcpp::traits::input_parameter< double >::type tau(tauSEXP); Rcpp::traits::input_parameter< NumericVector >::type prior(priorSEXP); Rcpp::traits::input_parameter< NumericVector >::type qp(qpSEXP); - rcpp_result_gen = Rcpp::wrap(posterior(score, tau, prior, qp)); + Rcpp::traits::input_parameter< double >::type scale(scaleSEXP); + rcpp_result_gen = Rcpp::wrap(posterior(score, tau, prior, qp, scale)); return rcpp_result_gen; END_RCPP } // calculate_posterior -List calculate_posterior(NumericVector scores, NumericVector tau, NumericVector qp, double mu, double sd, double relhi, double rello); -RcppExport SEXP _dscore_calculate_posterior(SEXP scoresSEXP, SEXP tauSEXP, SEXP qpSEXP, SEXP muSEXP, SEXP sdSEXP, SEXP relhiSEXP, SEXP relloSEXP) { +List calculate_posterior(NumericVector scores, NumericVector tau, NumericVector qp, double scale, double mu, double sd, double relhi, double rello); +RcppExport SEXP _dscore_calculate_posterior(SEXP scoresSEXP, SEXP tauSEXP, SEXP qpSEXP, SEXP scaleSEXP, SEXP muSEXP, SEXP sdSEXP, SEXP relhiSEXP, SEXP relloSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; Rcpp::traits::input_parameter< NumericVector >::type scores(scoresSEXP); Rcpp::traits::input_parameter< NumericVector >::type tau(tauSEXP); Rcpp::traits::input_parameter< NumericVector >::type qp(qpSEXP); + Rcpp::traits::input_parameter< double >::type scale(scaleSEXP); Rcpp::traits::input_parameter< double >::type mu(muSEXP); Rcpp::traits::input_parameter< double >::type sd(sdSEXP); Rcpp::traits::input_parameter< double >::type relhi(relhiSEXP); Rcpp::traits::input_parameter< double >::type rello(relloSEXP); - rcpp_result_gen = Rcpp::wrap(calculate_posterior(scores, tau, qp, mu, sd, relhi, rello)); + rcpp_result_gen = Rcpp::wrap(calculate_posterior(scores, tau, qp, scale, mu, sd, relhi, rello)); return rcpp_result_gen; END_RCPP } static const R_CallMethodDef CallEntries[] = { {"_dscore_normalize", (DL_FUNC) &_dscore_normalize, 2}, - {"_dscore_posterior", (DL_FUNC) &_dscore_posterior, 4}, - {"_dscore_calculate_posterior", (DL_FUNC) &_dscore_calculate_posterior, 7}, + {"_dscore_posterior", (DL_FUNC) &_dscore_posterior, 5}, + {"_dscore_calculate_posterior", (DL_FUNC) &_dscore_calculate_posterior, 8}, {NULL, NULL, 0} }; diff --git a/src/dscore.cpp b/src/dscore.cpp index c8c85925..6a04cf50 100644 --- a/src/dscore.cpp +++ b/src/dscore.cpp @@ -41,6 +41,7 @@ NumericVector normalize(NumericVector d, NumericVector qp) { //' @param tau Numeric, difficulty parameter //' @param prior Vector of prior values on quadrature points `qp` //' @param qp vector of equally spaced quadrature points +//' @param scale expansion relative to the logit scale //' @return A vector of length `length(prior)` //' @author Stef van Buuren, Arjan Huizing, 2020 //' @note: Internal function @@ -48,14 +49,14 @@ NumericVector normalize(NumericVector d, NumericVector qp) { // [[Rcpp::export]] NumericVector posterior(int score, double tau, NumericVector prior, - NumericVector qp){ + NumericVector qp, + double scale) { NumericVector cpc; score += 1; if((score < 1) | (score > 2)){stop("score out-of-range.");} // compute category respones probability under 1PL model - double scale = qp(1) - qp(0); NumericVector p = plogis(qp, tau, scale); if(score == 1){ @@ -99,6 +100,7 @@ double wmean(NumericVector x, NumericVector w) { //' scores in `scores` estimated from the Rasch model in the //' preferred metric/scale. //' @param qp Numeric vector of equally spaced quadrature points. +//' @param scale Scale expansion //' @param mu Numeric scalar. The mean of the prior. //' @param sd Numeric scalar. Standard deviation of the prior. //' @param relhi Positive numeric scalar. Upper end of the relevance interval @@ -117,6 +119,7 @@ double wmean(NumericVector x, NumericVector w) { List calculate_posterior(NumericVector scores, NumericVector tau, NumericVector qp, + double scale, double mu, double sd, double relhi, double rello){ @@ -141,7 +144,7 @@ List calculate_posterior(NumericVector scores, score = scores[j]; tauj = tau[j]; eap = fullpost["eap"]; - if (!arma::is_finite(score) || !arma::is_finite(tauj)){ + if (!std::isfinite(score) || !std::isfinite(tauj)){ continue; } if (((tauj - eap) > relhi) || ((tauj - eap) < rello)) { @@ -150,7 +153,7 @@ List calculate_posterior(NumericVector scores, // calculate posterior prior = post; - post = posterior(score, tauj, prior, qp); + post = posterior(score, tauj, prior, qp, scale); // store posterior and eap estimate fullpost["posterior"] = post; diff --git a/tests/testthat/test-dscore.R b/tests/testthat/test-dscore.R index 1f5ba08f..e1ad64c0 100644 --- a/tests/testthat/test-dscore.R +++ b/tests/testthat/test-dscore.R @@ -1,5 +1,38 @@ context("dscore") +# minimum and maximum of SF (0, 3.5 years) +items <- get_itemnames(instrument = "gs1") +df <- rbind( + as.data.frame(setNames(as.list(rep(0, length(items))), items)), + as.data.frame(setNames(as.list(rep(1, length(items))), items)), + as.data.frame(setNames(as.list(rep(0, length(items))), items)), + as.data.frame(setNames(as.list(rep(1, length(items))), items)) +) + + +df$age <- c(0, 0, 3.5, 3.5) +ds <- dscore(df, population = "who_descriptive") +test_that("dscore() calculates SF range", { + expect_false(anyNA(ds$d)) + expect_false(anyNA(ds$sem)) +}) + +# minimum and maximum of LF (0, 3.5 years) +items <- get_itemnames(instrument = "gl1") +df <- rbind( + as.data.frame(setNames(as.list(rep(0, length(items))), items)), + as.data.frame(setNames(as.list(rep(1, length(items))), items)), + as.data.frame(setNames(as.list(rep(0, length(items))), items)), + as.data.frame(setNames(as.list(rep(1, length(items))), items)) +) +df$age <- c(0, 0, 3.5, 3.5) +ds <- dscore(df, population = "who_descriptive") +test_that("dscore() calculates LF range", { + expect_false(anyNA(ds$d)) + expect_false(anyNA(ds$sem)) +}) + + # dscore, gsed lexicon data <- data.frame( age = rep(round(21 / 365.25, 4), 10), @@ -8,72 +41,93 @@ data <- data.frame( ddigmd053 = c(NA, 0, 0, 1, 0, 0, 1, 1, 0, 1) ) -# default key: "gsed" (currently points to "gsed2212", population "phase1") -z <- dscore(data) -expected_d <- c(NA, NA, 6.61, 5.60, 9.09, 9.09, 9.09, 9.09, 15.30, 15.30) -expected_daz <- c(NA, NA, -2.019, -2.235, -1.447, -1.447, -1.447, -1.447, 0.277, 0.277) -test_that("produces expected D-scores - key gsed", { - expect_identical(z$d, expected_d) - expect_identical(z$daz, expected_daz) -}) +expect_silent(dscore(data, items = character(0))) # explicit key "gsed2212" -z <- dscore(data, key = "gsed2212") +expected_d <- c(NA, NA, 6.61, 5.60, 9.09, 9.09, 9.09, 9.09, 15.30, 15.30) +expected_daz <- c( + NA, + NA, + -2.019, + -2.235, + -1.447, + -1.447, + -1.447, + -1.447, + 0.277, + 0.277 +) +z <- dscore(data, key = "gsed2212", algorithm = "1.8.7") test_that("produces expected D-scores - key gsed2212", { expect_identical(z$d, expected_d) expect_identical(z$daz, expected_daz) }) -z1 <- dscore(data, key = "dutch") -expected_d1 <- c(NA, -1.87, -1.94, 1.26, 1.26, 1.26, 4.63, 4.63, - 4.63, 12.06) +z1 <- dscore(data, key = "dutch", algorithm = "1.8.7") +expected_d1 <- c( + NA, + -1.87, + -1.94, + 1.26, + 1.26, + 1.26, + 4.63, + 4.63, + 4.63, + 12.06 +) test_that("produces expected D-scores - key dutch", { expect_identical(z1$d, expected_d1) }) -z2 <- dscore(data, key = "gcdg") -expected_d2 <- c(NA, NA, 3.47, 0.96, 4.83, 4.83, 4.83, 4.83, - 11.81, 11.81) +z2 <- dscore(data, key = "gcdg", algorithm = "1.8.7") +expected_d2 <- c( + NA, + NA, + 3.47, + 0.96, + 4.83, + 4.83, + 4.83, + 4.83, + 11.81, + 11.81 +) test_that("produces expected D-scores - key gcdg", { expect_identical(z2$d, expected_d2) }) -z3 <- dscore(data, key = "gsed2206") -expected_d3 <- c(NA, NA, 3.46, 0.96, 4.82, 4.82, 4.82, 4.82, - 11.81, 11.81) -test_that("produces expected D-scores - key gsed", { - expect_identical(z3$d, expected_d3) -}) - # subset by items items <- c("ddifmd001", "ddicmm029", "ddigmd053") -z4 <- dscore(data, items = items, key = "dutch") +z4 <- dscore(data, items = items, key = "dutch", algorithm = "1.8.7") expected_d4 <- expected_d1 test_that("produces expected D-scores - key dutch", { expect_identical(z4$d, expected_d4) }) -z5 <- dscore(data, items = items[1:2], key = "dutch") -expected_d5 <- c(NA, NA, 3.53, 0.59, 4.61, 4.61, 4.61, 4.61, - 12.06, 12.06) +z5 <- dscore(data, items = items[1:2], key = "dutch", algorithm = "1.8.7") +expected_d5 <- c( + NA, + NA, + 3.53, + 0.59, + 4.61, + 4.61, + 4.61, + 4.61, + 12.06, + 12.06 +) test_that("produces expected D-scores - key dutch", { expect_identical(z5$d, expected_d5) }) -z6 <- dscore(data, items = items[1:2], key = "gsed2206") -expected_d6 <- expected_d3 -test_that("produces expected D-scores", { - expect_identical(z6$d, expected_d6) -}) - -z7 <- dscore(data, items = c(items[1:2], "junk"), key = "gsed2206") -expected_d7 <- expected_d3 -test_that("produces expected D-scores", { - expect_identical(z7$d, expected_d7) -}) - test_that("Silently handles outside item code", { - expect_silent(dscore(data, items = c(items[1:2], "gpagmc013"), key = "gsed2206")) + expect_silent(dscore( + data, + items = c(items[1:2], "gpagmc013"), + algorithm = "1.8.7" + )) }) @@ -86,12 +140,12 @@ test_that("handles zero rows", { # --- test negative ages # dscore, gsed lexicon data <- data.frame( - age = rep(-0.26, 10), + age = c(-0.26, -0.26, NA, 1000, 0.5, -100, Inf, -Inf, 0, 1), ddifmd001 = c(NA, NA, 0, 0, 0, 1, 0, 1, 1, 1), ddicmm029 = c(NA, NA, NA, 0, 1, 0, 1, 0, 1, 1), - ddigmd053 = c(NA, 0, 0, 1, 0, 0, 1, 1, 0, 1) + ddigmd053 = c(NA, 0, 0, 1, 0, 0, 1, 1, 1, 1) ) -test_that("silently handles negative ages", { +test_that("silently handles out-of-range ages", { expect_silent(dscore(data, key = "dutch")) }) @@ -103,67 +157,175 @@ data <- data.frame( ddicmm029 = c(NA, NA, NA, 0, 1, 0, 1, 0, 1, 1), ddigmd053 = c(NA, 0, 0, 1, 0, 0, 1, 1, 0, 1) ) +my_itembank <- data.frame( + key = "mykey", + item = items, + tau = get_tau(items = items, key = "dutch") +) +my_reference <- builtin_references[builtin_references$key == "dutch", ] +my_reference$key <- "mykey" -transform <- c(0, 2) -keyd <- data.frame(key = "temp", - item = items, - tau = get_tau(items = items, key = "dutch")) +# externally specified transformation +# transform <- c(0, 1) +# transform <- c(0, 2) +transform <- c(50, 3) +qp <- -10:100 -zd <- dscore(data, items = items, dec = 4, metric = "dscore", - itembank = keyd, key = "temp", population = "dutch") +algorithm <- "1.8.7" +algorithm <- "current" +zd <- dscore( + data, + items = items, + dec = 4, + metric = "dscore", + itembank = my_itembank, + transform = transform, + qp = qp, + key = "mykey", + population = "dutch", + algorithm = algorithm, + verbose = TRUE +) + +zl <- dscore( + data, + items = items, + dec = 4, + metric = "logit", + itembank = my_itembank, + key = "mykey", + transform = transform, + qp = qp, + algorithm = algorithm +) -zl <- dscore(data, items = items, dec = 4, metric = "logit", - transform = transform, - itembank = keyd, key = "temp", population = "dutch") +lastkey <- builtin_keys[builtin_keys$key == "gsed2406", ] +transform <- c(lastkey$intercept, lastkey$slope) +algorithm <- "1.8.7" +zd <- dscore(data, metric = "dscore", algorithm = algorithm, verbose = FALSE) +zl <- dscore(data, metric = "logit", algorithm = algorithm) +test_that("logit and dscore are identical (1.8.7)", { + expect_equal(zl$d, (zd$d - transform[1]) / transform[2], tolerance = 0.001) + expect_equal(zl$d * transform[2] + transform[1], zd$d, tolerance = 0.001) +}) -test_that("logit and dscore are identical", { - expect_equal(zl$d, (zd$d - transform[1])/transform[2], tolerance = 0.001) - expect_equal(zl$d*transform[2] + transform[1], zd$d, tolerance = 0.001) +algorithm <- "current" +zd <- dscore(data, metric = "dscore", algorithm = algorithm, verbose = FALSE) +zl <- dscore(data, metric = "logit", algorithm = algorithm) +test_that("logit and dscore are identical (current)", { + expect_equal(zl$d, (zd$d - transform[1]) / transform[2], tolerance = 0.001) + expect_equal(zl$d * transform[2] + transform[1], zd$d, tolerance = 0.001) }) -# check prior mean +# check prior mean as column in data data <- cbind(data, start = rep(c(0, 10), times = 5)) -zp0 <- dscore(data, items = items, dec = 4, metric = "dscore", - itembank = keyd, key = "temp", population = "dutch") -zp1 <- dscore(data, items = items, dec = 4, metric = "dscore", - itembank = keyd, key = "temp", population = "dutch", - prior_mean = "start") +zp0 <- dscore(data, key = "gsed2406") +zp1 <- dscore(data, prior_mean = "start", key = "gsed2406") +test_that("D-score difference at uneven rows (with start 0) is higher than on uneven rows (with start 10)", { + expect_gt(zp0$d[3] - zp1$d[3], zp0$d[4] - zp1$d[4]) + expect_gt(zp0$d[5] - zp1$d[5], zp0$d[6] - zp1$d[6]) + expect_gt(zp0$d[7] - zp1$d[7], zp0$d[8] - zp1$d[8]) + expect_gt(zp0$d[9] - zp1$d[9], zp0$d[10] - zp1$d[10]) +}) -test_that("count_mu_phase() handles missing ages", { - expect_silent(dscore:::count_mu_phase1(t = c(NA, NA))) - expect_silent(dscore:::count_mu_phase1(t = c(NA, -3, 1:3, NA))) +test_that("get_mu() handles missing ages", { + expect_silent(get_mu(t = c(NA, NA), key = "gsed2406", prior_mean_NA = 50)) + expect_silent(get_mu( + t = c(NA, -3, 1:3, NA), + key = "gsed2406", + prior_mean_NA = 50 + )) }) # test empty score vector -scores <- structure(list(age = 0, ddifmd001 = NA_integer_, ddifmd002 = NA_real_, - ddifmd003 = NA_real_, ddifmm004 = NA_integer_, ddifmd005 = NA_integer_, - ddigmd006 = NA_real_, ddifmd007 = NA_integer_, ddifmd008 = NA_integer_, - ddifmm009 = NA_real_, ddifmd010 = NA_real_, ddifmd011 = NA_real_, - ddifmm012 = NA_integer_, ddifmd013 = NA_real_, ddifmm014 = NA_integer_, - ddifmd015 = NA_real_, ddifmm016 = NA_integer_, ddifmd017 = NA_integer_, - ddifmd018 = NA_integer_, ddifmm019 = NA_integer_, ddifmd020 = NA_integer_, - ddifmd021 = NA_integer_, ddifmd022 = NA_integer_, ddifmd023 = NA_integer_, - ddifmd024 = NA_integer_, ddifmm025 = NA_integer_, ddifmd026 = NA_integer_, - ddifmd027 = NA_integer_, ddifmd028 = NA_integer_, ddicmm029 = NA_integer_, - ddicmm030 = NA_integer_, ddicmm031 = NA_integer_, ddicmm032 = NA_integer_, - ddicmm033 = NA_integer_, ddicmm034 = NA_integer_, ddicmm035 = NA_integer_, - ddicmm036 = NA_integer_, ddicmm037 = NA_integer_, ddicmm038 = NA_integer_, - ddicmm039 = NA_integer_, ddicmm040 = NA_integer_, ddicmm041 = NA_integer_, - ddicmm042 = NA_integer_, ddicmm043 = NA_integer_, ddicmd044 = NA_integer_, - ddicmm045 = NA_integer_, ddicmm046 = NA_integer_, ddicmm047 = NA_integer_, - ddicmm048 = NA_integer_, ddicmd049 = NA_integer_, ddicmm050 = NA_integer_, - ddicmm051 = NA_integer_, ddigmd052 = NA_real_, ddigmd053 = NA_real_, - ddigmd054 = NA_integer_, ddigmd155 = NA_real_, ddigmd255 = NA_real_, - ddigmd355 = NA_real_, ddigmd055 = NA_real_, ddigmd056 = NA_integer_, - ddigmd057 = NA_integer_, ddigmd058 = NA_integer_, ddigmd059 = NA_real_, - ddigmm060 = NA_integer_, ddigmd061 = NA_integer_, ddigmd062 = NA_integer_, - ddigmd063 = NA_integer_, ddigmm064 = NA_integer_, ddigmm065 = NA_integer_, - ddigmm066 = NA_integer_, ddigmm067 = NA_integer_, ddigmd068 = NA_real_, - ddigmd168 = NA_real_, ddigmd268 = NA_real_, ddigmd069 = NA_integer_, - ddigmd070 = NA_integer_, ddigmd071 = NA_real_, ddigmd072 = NA_integer_, - ddigmm073 = NA_integer_, ddigmd074 = NA_integer_, ddigmd075 = NA_real_), - class = "data.frame", row.names = c(NA, -1L)) +scores <- structure( + list( + age = 0, + ddifmd001 = NA_integer_, + ddifmd002 = NA_real_, + ddifmd003 = NA_real_, + ddifmm004 = NA_integer_, + ddifmd005 = NA_integer_, + ddigmd006 = NA_real_, + ddifmd007 = NA_integer_, + ddifmd008 = NA_integer_, + ddifmm009 = NA_real_, + ddifmd010 = NA_real_, + ddifmd011 = NA_real_, + ddifmm012 = NA_integer_, + ddifmd013 = NA_real_, + ddifmm014 = NA_integer_, + ddifmd015 = NA_real_, + ddifmm016 = NA_integer_, + ddifmd017 = NA_integer_, + ddifmd018 = NA_integer_, + ddifmm019 = NA_integer_, + ddifmd020 = NA_integer_, + ddifmd021 = NA_integer_, + ddifmd022 = NA_integer_, + ddifmd023 = NA_integer_, + ddifmd024 = NA_integer_, + ddifmm025 = NA_integer_, + ddifmd026 = NA_integer_, + ddifmd027 = NA_integer_, + ddifmd028 = NA_integer_, + ddicmm029 = NA_integer_, + ddicmm030 = NA_integer_, + ddicmm031 = NA_integer_, + ddicmm032 = NA_integer_, + ddicmm033 = NA_integer_, + ddicmm034 = NA_integer_, + ddicmm035 = NA_integer_, + ddicmm036 = NA_integer_, + ddicmm037 = NA_integer_, + ddicmm038 = NA_integer_, + ddicmm039 = NA_integer_, + ddicmm040 = NA_integer_, + ddicmm041 = NA_integer_, + ddicmm042 = NA_integer_, + ddicmm043 = NA_integer_, + ddicmd044 = NA_integer_, + ddicmm045 = NA_integer_, + ddicmm046 = NA_integer_, + ddicmm047 = NA_integer_, + ddicmm048 = NA_integer_, + ddicmd049 = NA_integer_, + ddicmm050 = NA_integer_, + ddicmm051 = NA_integer_, + ddigmd052 = NA_real_, + ddigmd053 = NA_real_, + ddigmd054 = NA_integer_, + ddigmd155 = NA_real_, + ddigmd255 = NA_real_, + ddigmd355 = NA_real_, + ddigmd055 = NA_real_, + ddigmd056 = NA_integer_, + ddigmd057 = NA_integer_, + ddigmd058 = NA_integer_, + ddigmd059 = NA_real_, + ddigmm060 = NA_integer_, + ddigmd061 = NA_integer_, + ddigmd062 = NA_integer_, + ddigmd063 = NA_integer_, + ddigmm064 = NA_integer_, + ddigmm065 = NA_integer_, + ddigmm066 = NA_integer_, + ddigmm067 = NA_integer_, + ddigmd068 = NA_real_, + ddigmd168 = NA_real_, + ddigmd268 = NA_real_, + ddigmd069 = NA_integer_, + ddigmd070 = NA_integer_, + ddigmd071 = NA_real_, + ddigmd072 = NA_integer_, + ddigmm073 = NA_integer_, + ddigmd074 = NA_integer_, + ddigmd075 = NA_real_ + ), + class = "data.frame", + row.names = c(NA, -1L) +) test_that("empty vector works with all keys", { expect_silent(dscore(scores, key = "dutch")) @@ -173,19 +335,26 @@ test_that("empty vector works with all keys", { # Variables to append n <- nrow(data) -ids <- data.frame(id_chr = LETTERS[1:n], - id_num = 128 + 1:n, - a = NA_real_, - d = rnorm(n)) +ids <- data.frame( + id_chr = LETTERS[1:n], + id_num = 128 + 1:n, + a = NA_real_, + d = rnorm(n) +) data2 <- data.frame(ids, data) test_that("prepend attaches two ID columns", { - expect_equal(ncol(dscore(data2, prepend = c("id_chr", "id_num"))), 2 + 6) + expect_equal( + ncol(dscore(data2, prepend = c("id_chr", "id_num"), key = "gsed2406")), + 2 + 6 + ) }) test_that("unknown variables names produce notfound warning", { - expect_warning(dscore(data2, prepend = c("idonotexist")), "Not found: idonotexist") + expect_warning( + dscore(data2, prepend = c("idonotexist"), key = "gsed2406"), + "Not found: idonotexist" + ) }) test_that("reserved names produce overwrite warning", { - expect_warning(dscore(data2, prepend = c("a", "d"))) + expect_warning(dscore(data2, prepend = c("a", "d"), key = "gsed2406")) }) - diff --git a/tests/testthat/test-dscore_sem.R b/tests/testthat/test-dscore_sem.R new file mode 100644 index 00000000..ccb222f7 --- /dev/null +++ b/tests/testthat/test-dscore_sem.R @@ -0,0 +1,136 @@ +# context("dscore_sem") +# +# ## D-score - test equivalence of dscore and logit metric +# data <- data.frame( +# age = rep(round(21 / 365.25, 4), 10), +# ddifmd001 = c(NA, NA, 0, 0, 0, 1, 0, 1, 1, 1), +# ddicmm029 = c(NA, NA, NA, 0, 1, 0, 1, 0, 1, 1), +# ddigmd053 = c(NA, 0, 0, 1, 0, 0, 1, 1, 0, 1) +# ) +# my_itembank <- data.frame( +# key = "mykey", +# item = items, +# tau = get_tau(items = items, key = "dutch") +# ) +# my_reference <- builtin_references[builtin_references$key == "dutch", ] +# my_reference$key <- "mykey" +# +# # externally specified transformation +# # transform <- c(0, 1) +# # transform <- c(0, 2) +# transform <- c(50, 3) +# qp <- -10:100 +# +# algorithm <- "1.8.7" +# algorithm <- "current" +# zd <- dscore(data, +# items = items, dec = 4, metric = "dscore", +# itembank = my_itembank, transform = transform, qp = qp, +# key = "mykey", population = "dutch", +# algorithm = algorithm, +# verbose = TRUE +# ) +# zl <- dscore(data, +# items = items, dec = 4, metric = "logit", +# itembank = my_itembank, key = "mykey", transform = transform, qp = qp, +# algorithm = algorithm +# ) +# +# lastkey <- builtin_keys[nrow(builtin_keys), ] +# transform <- c(lastkey$intercept, lastkey$slope) +# algorithm <- "1.8.7" +# zd <- dscore(data, metric = "dscore", algorithm = algorithm, verbose = FALSE) +# zl <- dscore(data, metric = "logit", algorithm = algorithm) +# test_that("logit and dscore are identical (1.8.7)", { +# expect_equal(zl$d, (zd$d - transform[1]) / transform[2], tolerance = 0.001) +# expect_equal(zl$d * transform[2] + transform[1], zd$d, tolerance = 0.001) +# }) +# +# algorithm <- "current" +# zd <- dscore(data, metric = "dscore", algorithm = algorithm, verbose = FALSE) +# zl <- dscore(data, metric = "logit", algorithm = algorithm) +# test_that("logit and dscore are identical (current)", { +# expect_equal(zl$d, (zd$d - transform[1]) / transform[2], tolerance = 0.001) +# expect_equal(zl$d * transform[2] + transform[1], zd$d, tolerance = 0.001) +# }) +# +# # check prior mean as column in data +# data <- cbind(data, start = rep(c(0, 10), times = 5)) +# zp0 <- dscore(data) +# zp1 <- dscore(data, prior_mean = "start") +# test_that("D-score difference at uneven rows (with start 0) is higher than on uneven rows (with start 10)", { +# expect_gt(zp0$d[3] - zp1$d[3], zp0$d[4] - zp1$d[4]) +# expect_gt(zp0$d[5] - zp1$d[5], zp0$d[6] - zp1$d[6]) +# expect_gt(zp0$d[7] - zp1$d[7], zp0$d[8] - zp1$d[8]) +# expect_gt(zp0$d[9] - zp1$d[9], zp0$d[10] - zp1$d[10]) +# }) +# +# test_that("count_mu_phase() handles missing ages", { +# expect_silent(dscore::count_mu(t = c(NA, NA), +# key = "preliminary_standards", +# prior_mean_NA = 50)) +# expect_silent(dscore::count_mu(t = c(NA, -3, 1:3, NA), +# key = "preliminary_standards", +# prior_mean_NA = 50)) +# }) +# +# +# # test empty score vector +# scores <- structure( +# list( +# age = 0, ddifmd001 = NA_integer_, ddifmd002 = NA_real_, +# ddifmd003 = NA_real_, ddifmm004 = NA_integer_, ddifmd005 = NA_integer_, +# ddigmd006 = NA_real_, ddifmd007 = NA_integer_, ddifmd008 = NA_integer_, +# ddifmm009 = NA_real_, ddifmd010 = NA_real_, ddifmd011 = NA_real_, +# ddifmm012 = NA_integer_, ddifmd013 = NA_real_, ddifmm014 = NA_integer_, +# ddifmd015 = NA_real_, ddifmm016 = NA_integer_, ddifmd017 = NA_integer_, +# ddifmd018 = NA_integer_, ddifmm019 = NA_integer_, ddifmd020 = NA_integer_, +# ddifmd021 = NA_integer_, ddifmd022 = NA_integer_, ddifmd023 = NA_integer_, +# ddifmd024 = NA_integer_, ddifmm025 = NA_integer_, ddifmd026 = NA_integer_, +# ddifmd027 = NA_integer_, ddifmd028 = NA_integer_, ddicmm029 = NA_integer_, +# ddicmm030 = NA_integer_, ddicmm031 = NA_integer_, ddicmm032 = NA_integer_, +# ddicmm033 = NA_integer_, ddicmm034 = NA_integer_, ddicmm035 = NA_integer_, +# ddicmm036 = NA_integer_, ddicmm037 = NA_integer_, ddicmm038 = NA_integer_, +# ddicmm039 = NA_integer_, ddicmm040 = NA_integer_, ddicmm041 = NA_integer_, +# ddicmm042 = NA_integer_, ddicmm043 = NA_integer_, ddicmd044 = NA_integer_, +# ddicmm045 = NA_integer_, ddicmm046 = NA_integer_, ddicmm047 = NA_integer_, +# ddicmm048 = NA_integer_, ddicmd049 = NA_integer_, ddicmm050 = NA_integer_, +# ddicmm051 = NA_integer_, ddigmd052 = NA_real_, ddigmd053 = NA_real_, +# ddigmd054 = NA_integer_, ddigmd155 = NA_real_, ddigmd255 = NA_real_, +# ddigmd355 = NA_real_, ddigmd055 = NA_real_, ddigmd056 = NA_integer_, +# ddigmd057 = NA_integer_, ddigmd058 = NA_integer_, ddigmd059 = NA_real_, +# ddigmm060 = NA_integer_, ddigmd061 = NA_integer_, ddigmd062 = NA_integer_, +# ddigmd063 = NA_integer_, ddigmm064 = NA_integer_, ddigmm065 = NA_integer_, +# ddigmm066 = NA_integer_, ddigmm067 = NA_integer_, ddigmd068 = NA_real_, +# ddigmd168 = NA_real_, ddigmd268 = NA_real_, ddigmd069 = NA_integer_, +# ddigmd070 = NA_integer_, ddigmd071 = NA_real_, ddigmd072 = NA_integer_, +# ddigmm073 = NA_integer_, ddigmd074 = NA_integer_, ddigmd075 = NA_real_ +# ), +# class = "data.frame", row.names = c(NA, -1L) +# ) +# +# test_that("empty vector works with all keys", { +# expect_silent(dscore(scores, key = "dutch")) +# expect_silent(dscore(scores, key = "gcdg")) +# expect_silent(dscore(scores, key = "gsed")) +# }) +# +# # Variables to append +# n <- nrow(data) +# ids <- data.frame( +# id_chr = LETTERS[1:n], +# id_num = 128 + 1:n, +# a = NA_real_, +# d = rnorm(n) +# ) +# data2 <- data.frame(ids, data) +# +# test_that("prepend attaches two ID columns", { +# expect_equal(ncol(dscore(data2, prepend = c("id_chr", "id_num"))), 2 + 6) +# }) +# test_that("unknown variables names produce notfound warning", { +# expect_warning(dscore(data2, prepend = c("idonotexist")), "Not found: idonotexist") +# }) +# test_that("reserved names produce overwrite warning", { +# expect_warning(dscore(data2, prepend = c("a", "d"))) +# }) diff --git a/tests/testthat/test-prior.R b/tests/testthat/test-prior.R new file mode 100644 index 00000000..b2116627 --- /dev/null +++ b/tests/testthat/test-prior.R @@ -0,0 +1,15 @@ +context("prior") + +# Calculate the custom prior mean by adding 5 to the default prior mean +data <- milestones[1:10, ] +mymean <- dscore:::count_mu_preliminary_standards(t = data$age) + 5 + +# Method 1: Added variable +adj1 <- dscore(data = cbind(data, mymean), prior_mean = "mymean") + +# Method 2: Direct vector +adj2 <- dscore(data = data, prior_mean = mymean) + +test_that("Added variable and Direct vector prior yield same result", { + expect_identical(adj1, adj2) +}) diff --git a/vignettes/.gitignore b/vignettes/.gitignore index 2a72ded4..07ec81be 100644 --- a/vignettes/.gitignore +++ b/vignettes/.gitignore @@ -2,3 +2,5 @@ *.R *_cache + +/.quarto/ diff --git a/vignettes/custom_priors.Rmd b/vignettes/custom_priors.Rmd new file mode 100644 index 00000000..96cf80da --- /dev/null +++ b/vignettes/custom_priors.Rmd @@ -0,0 +1,173 @@ +--- +title: "Custom Priors (Advanced)" +output: + rmarkdown::html_vignette: + css: vignette.css +bibliography: [references.bib] +biblio-style: apalike +link-citations: true +vignette: > + %\VignetteIndexEntry{Custom Priors (Advanced)} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = TRUE, fig.width = 7, fig.height = 7) +``` + +## Background + +This vignette provides an overview of the default prior settings and demonstrates how to customize the prior mean and standard deviation for D-score calculations. This is an advanced topic that requires a basic understanding of the D-score calculation process. If you are unfamiliar with the D-score methodology, we recommend reviewing the introductory vignettes before proceeding. + +## Default Prior Mean and Standard Deviation + +The default prior mean and standard deviation for the `dscore()` function are determined by the `key` argument. This function searches for the corresponding `base_population` field in the `builtin_keys` data frame, which contains several columns including the following: + +```{r} +library(dscore) +builtin_keys[, c("key", "base_population")] +``` + +For instance, for `key = gsed2406`, the `base_population` is identified as `"preliminary_standards"`. The `get_mu()` function returns the prior mean for the specified `key` at different ages: + +```{r} +get_mu(t = c(0:12) / 12, key = "gsed2406") +``` + +This code snippet returns the prior mean for ages ranging from 0 to 12 months. These mean values represent the median of the D-score distribution for the specified `base_population` under the current `key`. + +If the standard deviation of the prior is not specified, the `dscore()` function defaults to a value of 5.0 across all ages. In comparison, the age-specific standard deviation for the `base_population` averages around 2.5 to 3.5. Therefore, a standard deviation of 5.0 signifies a relatively broad prior distribution, regardless of age. + +It's crucial to note that altering the `key` parameter changes both the prior mean and standard deviation. Since these parameters affect the D-score, comparisons should generally be made only between D-scores calculated using the same key, prior mean, and standard deviation. + +## Setting Your Own Prior Mean and Standard Deviation + +In certain situations, you may want to define your own prior mean and standard deviation for the D-score calculations. This can be done by setting the `prior_mean` and `prior_sd` arguments in the `dscore()` function. Below are a few examples that demonstrate how to customize these priors. + +### Example 1: Custom Prior Mean + +In this example, we add a value of 5 to the default prior mean for each child, which results in higher D-scores. + +```{r} +# Calculate the custom prior mean by adding 5 to the default prior mean +data <- milestones +mymean <- get_mu(t = data$age, key = "gsed2406") + 5 + +# Calculate default D-scores +def <- dscore(data, key = "gsed2406") +head(def) + +# Custom prior, direct specification +adj1 <- dscore(data, prior_mean = mymean, key = "gsed2406") +head(adj1) + +# Custom prior, column specification +adj2 <- dscore(cbind(data, mymean), prior_mean = "mymean", key = "gsed2406") +head(adj2) + +identical(adj1, adj2) +``` + +In this code, the `prior_mean` argument shows two forms. The first form directly specifies the custom prior mean, while the second form refers to an additional column in the data frame that contains the user-specified prior means. Both specifications yield identical results. In addition, the user can specify a scalar value for the `prior_mean` argument, which will be applied to all observations, but this option is unreasonable if ages vary across observations. + +The next snippet compares the adjusted and default D-scores as a function of the proportion of items passed by the child. + +```{r} +# Plot the difference between adjusted and default D-scores +plot( + y = adj1$d - def$d, + x = def$p, + xlab = "Proportion of items passed by the child", + ylab = "Upward drift of D-score", + pch = 16, + main = "Impact of Custom Prior Mean on D-score" +) + +# Add a smoothed line to visualize the trend +lines(lowess(x = def$p, y = adj1$d - def$d, f = 0.5), col = "grey", lwd = 2) +``` + +The plot illustrates that the upward bias is more pronounced when less informative items are administered, i.e., when the proportion of items passed is either very low (not shown) or very high. The bias is relatively mild (one D-score unit increase) when the child can perform about half of the items. + +### Example 2: Setting a Custom Prior Standard Deviation + +In some situations, we may have strong prior beliefs about the variability of the D-scores based on factors such as the trajectory of a child's D-score or expert knowledge. Incorporating this information can lead to more robust or smooth results by better reflecting our understanding of the variability. + +The following code snippet demonstrates how to set a custom prior standard deviation. Here, the `prior_sd` argument is specified using a constant value or values derived from the data. + +```{r} +# Filter data for a specific child +boy <- milestones[milestones$id == 111, ] + +# Calculate default D-scores +def <- dscore(boy, key = "gsed2406") +def +``` + +Suppose we want to inform the estimation process by the previous observation. We can use the location of the last observation (in DAZ units) and calculate an informative mean and standard deviation for the next time point as follows: + +```{r} +# Calculate expected D-scores and standard deviations +exp_d <- zad(z = c(0, def$daz[1:3]), x = def$a) +exp_sd <- c(5, def$sem[1:3]) + +# Calculate adjusted D-scores using the custom prior mean and standard deviation +adj1 <- dscore(boy, prior_mean = exp_d, prior_sd = exp_sd, key = "gsed2406") +``` + +The code snippet below plots the raw and informed DAZ trajectories for child 111: + +```{r fig.height=4} +# Plotting the raw and informed DAZ trajectories +plot( + x = def$a, + y = def$daz, + type = "b", + pch = 16, + ylab = "DAZ", + xlab = "Age (years)", + main = "Standard (black) and Informed (red) DAZ-trajectory for child 111" +) +points(x = adj1$a, y = adj1$daz, col = "red", type = "b", lwd = 2, pch = 16) +``` + +This plot illustrates the DAZ trajectory using standard estimates (in black) and the adjusted estimates (in red) for child 111, highlighting the impact of incorporating more informative prior knowledge into the analysis. + +Of course, the examples provided here are simplified and may not fully capture the complexity of real-world scenarios. However, they demonstrate how to customize the prior mean and standard deviation in the `dscore()` function to better reflect your prior knowledge and improve the accuracy of the D-score estimates. + +### Handling Missing Ages + +By default, the D-score of observations with missing ages will be `NA`. It is possible to force D-score calculation by setting `prior_mean_NA` and `prior_sd_NA` to a specific value. The documentation for the `dscore()` function states that `prior_mean_NA = 50` and `prior_sd_NA = 20` as reasonable choices for samples between 0-3 years. If these defaults are not suitable for your data, you can customize them to better reflect your expectations. + +### Example 3: Customizing Prior Mean and Standard Deviation for Missing Ages + +```{r} +# Set missing ages for specific observations +boy$age[2:3] <- NA + +# Calculate D-scores using default +def <- dscore(boy, key = "gsed2406") +def +``` + +This call to `dscore()` produces a D-score of `NA` when age data is missing, which effectively excludes these cases from downstream analyses. This is the safest option, and the default behavior. + +```{r} +# Calculate D-scores for missing ages using age-independent priors +adj1 <- dscore(boy, prior_mean_NA = 50, prior_sd_NA = 20, key = "gsed2406") +adj1 +``` + +This call to `dscore()` uses custom settings `prior_mean_NA = 50` and `prior_sd_NA = 20`, which are suggested age-independent values for children with missing ages between 0 and 3 years. + +```{r} +# Forcing D-scores for missing ages to value -1 +adj2 <- dscore(boy, prior_mean_NA = -1, prior_sd_NA = 0.001, key = "gsed2406") +adj2 +``` + +This call sets a custom prior mean and standard deviation `prior_mean_NA = -1` and `prior_sd_NA = 0.001`, effectively resulting in a constant value for the D-score (note that `prior_sd_NA = 0` produces missing values). + +Note that the `prior_mean_NA` and `prior_sd_NA` arguments are ignored when `prior_mean` and `prior_sd` are set per observation (either by direct or column specification). Those options allow for full control over the handling of missing ages on a case-by-case basis. + diff --git a/vignettes/getting_started.Rmd b/vignettes/getting_started.Rmd index be723060..fc43d1ae 100644 --- a/vignettes/getting_started.Rmd +++ b/vignettes/getting_started.Rmd @@ -5,7 +5,7 @@ output: css: vignette.css bibliography: [references.bib] biblio-style: apalike -link-citations: yes +link-citations: true vignette: > %\VignetteIndexEntry{Getting started} %\VignetteEngine{knitr::rmarkdown} @@ -13,124 +13,135 @@ vignette: > --- ```{r setup, include=FALSE} - knitr::opts_chunk$set(echo = TRUE, fig.retina = 2) - # options(width = 80) - suppressPackageStartupMessages(library(dplyr)) - suppressPackageStartupMessages(library(ggplot2)) +knitr::opts_chunk$set(echo = TRUE, fig.retina = 2) +# options(width = 80) +suppressPackageStartupMessages(library(dplyr)) +suppressPackageStartupMessages(library(ggplot2)) ``` ## Overview -The $D$-score is a one-number summary measure of early child development. The $D$-score has a fixed unit. In principle, we may use the $D$-score to [answer questions on the individual, group and population level](https://d-score.org/dbook1/sec-questions.html), but be aware that no instruments have yet been validated for individual application. For more background, see the introductory booklet [D-score: Turning milestones into measurement](https://d-score.org/dbook1/). +The D-score is a one-number summary measure of early child development. The D-score has a fixed unit. In principle, we may use the D-score to [answer questions on the individual, group and population level](https://d-score.org/dbook1/sec-questions.html), but be aware that no instruments have yet been validated for individual application. For more background, see the introductory booklet [D-score: Turning milestones into measurement](https://d-score.org/dbook1/). -This vignette shows how to estimate the $D$-score and the $D$-score age-adjusted Z-score (DAZ) from child data on developmental milestones. The vignette covers some typical actions needed when estimating the $D$-score and DAZ: +This vignette shows how to estimate the D-score and the D-score age-adjusted Z-score (DAZ) from child data on developmental milestones. The vignette covers some typical actions needed when estimating the D-score and DAZ: -1. Identify whether the `dscore` package covers your measurement instrument; -2. Map your variable names to the GSED 9-position schema; -3. Calculate $D$-score and DAZ; -4. Summarise your results. +1. Identify whether the `dscore` package covers your measurement instrument; +2. Map your variable names to the GSED 9-position schema; +3. Calculate D-score and DAZ; +4. Summarise your results. ## Is your measurement instrument covered? -The `dscore` package covers a subset of all possible assessment instruments. Moreover, it may have a restricted age range for a given instrument. Your first tasks are +The `dscore` package covers a subset of all possible assessment instruments. Moreover, it may have a restricted age range for a given instrument. Your first task is to evaluate whether the current `dscore` package can convert your measurements into D-scores. -- to evaluate whether the current `dscore` package can convert your measurements into $D$-scores; -- to choose a `key` that best suits your objectives. +A 2017 Worldbank report [@fernald2017] identified 147 instruments for assessing the development of children aged 0-8 years. Well-known examples include the *Bayley Scales for Infant and Toddler Development* and the *Ages & Stages Questionnaires*. The D-score is defined by and calculated from, subsets of milestones from such instruments. -The inventory by @fernald2017 identified [147 instruments](http://pubdocs.worldbank.org/en/685691512577486773/ECD-Measurement-Inventory-children-0-8-years-WorldBank.xlsx) for assessing the development of children aged 0-8 years. Well-known examples include the *Bayley Scales for Infant and Toddler Development* and the *Ages & Stages Questionnaires*. The $D$-score is defined by and calculated from, subsets of milestones from such instruments. +Assessment instruments connect to the D-score through a *measurement model*, the Rasch model. We use the term **key** to refer to a particular set of parameters (difficulty estimates) of a fitted Rasch model. The key defines how 0/1 milestone scores are translated into a D-score, as thus can be seen as part of the scoring system. -Assessment instruments connect to the $D$-score through a *measurement model*. We use the term *key* to refer to a particular instance of a measurement model. The `dscore` package currently supports the following keys (in historic order): +The `dscore` package contains a generic algorithm that takes: -1. `dutch`, a model developed for the *Dutch development instrument*; -2. `gcdg`, a model covering 14 instruments using *direct* measurements; -3. `gsed1912`, covers 20 instruments using a mix of *direct* and *caregiver-reported* measurements (Dec 2019); -5. `293_0`, covers only GSED SF (138 items) and GSED LF (155 items). GSED core model. (Aug 2022) -6. `gsed2212`, covers 23 instruments using a mix of *direct* and *caregiver-reported* measurements. Extends the GSED core model. (Jan 2022). +1. the 0/1 scores on a set of milestones for a given child; +2. the age(s) of the child at which the test is administered; +3. a specification of the key; -Different keys lead to different $D$-scores. Hence, we may compare only $D$-scores that are calculated under the same key. Our advice to set the key is: +and then calculates the **D-score** and its **Standard Error of Measurement (SEM)** for the child at each age. -- For new data, use the generic `key = "gsed"`. This choice will automatically fetch the latest GSED key; -- To explicitly set the most recent key use `key = "gsed2212"`. The ignores later keys. -- Use older keys `dutch`, `gcdg` or `gsed1912` to regenerate old results. These are unlikely to be useful for new data; -- Superseeded keys are: `gsed2206`, `gsed2208`, `lf2206`, `sf2006` and `294_0`. These are available for research purposes, and will be removed in future versions. +The `dscore` package currently supports the following keys (in historic order): -The table given below displays the number of items per instrument for various keys. If the entry is blank, the key does not cover the instrument. +| Key name | Description | Reference | +|:------------|:--------------------------------------------------------------------------------------------|:------------------------| +| `dutch` | A model developed for the *Dutch development instrument* | @vanbuuren2014 | +| `gcdg` | A model covering 13 instruments using *direct* measurements | @weber2019 | +| `gsed1912` | Covers 20 instruments using a mix of *direct* and *caregiver-reported* measurements | @vanbuuren2025 (Study 1)| +| `gsed2212` | Covers 23 instruments using a mix of *direct* and *caregiver-reported* measurements | @vanbuuren2025 (Study 2)| +| `gsed2406` | Covers 23 instruments using a mix of *direct* and *caregiver-reported* measurements. Same as gsed2212, but with a different base population. | @vanbuuren2025 (Study 2)| +| `gsed2510` | Currently covers 4 instruments - In development | In preparation (Study 3)| + +Different keys lead to (slightly) different D-scores. We may only compare D-scores that are calculated under the same key. Our advice to set the key is: +- For new data, use the generic `key = "gsed"`. This choice will automatically fetch the latest GSED key, which is `key = "gsed2510"`; +- Key `gsed2406` has a wider coverage, Use that if your instrument is not covered by `gsed2510`. +- Use older keys `dutch`, `gcdg` or `gsed1912` to regenerate old results. These are unlikely to be useful for new data; +- Superseded keys are: `gsed2212`, `gsed2206`, `gsed2208`, `lf2206`, `sf2006`, `294_0` and `293_0`. Use for research purposes only. + +The table given below displays the number of items per instrument for various keys. If the entry is blank, the key does not cover the instrument. -| Code | Instrument | Items | dutch | gcdg |gsed1912|gsed2212| 293_0 | -| ------ | ------------------------------------------------------- | -----:|------:|------:|------:|--------:|------:| -| `aqi` | Ages & Stages Questionnaires-3 | 230 | | 29 | 17 | 17 | | -| `bar` | Barrera Moncada | 22 | | 15 | 13 | 13 | | -| `bat` | Battelle Development Inventory and Screener-2 | 137 | | | | | | -| `by1` | Bayley Scales for Infant and Toddler Development-1 | 156 | | 85 | 76 | 76 | | -| `by2` | Bayley Scales for Infant and Toddler Development-2 | 121 | | 16 | 16 | 16 | | -| `by3` | Bayley Scales for Infant and Toddler Development-3 | 320 | | 105 | 67 | 67 | | -| `cro` | Caregiver Reported Early Development Instrument (CREDI) | 149 | | | 62 | 64 | | -| `ddi` | Dutch Development Instrument (Van Wiechenschema) | 77 | 76 | 65 | 64 | 64 | | -| `den` | Denver-2 | 111 | | 67 | 50 | 50 | | -| `dmc` | Developmental Milestones Checklist | 66 | | | 43 | 43 | | -| `gri` | Griffiths Mental Development Scales | 312 | | 104 | 93 | 18 | | -| `gs1` | GSED SF (v1, Phase 2 validation) | 139 | | | | 138 | | -| `gl1` | GSED LF (v1, Phase 2 validation) | 155 | | | | 155 | | -| `gh1` | GSED HF (v1, JAN 2023 version 20230113) | 55 | | | | 55 | | -| `gto` | GSED LF (v0, Phase 1 validation) | 155 | | | | 155 | 155 | -| `gpa` | GSED SF (v0, Phase 1 validation) | 139 | | | | 138 | 138 | -| `iyo` | Infant and Young Child Development (IYCD) | 90 | | | 55 | 57 | | -| `kdi` | Kilifi Developmental Inventory | 69 | | | 48 | 48 | | -| `mac` | MacArthur Communicative Development Inventory | 6 | | 3 | 3 | 3 | | -| `mds` | WHO Motor Development Milestones | 6 | | | 1 | 1 | | -| `mdt` | Malawi Developmental Assessment Tool (MDAT) | 136 | | | 126 | 126 | | -| `peg` | Pegboard | 2 | | 1 | 1 | 1 | | -| `pri` | Project on Child Development Indicators (PRIDI) | 63 | | | | | | -| `sbi` | Stanford Binet Intelligence Scales-4/5 | 33 | | 6 | 5 | 5 | | -| `sgr` | Griffiths for South Africa | 58 | | 19 | 19 | 19 | | -| `tep` | Test de Desarrollo Psicomotor (TEPSI) | 61 | | 33 | 31 | 31 | | -| `vin` | Vineland Social Maturity Scale | 50 | | 17 | 17 | 17 | | -| | | | 76 | 565 | 807 | 818 | 293 | -| | Extensions | | | | | | | -| `ecd` | Eerly Child Development Indicators (ECDI) | 20 | | | | 18 | | -| `mul` | Mullen Scales of Early Learning | 232 | | | 138 | | | - -Unfortunately, it is not possible to calculate the $D$-score if your instrument is not on the list, or if all of its entries under the key headings are blank. You may wish to file an extension request to incorporate your instrument in a future version of the `dscore` package. It remains an empirical question, however, whether the requested extension is possible. - -For some instruments, e.g., for `cro` only one choice is possible (`"gsed"`). For `gri`, we may choose between `"gcdg"` and `"gsed1912"` or `"gsed2212"`. Your choice may depend on the goal of your analysis. If you want to compare to other $D$-scores calculated under key `"gcdg"`, or reproduce an analysis made under that key, then pick `"gcdg"`. If that is not the case, then `"gsed2212"` is probably a better choice because of its broader generalizability. The default key is `"gsed"`. Before version 1.5.0 the default linked to `"gsed1912"`. Since version 1.7.0 the default selects `"gsed2212"`. - -The extensions for Mullen were added to the "`"gsed1912"` key. The extension was made based on two datasets, the Provide dataset [@provide] and the Bambam dataset [@bambam]. The Mullen items were matched to existing items and two well fitting items were selected as anchors in a new model on the combined Provide and Bambam data. +| Code | Instrument | Items | dutch | gcdg | gsed1912 | gsed2406 | gsed2510 | +|-------|-------------------------|------:|------:|------:|------:|------:|------:| +| `aqi` | Ages & Stages Questionnaires-3 | 230 | | 29 | 17 | 17 | | +| `bar` | Barrera Moncada | 22 | | 15 | 13 | 13 | | +| `bat` | Battelle Development Inventory and Screener-2 | 137 | | | | | | +| `by1` | Bayley Scales for Infant and Toddler Development-1 | 156 | | 85 | 76 | 76 | | +| `by2` | Bayley Scales for Infant and Toddler Development-2 | 121 | | 16 | 16 | 16 | | +| `by3` | Bayley Scales for Infant and Toddler Development-3 | 320 | | 105 | 67 | 172 | 242 | +| `cro` | Caregiver Reported Early Development Instrument (CREDI) | 149 | | | 62 | 64 | | +| `ddi` | Dutch Development Instrument (Van Wiechen Schema) | 77 | 76 | 65 | 64 | 64 | | +| `den` | Denver-2 | 111 | | 67 | 50 | 50 | | +| `dmc` | Developmental Milestones Checklist | 66 | | | 43 | 43 | | +| `gri` | Griffiths Mental Development Scales | 312 | | 104 | 93 | 18 | | +| `gs1` | GSED SF (2023) | 139 | | | | 138 | 136 | +| `gl1` | GSED LF (2023) | 155 | | | | 155 | 145 | +| `gh1` | GSED HF (2023) | 48 | | | | 48 | 48 | +| `iyo` | Infant and Young Child Development (IYCD) | 90 | | | 55 | 57 | | +| `kdi` | Kilifi Developmental Inventory | 69 | | | 48 | 48 | | +| `mac` | MacArthur Communicative Development Inventory | 6 | | 3 | 3 | 3 | | +| `mds` | WHO Motor Development Milestones | 6 | | | 1 | 1 | | +| `mdt` | Malawi Developmental Assessment Tool (MDAT) | 136 | | | 126 | 126 | | +| `peg` | Pegboard | 2 | | 1 | 1 | 1 | | +| `pri` | Project on Child Development Indicators (PRIDI) | 63 | | | | | | +| `sbi` | Stanford Binet Intelligence Scales-4/5 | 33 | | 6 | 5 | 5 | | +| `sgr` | Griffiths for South Africa | 58 | | 19 | 19 | 19 | | +| `tep` | Test de Desarrollo Psicomotor (TEPSI) | 61 | | 33 | 31 | 31 | | +| `vin` | Vineland Social Maturity Scale | 50 | | 17 | 17 | 17 | | +| | | | | | | | | +| | Extensions | | | | | | | +| `ecd` | Early Child Development Indicators (ECDI) | 20 | | | | 18 | | +| `mul` | Mullen Scales of Early Learning | 232 | | | 138 | | | + +You can’t compute a D-score if your instrument isn’t supported. If it does measure child development, we can often extend the key to include it. This requires a one-time effort—mapping your items to the milestone schema and estimating difficulty parameters. Once added, the key is reusable, and you’ll be able to compute valid D-scores for that instrument. The table shows two such extensions: one for Mullen and one for ECDI. ```{r graphkey, fig.width = 7, fig.height = 5, echo = FALSE} +#| code-fold: true library(dscore) -ib <- builtin_itembank %>% - filter(key == "gsed2212") %>% - mutate(a = get_age_equivalent(items = item, pct = 50, - itembank = builtin_itembank)$a, - a = a * 12) %>% - select(a, instrument, label) %>% +ib <- builtin_itembank |> + filter(key == "gsed2406") |> + mutate( + a = get_age_equivalent( + items = item, + pct = 50, + itembank = builtin_itembank + )$a, + a = a * 12 + ) |> + select(a, instrument, label) |> na.omit() - + ggplot(ib, aes(x = a, y = instrument, group = instrument)) + scale_y_discrete(limits = rev(unique(ib$instrument)), name = "") + - scale_x_continuous(limits = c(0, 60), - breaks = seq(0, 60, 12), name = "Age (months)") + - geom_point(pch = 3, size = 1, colour = "blue") + + scale_x_continuous( + limits = c(0, 60), + breaks = seq(0, 60, 12), + name = "Age (months)" + ) + + geom_point(pch = 3, size = 1, colour = "blue") + theme_light() + theme(axis.text.y = element_text(hjust = 0, family = "mono")) ``` -The designs of the original cohorts determine the age coverage for each instrument. The figure above indicates the age range currently supported by the `"gsed2212"` key. Some instruments contain many items for the first two years (e.g., `by1`, `dmc`), whereas others cover primarily upper ages (e.g., `tep`, `ecd`). If you find that the ages in your sample deviate from those in the figure, you may wish to file an extension request to incorporate new ages in a future version of the `dscore` package. - +The designs of the original cohorts determine the age coverage for each instrument. The figure above indicates the age range currently supported by the `"gsed2510"` key. -## Map variable names to the GSED 9-position schema +## GSED 9-position item names The `dscore()` function accepts item names that follow the GSED 9-position schema. A name with a length of nine characters identifies every milestone. The following table shows the construction of names. -Position | Description | Example -----------:|:-------------------- |:------------- -1-3 | instrument | `by3` -4-5 | developmental domain | `cg` -6 | administration mode | `d` -7-9 | item number | `018` +| Position | Description | Example | +|---------:|:---------------------|:--------| +| 1-3 | instrument | `by3` | +| 4-5 | developmental domain | `cg` | +| 6 | administration mode | `d` | +| 7-9 | item number | `018` | -Thus, item `by3cgd018` refers to the 18th item in the cognitive scale of the Bayley-III. The label of the item can be obtained by +Thus, item `by3cgd018` refers to the 18th item in the cognitive scale of the Bayley-III. The label of the item can be obtained by ```{r getlabels} library(dscore) @@ -143,14 +154,16 @@ You may decompose item names into components as follows: decompose_itemnames(c("by3cgd018", "denfmd014")) ``` -This function returns a `data.frame` with four character vectors. +This function returns a `data.frame` with four character vectors for further processing. -The `dscore` package can recognise `r nrow(dscore::builtin_itemtable)` item names. The expression `get_itemnames()` returns a (long) vector of all known item names. Let us construct a table of instruments by domains: +The `dscore` package recognises `r nrow(dscore::builtin_itemtable)` item names. The expression `get_itemnames()` returns a (long) vector of all known item names. Let us study the table of instruments by domain: ```{r table} +#| code-fold: true items <- get_itemnames() -din <- decompose_itemnames(items) -knitr::kable(with(din, table(instrument, domain)), format = "html") %>% +din <- decompose_itemnames(items) |> + dplyr::filter(!instrument %in% c("gsd", "gpa", "gto", "rap")) +knitr::kable(with(din, table(instrument, domain)), format = "html") |> kableExtra::column_spec(1, monospace = TRUE) ``` @@ -161,11 +174,16 @@ items <- head(get_itemnames(instrument = "mdt", domain = "gm"), 3) get_labels(items) ``` -In practice, you need to spend some time to figure out how item names in your data map to those in the `dscore` package. Once you've completed this mapping, rename the items into the GSED 9-position schema. For example, suppose that your first three gross motor MDAT items are called `mot1`, `mot2`, and `mot3`. +In practice, you need to spend some time to figure out how item names in your data map to those in the `dscore` package. Once you've completed this mapping, rename the items into the GSED 9-position schema. For example, suppose that your first three gross motor MDAT items are called `mot1`, `mot2`, and `mot3`. ```{r smalldataset} -data <- data.frame(id = c(1, 1, 2), age = c(1, 1.6, 0.9), mot1 = c(1, NA, NA), - mot2 = c(0, 1, 1), mot3 = c(NA, 0, 1)) +data <- data.frame( + id = c(1, 1, 2), + age = c(1, 1.6, 0.9), + mot1 = c(1, NA, NA), + mot2 = c(0, 1, 1), + mot3 = c(NA, 0, 1) +) data ``` @@ -182,10 +200,9 @@ There may be different versions and revision of the same instrument. Therefore, The `dscore` package assumes that response to milestones are dichotomous (1 = PASS, 0 = FAIL). If necessary, recode your data to match these response categories. -## Calculate the $D$-score and DAZ +## Calculate the D-score and DAZ - -Once the data are in proper shape, calculation of the $D$-score and DAZ is easy. +Once the data are in proper shape, calculation of the D-score and DAZ is easy. The `milestones` dataset in the `dscore` package contains responses of 27 preterm children measured at various age between birth and 2.5 years on the Dutch Development Instrument (`ddi`). The dataset looks like: @@ -193,12 +210,12 @@ The `milestones` dataset in the `dscore` package contains responses of 27 preter head(milestones[, c(1, 3, 4, 9:14)]) ``` -Each row corresponds to a visit. Most children have three or four visits. Columns starting with `ddi` hold the responses on DDI-items. A `1` means a PASS, a `0` means a FAIL, and `NA` means that the item was not administered. +Each row corresponds to a visit. Most children have three or four visits. Columns starting with `ddi` hold the responses on DDI-items. A `1` means a PASS, a `0` means a FAIL, and `NA` means that the item was not administered. -The `milestones` dataset has properly named columns that identify each item. Calculating the $D$-score and DAZ is then done by: +The `milestones` dataset has properly named columns that identify each item. Calculating the D-score and DAZ is then done by: ```{r} -ds <- dscore(milestones) +ds <- dscore(milestones, population = "dutch", key = "dutch") dim(ds) ``` @@ -208,18 +225,21 @@ Where `ds` is a `data.frame` with the same number of rows as the input data. The head(ds) ``` -The table below provides the interpretation of the output: -Name | Interpretation ----- | ------------- -`a` | Decimal age -`n` | number of items used to calculate $D$-score -`p` | Percentage of passed milestones -`d` | $D$-score estimate, mean of posterior -`sem` | Standard error of measurement, standard deviation of the posterior -`daz` | $D$-score corrected for age +In addition, the package calculate the **Development-for-Age Z-score (DAZ)**, which gives the position of the child relative to age peers. + +The table below provides the interpretation of the output: -## Summarise $D$-score and DAZ +| Name | Interpretation | +|------------------|------------------------------------------------------| +| `a` | Decimal age | +| `n` | number of items used to calculate D-score | +| `p` | Percentage of passed milestones | +| `d` | D-score estimate, mean of posterior | +| `sem` | Standard error of measurement, standard deviation of the posterior | +| `daz` | D-score corrected for age | + +## Summarise D-score and DAZ Combine the `milestones` data and the result by @@ -230,81 +250,127 @@ md <- cbind(milestones, ds) We may plot the 27 individual developmental curves by ```{r graphD, fig.width = 7, fig.height = 7} +#| code-fold: true library(ggplot2) library(dplyr) -r <- builtin_references %>% - filter(pop == "dutch") %>% - select(age, SDM2, SD0, SDP2) +# Prepare the reference ribbon data: sort by age and convert months → years +r <- builtin_references %>% + filter(population == "dutch" & key == "dutch") %>% + transmute(age_years = age, SDM2, SD0, SDP2) %>% + arrange(age_years) -ggplot(md, aes(x = a, y = d, group = id, color = sex)) + - theme_light() + - theme(legend.position = c(.85, .15)) + - theme(legend.background = element_blank()) + - theme(legend.key = element_blank()) + - annotate("polygon", x = c(r$age, rev(r$age)), - y = c(r$SDM2, rev(r$SDP2)), alpha = 0.1, fill = "green") + - annotate("line", x = r$age, y = r$SDM2, lwd = 0.3, alpha = 0.2, color = "green") + - annotate("line", x = r$age, y = r$SDP2, lwd = 0.3, alpha = 0.2, color = "green") + - annotate("line", x = r$age, y = r$SD0, lwd = 0.5, alpha = 0.2, color = "green") + +ggplot(md, aes(x = a, y = d, group = id, colour = sex)) + + theme_light() + + theme( + legend.position = c(0.85, 0.15), + legend.background = element_blank(), + legend.key = element_blank() + ) + + geom_ribbon( + data = r, + inherit.aes = FALSE, + aes(x = age_years, ymin = SDM2, ymax = SDP2), + fill = "green", + alpha = 0.1 + ) + + geom_line( + data = r, + inherit.aes = FALSE, + aes(x = age_years, y = SDM2), + linewidth = 0.3, + alpha = 0.6, + colour = "green" + ) + + geom_line( + data = r, + inherit.aes = FALSE, + aes(x = age_years, y = SDP2), + linewidth = 0.3, + alpha = 0.6, + colour = "green" + ) + + geom_line( + data = r, + inherit.aes = FALSE, + aes(x = age_years, y = SD0), + linewidth = 0.5, + alpha = 0.8, + colour = "green" + ) + coord_cartesian(xlim = c(0, 2.5)) + - ylab(expression(paste(italic(D), "-score", sep = ""))) + - xlab("Age (in years)")+ + ylab(expression(italic(D) * "-score")) + + xlab("Age (years)") + scale_color_brewer(palette = "Set1") + - geom_line(lwd = 0.1) + + geom_line(linewidth = 0.1) + geom_point(size = 1) ``` Note that similarity of these curves to growth curves for body height and weight. -The DAZ is an age-standardized $D$-score with a standard normal distribution with mean 0 and variance 1. We plot the individual DAZ curves relative to the Dutch references by +The DAZ is an age-standardized D-score with a standard normal distribution with mean 0 and variance 1. We plot the individual DAZ curves relative to the Dutch references by ```{r graphDAZ, fig.width = 7, fig.height = 5} -ggplot(md, aes(x = a, y = daz, group = id, color = factor(sex))) + - theme_light() + +#| code-fold: true +ggplot(md, aes(x = a, y = daz, group = id, color = factor(sex))) + + theme_light() + theme(legend.position = c(.85, .15)) + theme(legend.background = element_blank()) + theme(legend.key = element_blank()) + scale_color_brewer(palette = "Set1") + - annotate("rect", xmin = -Inf, xmax = Inf, ymin = -2, ymax = 2, alpha = 0.1, - fill = "green") + - coord_cartesian(xlim = c(0, 2.5), - ylim = c(-4, 4)) + + annotate( + "rect", + xmin = -Inf, + xmax = Inf, + ymin = -2, + ymax = 2, + alpha = 0.1, + fill = "green" + ) + + coord_cartesian( + xlim = c(0, 2.5), + ylim = c(-4, 4) + ) + geom_line(lwd = 0.1) + geom_point(size = 1) + xlab("Age (in years)") + - ylab("DAZ") + ylab("DAZ") ``` -Note that the $D$-scores and DAZ are a little lower than average. The explanation here is that these all children are born preterm. We can [account for prematurity](https://d-score.org/dbook1/sec-pops.html#age-adjustment) by correcting for gestational age. +Note that the D-scores and DAZ are a little lower than average. The explanation here is that these all children are born preterm. We can [account for prematurity](https://d-score.org/dbook1/sec-pops.html#age-adjustment) by correcting for gestational age. The distributions of DAZ for boys and girls show that a large overlap: ```{r density, fig.width = 7, fig.height = 4} -ggplot(md) + +#| code-fold: true +ggplot(md) + theme_light() + scale_fill_brewer(palette = "Set1") + - geom_density(aes(x = daz, group = sex, fill = sex), alpha = 0.4, - adjust = 1.5, color = "transparent") + + geom_density( + aes(x = daz, group = sex, fill = sex), + alpha = 0.4, + adjust = 1.5, + color = "transparent" + ) + xlab("DAZ") ``` Under the assumption of independence, we may test whether sex differences are constant in age by a linear regression that includes the interaction between age and sex: ```{r independence} -summary(lm(daz ~ age * sex, data = md)) +summary(lm(daz ~ age * sex, data = md)) ``` -This group of very preterms starts around -2.5 SD, followed by a catch-up in child development of approximately 1.0 SD per year. The size of the catch-up is equal for boys and girls. +This group of children born very preterm starts around -2.5 SD, followed by a catch-up in child development of approximately 1.0 SD per year. The size of the catch-up is equal for boys and girls. We may account for the clustering effect by including random intercept and age effects, and rerun as ```{r multilevel} -library(lme4) -lmer(daz ~ 1 + age + sex + sex * age + (1 + age | id), data = md) +library(Matrix) +library(lme4, quiet = TRUE) +lmer(daz ~ 1 + age + sex + sex * age + (1 + age | id), data = md) ``` This analysis yields the same substantive conclusions as before. -## References - +## References \ No newline at end of file diff --git a/vignettes/multiple_keys.Rmd b/vignettes/multiple_keys.Rmd new file mode 100644 index 00000000..694112ac --- /dev/null +++ b/vignettes/multiple_keys.Rmd @@ -0,0 +1,179 @@ +--- +title: "Multiple keys (Advanced)" +output: + rmarkdown::html_vignette: + css: vignette.css +bibliography: [references.bib] +biblio-style: apalike +link-citations: true +vignette: > + %\VignetteIndexEntry{Multiple keys (Advanced)} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = TRUE, fig.width = 7, fig.height = 7) +``` + +**In preparation** + +## Motivation + +A **key** is a set of difficulty estimates linked to items from one or more instruments. As more data become available, the key may be updated periodically to incorporate the additional information. This results in multiple versions of the key. Although keys are designed to produce D-scores on the same general scale, each key defines a slightly different scale. As a result, the same set of child responses may yield different D-scores depending on which key is used. + +For new data, the most recent default key is usually recommended. However, if strict comparability with earlier analyses is important, it may be preferable to use an older key. + +This vignette explains the policy for setting default keys and demonstrates how to compare D-scores across different keys. Because this is an advanced topic, it assumes a basic understanding of the D-score calculation process. If you are new to the D-score methodology, we recommend reviewing the introductory vignettes before proceeding. + +## Relation to the D-score + +- The D-score depends on the **difficulty parameters** defined by a key. +- Updating a key updates those parameters and can slightly shift scores. +- Differences are typically small but may matter for strict comparability. + +```{r, eval=FALSE} +# Example (pseudo-code): compute a D-score given a key +# library(dscore) +# d1 <- dscore(items = x, key = "gsed2406") +# d2 <- dscore(items = x, key = "gsed2510") +# cbind(d1, d2, diff = d2 - d1) +``` + +# Default vs. Alternative Keys + +## Policy for default key selection + +Describe how the **default key** is chosen (e.g., most recent stable release) and how often it is updated. State where users can find the current default in the package documentation. + +## When to use an older key + +- Ensure **comparability** with past analyses or publications. +- Reproduce earlier results precisely. +- Regulatory or reporting requirements that fix a specific key. + +```{r, eval=FALSE} +# Check the package default key (example; replace with your function) +# dscore::get_default_key() +``` + +# Working with Keys in Practice + +## List available keys + +Show users how to **enumerate** supported keys. + +```{r, eval=FALSE} +# Example (replace with the actual function name) +# keys <- dscore::list_keys() +# keys +``` + +## Set the key + +Demonstrate how to **select** a specific key in your workflow. + +```{r, eval=FALSE} +# Example usage +# ds <- dscore(data, key = "gsed2406") +``` + +## Change the default (session or project) + +Explain **global vs. local** configuration, and how to set a default key for a session or project. + +```{r, eval=FALSE} +# Session-level default (illustrative; adapt to your API) +# options(dscore.default_key = "gsed2510") + +# Confirm +# getOption("dscore.default_key") +``` + +# Comparing Keys + +## Impact on D-scores + +Show the **same dataset** scored under two keys and compare. + +```{r, eval=FALSE} +# Example skeleton +# ds1 <- dscore(dat, key = "gsed2406") +# ds2 <- dscore(dat, key = "gsed2510") +# comp <- transform(dat, d1 = ds1$D, d2 = ds2$D, diff = ds2$D - ds1$D) +# head(comp) +``` + +## Diagnostics + +Provide simple diagnostics to understand differences (plots/tables). + +```{r, eval=FALSE} +# Histogram of differences +# hist(comp$diff, main = "D-score differences (new - old)", xlab = "Difference") + +# Correlation and summary +# cor(comp$d1, comp$d2, use = "complete.obs") +# summary(comp$diff) +``` + +## Stability over time + +Discuss empirical evidence (e.g., **median absolute difference**, 95% intervals) showing that differences across keys are generally small. + +```{r, eval=FALSE} +# Example summary +# mad <- median(abs(comp$diff), na.rm = TRUE) +# quant <- quantile(comp$diff, probs = c(0.025, 0.5, 0.975), na.rm = TRUE) +# list(median_abs_diff = mad, quantiles = quant) +``` + +# Caveats and Limitations + +- **Instrument versions/translations**: published item orders may differ, which can limit the feasibility of a single “native” ordering across locales. +- **Mixing keys**: avoid scoring datasets with **different keys** when analyses are compared directly across groups or time. +- **Reporting**: always record and report the **key identifier** used. + +# Recommendations for Users + +- Prefer the **most recent default key** for new studies. +- Use an **older key** when exact comparability is required. +- In publications and reports, **cite the key** (name and version/date). + +# Worked Examples + +## Example 1: Score with the default key + +```{r, eval=FALSE} +# dat <- read.csv("your_data.csv") +# ds_default <- dscore(dat) # implicit default key +# head(ds_default) +``` + +## Example 2: Score with a specific older key and compare + +```{r, eval=FALSE} +# ds_old <- dscore(dat, key = "gsed2406") +# ds_new <- dscore(dat, key = "gsed2510") +# delta <- ds_new$D - ds_old$D +# summary(delta) +``` + +## Example 3: Visualize differences + +```{r, eval=FALSE} +# plot(ds_old$D, ds_new$D, +# xlab = "Old key D-score", +# ylab = "New key D-score", +# main = "D-scores under two keys") +# abline(0, 1, lty = 2) +``` + +# Reproducibility Notes + +- Always record: **key**, **package version**, **date**, **random seed** (if any). +- Provide session info in appendices. + +```{r session-info, echo=FALSE} +sessionInfo() +``` diff --git a/vignettes/references.bib b/vignettes/references.bib index 87eb5bf3..eeb6e24c 100644 --- a/vignettes/references.bib +++ b/vignettes/references.bib @@ -104,5 +104,24 @@ @Article{mccray2023 location = {School of Medicine, Keele University, Keele, UK g.mccray@keele.ac.uk. Harvard Graduate School of Education, Cambridge, Massachusetts, USA. Consultant, WHO, Geneve, Switzerland. Offord Centre for Child Studies, Department of Psychiatry and Behavioural Neurosciences, McMaster University, Hamilton, Ontario, Canada. Department of Pediatrics, University of Maryland School of Medicine, Baltimore, Maryland, USA. RTI International, Research Triangle Park, North Carolina, USA. Caribbean Institute for Health Research, The University of the West Indies, Kingston, Jamaica. Nutrition and Clinical Services Division, International Centre for Diarrhoeal Disease Research Bangladesh, Dhaka, Bangladesh. Department of Child Health, TNO, Leiden, The Netherlands. College of Public Health, University of Nebraska Medical Center, Omaha, Nebraska, USA. Department of Child Health, TNO, Leiden, The Netherlands. Department of International Health, Johns Hopkins, Baltimore, Maryland, USA. Center for Public Health Kinetics, New Delhi, New Delhi, India. Department of Pediatrics and Child Health, Faculty of Health Sciences, Medical College, The Aga Khan University, Karachi, Pakistan. Department of Child Health, TNO, Leiden, The Netherlands. Innovations for Poverty Action, Washington, District of Columbia, USA. Pediatrics, Universidade de Sao Paulo Faculdade de Medicina, Sao Paulo, Brazil. Shanghai Children’s Medical Center Affiliated to Shanghai Jiaotong University School of Medicine, Shanghai, Shanghai, China. National Children’s Medical Center, Shanghai Children’s Medical Center affiliated to School of Medicine, Shanghai Jiao Tong University, Shanghai, China. Brain Health Unit, Mental Health and Substance Use Department, World Health Organization, Geneve, Switzerland. Brain Health Unit, Mental Health and Substance Use Department, World Health Organization, Geneve, Switzerland. College of Public Health, University of Nebraska Medical Center, Omaha, Nebraska, USA. School of Public Health, University of Nevada Reno, Reno, Nevada, USA. School of Medicine, Keele University, Keele, UK. International Center for Maternal and Newborn Health, Johns Hopkins University Bloomberg School of Public Health, Baltimore, Maryland, USA. Projahnmo Research Foundation, Dhaka, Bangladesh. Paediatrics, Aga Khan University, Karrachi, Pakistan. Department of Child Health, TNO, Leiden, The Netherlands. Innovations for Poverty Action, Washington, District of Columbia, USA. Pediatrics, Universidade de Sao Paulo Faculdade de Medicina, Sao Paulo, Brazil. Shanghai Children’s Medical Center Affiliated to Shanghai Jiaotong University School of Medicine, Shanghai, Shanghai, China. Brain Health Unit, Mental Health and Substance Use Department, World Health Organization, Geneve, Switzerland. University of Nebraska-Lincoln College of Education and Human Sciences, Lincoln, Nebraska, USA. Inter-American Development Bank, Washington, District of Columbia, USA. Innovations for Poverty Action, Washington, District of Columbia, USA. Projahnmo Research Foundation, Dhaka, Bangladesh. School of Medicine, Keele University, Keele, UK. Women and Children’s Health, University of Liverpool, Liverpool, UK.}, keywords = {}} +@TechReport{gsedteam2023, +author = {{World Health Organization (WHO)}}, +title = {{Global Scales for Early Development (GSED) V1.0: Technical Report}}, +institution = {World Health Organization}, +address = {Geneva}, +pages = {}, +year = {2023}, +abstract = {}, +keywords = {}, +url = {https://www.who.int/publications/i/item/WHO-MSD-GSED-package-v1.0-2023.1}} - +@article{vanbuuren2025, +author = {{van Buuren}, S. and Eekhout, I. and {McCray}, G. and Lancaster, G. A. and Waldman, M. R. and McCoy, D. C. and Gladstone, M. and Cavallera, V. and Dua, T. and Black, M. M. and {GSED Team}}, +title ={Enhancing comparability in early child development assessment with the D-score}, +journal = {International Journal of Behavioral Development}, +volume = {49}, +number = {4}, +pages = {348-364}, +year = {2025}, +doi = {10.1177/01650254241294033}, +URL = {https://doi.org/10.1177/01650254241294033}} diff --git a/vignettes/scoring_GSED.Rmd b/vignettes/scoring_GSED.Rmd index 0363d053..c943715d 100644 --- a/vignettes/scoring_GSED.Rmd +++ b/vignettes/scoring_GSED.Rmd @@ -1,11 +1,12 @@ --- title: "Scoring GSED" -output: - rmarkdown::html_vignette: - css: vignette.css +output: + rmarkdown::html_document: + toc: true + self_contained: true bibliography: [references.bib] biblio-style: apalike -link-citations: yes +link-citations: true vignette: > %\VignetteIndexEntry{Scoring GSED} %\VignetteEngine{knitr::rmarkdown} @@ -18,25 +19,25 @@ knitr::opts_chunk$set(echo = TRUE) ## D-score and DAZ -Suppose you have administered GSED SF, GSED LF [@mccray2023] or GSED HF to one or more children. The next step is calculating each child's developmental score ($D$-score) and age-adjusted equivalent (DAZ). This step is known as **scoring**. The present section provides recipes for calculating the $D$-score and DAZ. We may pick one of the following two methods: +Suppose you have administered GSED SF, GSED LF [@gsedteam2023; @mccray2023] or GSED HF to one or more children. The next step is calculating each child's developmental score (D-score) and age-adjusted equivalent (DAZ). This step is known as **scoring**. The present section provides recipes for calculating the D-score and DAZ. We may pick one of the following two methods: -1. Online calculator. The online Shiny app 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. `R` package `dscore`. The `R` package `dscore` at is a flexible option with all the tools needed to calculate the $D$-score. It is an excellent choice for users familiar with `R` and users who like to incorporate $D$-score calculations into a workflow. +1. Online calculator. The online app [D-score calculator](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. `R` package `dscore`. The `R` package `dscore` at is a flexible option with all the tools needed to calculate the D-score. It is an excellent choice for users familiar with `R` and users who like to incorporate D-score calculations into a workflow. -## Preliminaries +### Preliminaries -- We use the `R` language. If you are new to `R` consult the [Getting Started with R](https://support.posit.co/hc/en-us/articles/201141096-Getting-Started-with-R) site; -- You need to install the `R` package `dscore` on your local machine; -- The child data need to be stored as a `data.frame`, a standard `R` tabular structure; -- You need to run the `dscore()` function to calculate the $D$-score and DAZ. The function returns a table with six columns with the estimates with the same number of rows as your data. +- We use the `R` language. If you are new to `R` consult the [R for Data Science](https://r4ds.had.co.nz/) book by Hadley Wickham and Garrett Grolemund; +- You need to install the `R` package `dscore` on your local machine; +- The child data need to be stored as a `data.frame`, a standard `R` tabular structure; +- You need to run the `dscore()` function to calculate the D-score and DAZ. The function returns a table with six columns with the estimates with the same number of rows as your data. -## Install the `dscore` package +### Install the `dscore` package The `dscore` package contains tools to -- Map your item names to the GSED convention -- Calculate *D*-scores from item level responses -- Transform the *D*-scores into DAZ, age-standardised Z-scores +- Map your item names to the GSED convention +- Calculate D-scores from item level responses +- Transform the D-scores into DAZ, age-standardised Z-scores The required input consists of *item level* responses on milestones collected using instruments for measuring child development, including the GSED LF, GSED SF and GSED HF. @@ -56,68 +57,66 @@ remotes::install_github("d-score/dscore") The development version requires a local C++ compiler for building the package from source. ```{r include=FALSE} -stopifnot(packageVersion("dscore") >= "1.8.0") +stopifnot(packageVersion("dscore") >= "2.0.4") ``` - ## GSED 9-position item names The `dscore()` function accepts item names that follow the GSED 9-position schema. A name with a length of nine characters identifies every milestone. The following table shows the construction of names. -Position | Description | Example -----------:|:-------------------- |:------------- -1-3 | instrument | `by3` -4-5 | developmental domain | `cg` -6 | administration mode | `d` -7-9 | item number | `018` +| Position | Description | Example | +|---------:|:---------------------|:--------| +| 1-3 | instrument | `by3` | +| 4-5 | developmental domain | `cg` | +| 6 | administration mode | `d` | +| 7-9 | item number | `018` | -Thus, item `by3cgd018` refers to the 18th item in the cognitive scale of the Bayley-III. The label of the item can be obtained by +Thus, item `by3cgd018` refers to the 18th item in the cognitive scale of the Bayley-III. The label of the item can be obtained by ```{r getlabels} library(dscore) get_labels("by3cgd018") ``` -The `dscore` package maintains a list of items names. +The `dscore` package maintains a list of items names. ## Response data format -Rows: One measurement, i.e., one test administration for a child at a given age, occupies a row in the data set. Thus, if a child is measured three times at different ages, there will be three rows for that child in the dataset. +Rows: One measurement, i.e., one test administration for a child at a given age, occupies a row in the data set. Thus, if a child is measured three times at different ages, there will be three rows for that child in the dataset. -Columns: There should be at least two columns in the data set: +Columns: There should be at least two columns in the data set: -- One column with the age of the child. The age column may have any name, and may be measured in decimal age, months, or days since birth. Do not truncate age. Make the value as a continuous as possible, for example by calculating age in days by the difference between measurement date and birth date. -- One column for each item, appropriately named by the 9-position GSED item name. Normally, the items come from the same instrument, but they may also come from multiple instruments. The data from any recognised item name will contribute to the $D$-score. Do not duplicate names in the data. A PASS is coded as `1`, a FAIL as `0`. If there is no answer or if the item was not administered use the missing value code `NA`. Items that are never administered may be coded as all `NA` or deleted. +- One column with the age of the child. The age column may have any name, and may be measured in decimal age, months, or days since birth. Do not truncate age. Make the value as a continuous as possible, for example by calculating age in days by the difference between measurement date and birth date. +- One column for each item, appropriately named by the 9-position GSED item name. Normally, the items come from the same instrument, but they may also come from multiple instruments. The data from any recognised item name will contribute to the D-score. Do not duplicate names in the data. A PASS is coded as `1`, a FAIL as `0`. If there is no answer or if the item was not administered use the missing value code `NA`. Items that are never administered may be coded as all `NA` or deleted. -The dataset may contain additional columns, e.g., the child number or health information. These are ignored by the $D$-score calculation. +The dataset may contain additional columns, e.g., the child number or health information. These are ignored by the D-score calculation. The most important steps is preparing the data for the D-score calculations are: -- rename your original variable names into the 9-position GSED item names; -- recode all item response as `0`, `1` or `NA` - +- rename your original variable names into the 9-position GSED item names; +- recode all item response as `0`, `1` or `NA` -## GSED Instruments {.tabset .tabset-pills} +## GSED Instruments The table below lists the five available GSED instruments: -Instrument name | Instrument code | Length | Status -:------------------|:--------------- |--------------:|:---------------- -`GSED SF V1` | `gs1` | 139 | Active -`GSED LF V1` | `gl1` | 155 | Active -`GSED HF V1` | `gh1` | 55 | Active -`GSED SF V0` | `gpa` | 139 | Retired -`GSED LF V0` | `gto` | 155 | Retired +| Instrument | Year | Code | Domains | Mode | Range | Status | +|:-----------|:-----|:------|:-----------------|:----:|:------------------|:--------| +| GSED SF | 2023 | `gs1` | `cg|lg|li|mo|se` | `c` | `001-139` | Active | +| GSED LF | 2023 | `gl1` | `gm|lg|fm` | `d` | `001-049|052|054` | Active | +| GSED HF | 2023 | `gh1` | `cg|lg|li|mo|se` | `c` | `001-048` | Active | +| GSED SF | 2020 | `gpa` | any | `c` | `001-139` | Retired | +| GSED LF | 2020 | `gto` | `gm|lg|fm` | `d` | `001-049|052|054` | Retired | -Select the section corresponding to your instrument for further instructions. +## Instruments {.tabset .tabset-pills} -### `GSED SF V1` +### `GSED SF` -The `GSED SF V1` instrument contains 139 items and has instrument code `gs1`. +The `GSED Short Form (GSED SF)` is a caregiver-reported instrument containing 139 items. It has instrument code `gs1`. -#### Check +#### Check -Obtain the full list of item name for as +Obtain the full list of item name for as ```{r} instrument <- "gs1" @@ -135,7 +134,7 @@ head(cbind(items, substr(labels, 1, 50))) #### Renaming example -Suppose that you stored your data with items names `sf001` to `sf139`. For example, +Suppose that you stored your data with items names `sf001` to `sf139`. For example, ```{r} sf <- dscore::sample_sf @@ -151,25 +150,25 @@ head(sf[, c(1:2, 101:105)]) The data in `sf` are now ready for the `dscore()` function. -#### Calculate $D$-score +#### Calculate D-score -Once the data are in proper shape, calculation of the $D$-score is straightforward. The `sf` dataset has properly named columns that identify each item. +Once the data are in proper shape, calculation of the D-score is straightforward. The `sf` dataset has properly named columns that identify each item. ```{r} results <- dscore(sf, xname = "agedays", xunit = "days") head(results) ``` -The table below provides the interpretation of the output: +The table below provides the interpretation of the output: -Name | Interpretation ------- | ------------- -`a` | Decimal age in years -`n` | Number of items used to calculate the $D$-score -`p` | Proportion of passed milestones -`d` | $D$-score (posterior mean) -`sem` | Standard error of measurement (posterior standard deviation) -`daz` | $D$-score corrected for age +| Name | Interpretation | +|-------|--------------------------------------------------------------| +| `a` | Decimal age in years | +| `n` | Number of items used to calculate the D-score | +| `p` | Proportion of passed milestones | +| `d` | D-score (posterior mean) | +| `sem` | Standard error of measurement (posterior standard deviation) | +| `daz` | D-score corrected for age | The number of rows of `result` is equal to the number of rows of `sf`. We save the result for later processing. @@ -177,21 +176,24 @@ The number of rows of `result` is equal to the number of rows of `sf`. We save t sf2 <- data.frame(sf, results) ``` -It is possible to calculate $D$-score for item subsets by setting the `items` argument. We do not advertise this option for practical application, but suppose we are interested in the $D$-score based on items from `gs1` and `gl1` for domains `mo` or `gm` (motor) only. The "motor" $D$-score can be calculated as follows: +It is possible to calculate D-score for item subsets by setting the `items` argument. We do not advertise this option for practical application, but suppose we are interested in the D-score based on items from `gs1` and `gl1` for domains `mo` or `gm` (motor) only. The "motor" D-score can be calculated as follows: ```{r} -items_motor <- get_itemnames(instrument = c("gs1", "gl1"), domain = c("mo", "gm")) +items_motor <- get_itemnames( + instrument = c("gs1", "gl1"), + domain = c("mo", "gm") +) results <- dscore(sf, items = items_motor, xname = "agedays", xunit = "days") head(results) ``` -### `GSED LF V1` +### `GSED LF` -The `GSED LF V1` instrument contains 155 items and has instrument code `gl1`. +The `GSED Long Form (GSED LF)` instrument is a directly-observed instrument containing 155 items with instrument code `gl1`. -#### Check +#### Check -Obtain the full list of item name for as +Obtain the full list of item name for as ```{r} instrument <- "gl1" @@ -216,7 +218,7 @@ head(cbind(items, substr(labels, 1, 50))) #### Renaming example -Suppose that you stored your data with items names `lf001` to `lf155`. For example, +Suppose that you stored your data with items names `lf001` to `lf155`. For example, ```{r} lf <- dscore::sample_lf @@ -232,25 +234,25 @@ head(lf[, c(1:2, 60:64)]) The data in `lf` are now ready for the `dscore()` function. -#### Calculate $D$-score +#### Calculate D-score -Once the data are in proper shape, calculation of the $D$-score is straightforward. The `lf` dataset has properly named columns that identify each item. +Once the data are in proper shape, calculation of the D-score is straightforward. The `lf` dataset has properly named columns that identify each item. ```{r} results <- dscore(lf, xname = "agedays", xunit = "days") head(results) ``` -The table below provides the interpretation of the output: +The table below provides the interpretation of the output: -Name | Interpretation ------- | ------------- -`a` | Decimal age in years -`n` | Number of items used to calculate the $D$-score -`p` | Proportion of passed milestones -`d` | $D$-score (posterior mean) -`sem` | Standard error of measurement (posterior standard deviation) -`daz` | $D$-score corrected for age +| Name | Interpretation | +|-------|--------------------------------------------------------------| +| `a` | Decimal age in years | +| `n` | Number of items used to calculate the D-score | +| `p` | Proportion of passed milestones | +| `d` | D-score (posterior mean) | +| `sem` | Standard error of measurement (posterior standard deviation) | +| `daz` | D-score corrected for age | The number of rows of `result` is equal to the number of rows of `lf`. We save the result for later processing. @@ -258,21 +260,24 @@ The number of rows of `result` is equal to the number of rows of `lf`. We save t lf2 <- data.frame(lf, results) ``` -It is possible to calculate $D$-score for item subsets by setting the `items` argument. We do not advertise this option for practical application, but suppose we are interested in the $D$-score based on items from `gs1` and `gl1` for domains `mo` or `gm` (motor) only. The "motor" $D$-score can be calculated as follows: +It is possible to calculate D-score for item subsets by setting the `items` argument. We do not advertise this option for practical application, but suppose we are interested in the D-score based on items from `gs1` and `gl1` for domains `mo` or `gm` (motor) only. The "motor" D-score can be calculated as follows: ```{r} -items_motor <- get_itemnames(instrument = c("gs1", "gl1"), domain = c("mo", "gm")) +items_motor <- get_itemnames( + instrument = c("gs1", "gl1"), + domain = c("mo", "gm") +) results <- dscore(lf, items = items_motor, xname = "agedays", xunit = "days") head(results) ``` -### `GSED HF V1` +### `GSED HF` -The `GSED HF V1` instrument contains 55 items and has instrument code `gh1`. +The `GSED Houshold Form (GSED HF)` instrument contains a subset of 48 items from the GSED SF designed to be used for population surveys. It has instrument code `gh1`. -#### Check +#### Check -Obtain the full list of item name for as +Obtain the full list of item name for as ```{r} instrument <- "gh1" @@ -281,7 +286,7 @@ length(items) head(items) ``` -The `order` argument is needed to sort items according to sequence number 1 to 55. Check that you have the correct version by comparing the labels of the first few items as: +The `order` argument is needed to sort items according to sequence number 1 to 48. Check that you have the correct version by comparing the labels of the first few items as: ```{r} labels <- get_labels(items) @@ -290,7 +295,7 @@ head(cbind(items, substr(labels, 1, 50))) #### Renaming example -Suppose that you stored your data with items names `hf001` to `hf055`. For example, +Suppose that you stored your data with items names `hf001` to `hf048`. For example, ```{r} hf <- dscore::sample_hf @@ -300,31 +305,31 @@ head(hf[, c(1:2, 30:35)]) Make sure that the items are in the correct order. Rename the columns with gsed 9-position item names. ```{r} -colnames(hf)[3:57] <- items +colnames(hf)[3:50] <- items head(hf[, c(1:2, 30:35)]) ``` The data in `hf` are now ready for the `dscore()` function. -#### Calculate $D$-score +#### Calculate D-score -Once the data are in proper shape, calculation of the $D$-score is straightforward. The `hf` dataset has properly named columns that identify each item. +Once the data are in proper shape, calculation of the D-score is straightforward. The `hf` dataset has properly named columns that identify each item. ```{r} -results <- dscore(hf, xname = "agedays", xunit = "days") +results <- dscore(hf, xname = "agedays", xunit = "days", verbose = TRUE) head(results) ``` -The table below provides the interpretation of the output: +The table below provides the interpretation of the output: -Name | Interpretation ------- | ------------- -`a` | Decimal age in years -`n` | Number of items used to calculate the $D$-score -`p` | Proportion of passed milestones -`d` | $D$-score (posterior mean) -`sem` | Standard error of measurement (posterior standard deviation) -`daz` | $D$-score corrected for age +| Name | Interpretation | +|-------|--------------------------------------------------------------| +| `a` | Decimal age in years | +| `n` | Number of items used to calculate the D-score | +| `p` | Proportion of passed milestones | +| `d` | D-score (posterior mean) | +| `sem` | Standard error of measurement (posterior standard deviation) | +| `daz` | D-score corrected for age | The number of rows of `results` is equal to the number of rows of `hf`. We save the result for later processing. @@ -332,231 +337,237 @@ The number of rows of `results` is equal to the number of rows of `hf`. We save hf2 <- data.frame(hf, results) ``` -It is possible to calculate $D$-score for item subsets by setting the `items` argument. We do not advertise this option for practical application, but suppose we are interested in the $D$-score based on items from `gs1`, `gl1` and `gh1` for domains `mo` or `gm` (motor) only. The "motor" $D$-score can be calculated as follows: +It is possible to calculate D-score for item subsets by setting the `items` argument. We do not advertise this option for practical application, but suppose we are interested in the D-score based on items from `gs1`, `gl1` and `gh1` for domains `mo` or `gm` (motor) only. The "motor" D-score can be calculated as follows: ```{r} -items_motor <- get_itemnames(instrument = c("gs1", "gl1", "gh1"), domain = c("mo", "gm")) -results <- dscore(hf, items = items_motor, xname = "agedays", xunit = "days") +items_motor <- get_itemnames( + instrument = c("gs1", "gl1", "gh1"), + domain = c("mo", "gm") +) +results <- dscore( + hf, + items = items_motor, + xname = "agedays", + xunit = "days", +) head(results) ``` +### Other GSED instruments -### `GSED SF V0` - -The `GSED SF V0` instrument contains 139 items and has instrument code `gpa`. - -#### Check - -Obtain the full list of item name for as +The `gpa` (SF) and `gto` (LF) instrument codes are included only for backward compatibility. These instruments have a different item order. They were replaced in 2023 by the `GSED SF` (`gs1`) and `GSED LF` (`gl1`). The scoring procedure is identical to the one described above for the new instruments. -```{r} -instrument <- "gpa" -items <- get_itemnames(instrument = instrument, order = "indm") -length(items) -head(items) -``` - -The `order` argument is needed to sort items according to sequence number 1 to 139. Check that you have the correct version by comparing the labels of the first few items as: - -```{r} -labels <- get_labels(items) -head(cbind(items, substr(labels, 1, 50))) -``` +## {.unnumbered} -#### Renaming example - -Suppose that you stored your data with items names `sf001` to `sf139`. For example, - -```{r} -sf <- dscore::sample_sf -head(sf[, c(1:2, 101:105)]) -``` - -Make sure that the items are in the correct order. Rename the columns with gsed 9-position item names. - -```{r} -colnames(sf)[3:141] <- items -head(sf[, c(1:2, 101:105)]) -``` - -The data in `sf` are now ready for the `dscore()` function. +## References for DAZ calculation -#### Calculate $D$-score +### `preliminary_standards` references -Once the data are in proper shape, calculation of the $D$-score is straightforward. The `sf` dataset has properly named columns that identify each item. +By default, DAZ values are calculated using the preliminary standards. These standards were derived from a healthy subsample of approximately 12,000 administrations of the GSED SF and GSED LF collected in Bangladesh, Pakistan, and Tanzania (the GSED Phase 1 countries), using the key "gsed2406". You can extract these reference values with: ```{r} -results <- dscore(sf, xname = "agedays", xunit = "days") -head(results) -``` - -The table below provides the interpretation of the output: - -Name | Interpretation ------- | ------------- -`a` | Decimal age in years -`n` | Number of items used to calculate the $D$-score -`p` | Proportion of passed milestones -`d` | $D$-score (posterior mean) -`sem` | Standard error of measurement (posterior standard deviation) -`daz` | $D$-score corrected for age - -The number of rows of `result` is equal to the number of rows of `sf`. We save the result for later processing. - -```{r} -sf3 <- data.frame(sf, results) -``` - -It is possible to calculate $D$-score for item subsets by setting the `items` argument. We do not advertise this option for practical application, but suppose we are interested in the $D$-score based on items from `gpa` and `gto` for domains `mo` or `gm` (motor) only. The "motor" $D$-score can be calculated as follows: +library(dplyr, warn.conflicts = FALSE, quietly = TRUE) +ref <- builtin_references |> + filter(population == "preliminary_standards") |> + select(population, age, mu, sigma, nu, tau, SDM2, SD0, SDP2) |> + mutate(m = age * 12) -```{r} -items_motor <- get_itemnames(instrument = c("gpa", "gto"), domain = c("mo", "gm")) -results <- dscore(sf, items = items_motor, xname = "agedays", xunit = "days") -head(results) +head(ref, 3) ``` -### `GSED LF V0` +The columns `mu`, `sigma`, `nu` and `tau` are the age-varying parameters of a Box-Cox $t$ (BCT) distribution. -The `GSED LF V0` instrument contains 155 items and has instrument code `gto`. +The references are currently also available for the updated key `"gsed2510"`, which is the recommended key for GSED instruments. +A future release of the package will replace the current `preliminary_standards` for `"gsed2510"` with a newly calculated version based on data from all seven GSED countries. -#### Check - -Obtain the full list of item name for as - -```{r} -instrument <- "gto" -items <- get_itemnames(instrument = instrument) -length(items) -head(items) -``` - -Reorder item names so that they corresponds to streams A, B and C, respectively. +You do not need to manually specify the references when calculating DAZ with the `dscore()` function. The function automatically uses the `preliminary_standards` references. For example, you can calculate the D-score and DAZ as follows: ```{r} -items <- items[c(55:155, 1:54)] -head(items) +vars <- c("id", "agedays", get_itemnames(instrument = "gs1", order = "indm")) +data <- triple[, colnames(triple) %in% vars] +ds1 <- dscore(data, xname = "agedays", xunit = "days") +head(ds1) ``` -Check that you have the correct version by comparing the labels of the first few items as: +Add the argument `dscore(..., verbose = TRUE)` to see which references are used. -```{r} -labels <- get_labels(items) -head(cbind(items, substr(labels, 1, 50))) -``` +Here are the growth charts for **D-score** and **DAZ**, based on the `preliminary_standards` references. -#### Renaming example - -Suppose that you stored your data with items names `lf001` to `lf155`. For example, - -```{r} -lf <- dscore::sample_lf -head(lf[, c(1:2, 60:64)]) -``` - -Make sure that the items are in the correct order. Rename the columns with gsed 9-position item names. - -```{r} -colnames(lf)[3:157] <- items -head(lf[, c(1:2, 60:64)]) -``` - -The data in `lf` are now ready for the `dscore()` function. - -#### Calculate $D$-score +```{r fig.height=5, fig.width=10, warning=FALSE} +#| code-fold: true +library(ggplot2) +library(patchwork) -Once the data are in proper shape, calculation of the $D$-score is straightforward. The `lf` dataset has properly named columns that identify each item. +r <- builtin_references |> + filter(population == "preliminary_standards" & age <= 3.5) |> + mutate(m = age * 12) -```{r} -results <- dscore(lf, xname = "agedays", xunit = "days") -head(results) +ds1$m <- ds1$a * 12 +g1 <- ggplot(ds1, aes(x = m, y = d)) + + theme_light() + + annotate( + "polygon", + x = c(r$age, rev(r$age)), + y = c(r$SDM2, rev(r$SDP2)), + alpha = 0.06, + fill = "#C5EDDE" + ) + + annotate("line", x = r$m, y = r$SDM2, lwd = 0.5, color = "grey80") + + annotate("line", x = r$m, y = r$SDP2, lwd = 0.5, color = "grey80") + + annotate("line", x = r$m, y = r$SD0, lwd = 1, color = "grey80") + + scale_x_continuous( + "Age (in months)", + limits = c(0, 42), + breaks = seq(0, 42, 12) + ) + + scale_y_continuous( + expression(paste("D-score", sep = "")), + breaks = seq(0, 80, 20), + limits = c(0, 90) + ) + + geom_point(size = 2) + + theme(legend.position = "none") +g2 <- ggplot(ds1, aes(x = m, y = daz)) + + theme_light() + + geom_hline(yintercept = 2, linewidth = 0.5, color = "grey80") + + geom_hline(yintercept = -2, linewidth = 0.5, color = "grey80") + + geom_hline(yintercept = 0, linewidth = 1.0, color = "grey80") + + scale_x_continuous( + "Age (in months)", + limits = c(0, 42), + breaks = seq(0, 42, 12) + ) + + scale_y_continuous( + "DAZ", + breaks = seq(-4, 4, 2), + limits = c(-4, 4) + ) + + geom_point(size = 2) + + theme(legend.position = "none") +g1 + g2 ``` -The table below provides the interpretation of the output: +### `who_descriptive` references -Name | Interpretation ------- | ------------- -`a` | Decimal age in years -`n` | Number of items used to calculate the $D$-score -`p` | Proportion of passed milestones -`d` | $D$-score (posterior mean) -`sem` | Standard error of measurement (posterior standard deviation) -`daz` | $D$-score corrected for age +The `who_descriptive` references are based on data from all children across all seven GSED countries. These references reflect the observed data and should not be interpreted as standards. They are intended for descriptive analyses of developmental status or for methodological studies. -The number of rows of `result` is equal to the number of rows of `lf`. We save the result for later processing. - -```{r} -lf3 <- data.frame(lf, results) -``` +The `who_descriptive` references replace the earlier `"phase1"` references, which were derived from GSED Phase I data (three countries). -It is possible to calculate $D$-score for item subsets by setting the `items` argument. We do not advertise this option for practical application, but suppose we are interested in the $D$-score based on items from `gpa` and `gto` for domains `mo` or `gm` (motor) only. The "motor" $D$-score can be calculated as follows: +You can access these references by specifying `population = "who_descriptive"` in the `dscore()` function. To extract the references, use: ```{r} -items_motor <- get_itemnames(instrument = c("gpa", "gto"), domain = c("mo", "gm")) -results <- dscore(lf, items = items_motor, xname = "agedays", xunit = "days") -head(results) +ref <- builtin_references |> + filter(population == "who_descriptive") |> + select(population, age, mu, sigma, nu, tau, SDM2, SD0, SDP2) +head(ref) ``` - -## {-} - - - -### Phase 1 references and DAZ - -We used the GSED Phase I data to calculate age-conditional reference scores for the $D$-score. The references are based on about 12,000 administration of the GSED SF and GSED LF from Bangladesh, Pakistan and Tanzania. Extract the references as +The columns `mu`, `sigma`, `nu` and `tau` are the age-varying parameters of a Box-Cox $t$ (BCT) distribution. ```{r} -library(dplyr, warn.conflicts = FALSE, quietly = TRUE) -ref <- builtin_references %>% - filter(pop == "phase1") %>% - select(pop, age, mu, sigma, nu, tau, SDM2, SD0, SDP2) -head(ref) +ds2 <- dscore( + data, + xname = "agedays", + xunit = "days", + population = "who_descriptive" +) +head(ds2) ``` -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 plus 20 $D$-scores (10 LF and 10 SF) for the `lf2` and `sf2` data. +Here are the growth charts for **D-score** and **DAZ**, based on the `who_descriptive` references. ```{r fig.height=5, fig.width=10, warning=FALSE} +#| code-fold: true library(ggplot2) library(patchwork) -r <- builtin_references %>% - filter(pop == "phase1" & age <= 3.5) %>% +r <- builtin_references |> + filter(population == "who_descriptive" & age <= 3.5) |> mutate(m = age * 12) -lf2$ins <- "lf"; lf2$m <- lf2$a * 12 -sf2$ins <- "sf"; sf2$m <- sf2$a * 12 -data <- bind_rows(lf2, sf2) -g1 <- ggplot(data, aes(x = m, y = d, group = ins, color = ins)) + +ds2$m <- ds2$a * 12 +g1 <- ggplot(ds2, aes(x = m, y = d)) + theme_light() + - annotate("polygon", x = c(r$age, rev(r$age)), - y = c(r$SDM2, rev(r$SDP2)), alpha = 0.06, fill = "#C5EDDE") + - annotate("line", x = r$m, y = r$SDM2, lwd = 0.5, color = "#C5EDDE") + - annotate("line", x = r$m, y = r$SDP2, lwd = 0.5, color = "#C5EDDE") + - annotate("line", x = r$m, y = r$SD0, lwd = 1, color = "#C5EDDE") + - scale_x_continuous("Age (in months)", - limits = c(0, 42), - breaks = seq(0, 42, 12)) + + annotate( + "polygon", + x = c(r$age, rev(r$age)), + y = c(r$SDM2, rev(r$SDP2)), + alpha = 0.06, + fill = "#C5EDDE" + ) + + annotate("line", x = r$m, y = r$SDM2, lwd = 0.5, color = "grey80") + + annotate("line", x = r$m, y = r$SDP2, lwd = 0.5, color = "grey80") + + annotate("line", x = r$m, y = r$SD0, lwd = 1, color = "grey80") + + scale_x_continuous( + "Age (in months)", + limits = c(0, 42), + breaks = seq(0, 42, 12) + ) + scale_y_continuous( - expression(paste(italic(D), "-score", sep = "")), + expression(paste("D-score", sep = "")), breaks = seq(0, 80, 20), - limits = c(0, 90)) + + limits = c(0, 90) + ) + geom_point(size = 2) + theme(legend.position = "none") -g2 <- ggplot(data, aes(x = m, y = daz, group = ins, color = ins)) + +g2 <- ggplot(ds2, aes(x = m, y = daz)) + theme_light() + - scale_x_continuous("Age (in months)", - limits = c(0, 42), - breaks = seq(0, 42, 12)) + + geom_hline(yintercept = 2, linewidth = 0.5, color = "grey80") + + geom_hline(yintercept = -2, linewidth = 0.5, color = "grey80") + + geom_hline(yintercept = 0, linewidth = 1.0, color = "grey80") + + scale_x_continuous( + "Age (in months)", + limits = c(0, 42), + breaks = seq(0, 42, 12) + ) + scale_y_continuous( "DAZ", breaks = seq(-4, 4, 2), - limits = c(-5, 5)) + + limits = c(-4, 4) + ) + geom_point(size = 2) + theme(legend.position = "none") g1 + g2 ``` -## References +In general, descriptive references are expected to yield higher DAZ values than standards. This is because descriptive references are based on all children, including those with developmental delays, whereas standards are based on a healthy subsample. + +At present, the `who_descriptive` references produce DAZ values similar to those from the `preliminary_standards` references, but with a noticeably different age pattern. The main reason is that `who_descriptive` is based on key `gsed2510`, while `preliminary_standards` still rely on the older key `gsed2406`. This age pattern is expected to disappear once the new standards based on key `gsed2510` become available. + +```{r fig.height=5, fig.width=10, warning=FALSE} +#| code-fold: true +f1 <- ggplot(data = NULL, aes(x = ds1$daz, y = ds2$daz)) + + theme_light() + + geom_abline(intercept = 0, slope = 1, colour = "grey80", linewidth = 1) + + geom_point(shape = 19) + + scale_y_continuous( + "DAZ (who_descriptive)", + breaks = seq(-4, 4, 2), + limits = c(-4, 4) + ) + + scale_x_continuous( + "DAZ (preliminary_standards)", + breaks = seq(-4, 4, 2), + limits = c(-4, 4) + ) + +f2 <- ggplot(data = NULL, aes(x = ds1$a * 12, y = ds1$daz - ds2$daz)) + + theme_light() + + geom_point(shape = 19) + + geom_hline(yintercept = 0, colour = "grey80", linewidth = 1) + + scale_x_continuous( + "Age (in months)", + limits = c(0, 42), + breaks = seq(0, 42, 12) + ) + + scale_y_continuous( + "DAZ (who_descriptive) – DAZ (preliminary_standards)", + breaks = seq(-0.4, 0.4, 0.1), + limits = c(-0.4, 0.4) + ) + +f1 + f2 +``` + +## Literature references diff --git a/vignettes/using_DAZ.Rmd b/vignettes/using_DAZ.Rmd new file mode 100644 index 00000000..ecf5797f --- /dev/null +++ b/vignettes/using_DAZ.Rmd @@ -0,0 +1,134 @@ +--- +title: "Understanding and using DAZ" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{Understanding and using DAZ} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +## What is DAZ? + +Development-for-Age Z-scores, more commonly known as DAZ scores, are a way to control for the "age effect" when analyzing D-scores. Children develop naturally over time and so comparisons on the D-score scale are difficult when there is variation in age. Older children will almost always have higher D-scores than younger children. This can create analytical difficulties when attempting to understand changes over time or compare groups of children that contain multiple ages. + +DAZ is the conceptually very similar to anthropometric outcomes such as Height-for-Age Z-scores (HAZ) and Weight-for-Age Z-scores (WAZ), and Weight-for-Height Z-scores (WHZ) which are commonly used in public health research (https://www.who.int/tools/child-growth-standards). + +```{r setup, include = FALSE} +library(dscore) +``` + + +## How is DAZ calculated? + +DAZ is estimated *after* calculating the D-scores for each child. The D-scores per child are compared to a **reference sample**. The DAZ is reported in standard deviation units and represents how close the scored child's D-score is to the D-scores of **same-aged** children in the reference sample. DAZ scores are reported in standard Z-score units, with a mean of 0 and a standard deviation of 1. This means that: + + +* If the D-score of the scored child is *higher* than those in the reference, then the DAZ will be *positive*. +* If the D-score is *lower* than same-aged children in the reference sample, then the DAZ will be *negative* +* If the D-score of the child is *the same* as the average of the reference sample, then the DAZ will be 0. + +## Who is in the reference population used in the D-score package? + +Before version 1.9.0, DAZ scores were calculated using the entire Phase I validation sample of GSED data, consisting of 4,374 children from Bangladesh, Pakistan, and Tanzania. This data included children that were both very advantaged and those with significant constraints on their development. In `dscore 1.9.0`, the reference group has been refined to a sub-sample of 2,295 children with *minimal* constraints on their early development. + +The default reference group includes children who: + +* were of normal birth weight (above 2500 g) +* were born term (between 37 and 42 weeks) +* were not undernourished (according to weight-for-age, height-for-age, or weight-for-height Z-scores) +* had no known severe birth defects or chronic health problems +* had a mother who had completed at least a secondary level of education + +In the future, the DAZ reference group will be updated with a larger and more representative sample both through the inclusion of additional countries in validation studies as well as a dedicated Norms & Standards study (https://bmjopen.bmj.com/content/13/1/e062562). + +## Can I use a benchmark with DAZ to monitor the proportion of children that are developmentally on track? + +Many anthropometric measures use a -2 SD benchmark to describe the percentage of children with low height for age (stunting) weight for age (underweight) or weight for height (wasting). DAZ scores *can* be used with a benchmark for monitoring purposes, but this should be done with extreme caution. This is because, unlike HAZ, WAZ, and WHZ, DAZ scores are calculated using a relatively small and globally unrepresentative reference sample. + +Further guidance and a more concrete benchmark will be analyzed after the completion of an ongoing Norms & Standards study. For now, if a benchmark for use is required to determine the proportion of children that are developmentally on track, we recommend using a **transitional benchmark** -1.5 SD. This is slightly higher than -2 SD but was determined to give reasonable alignment with inferences from the ECDI2030 (https://doi.org/10.1016/j.ecresq.2023.11.004). + +## Examples of DAZ and interpretation + +Below we show some illustrative examples of what DAZ can look like in practice and how to interpret results. + +```{r daz} +# Create a dataset of five 13-month old children scoring 5 GSED items +dm <- matrix( + c( + 13, 0, 0, 0, 0, 0, + 13, 1, 0, 0, 0, 0, + 13, 1, 1, 1, 0, 0, + 13, 1, 1, 1, 1, 0, + 13, 1, 1, 1, 1, 1 + ), + ncol = 6, byrow = TRUE) +colnames(dm) <- c("age", "gs1moc060", "gs1moc061", "gs1lgc062", "gs1sec063", "gs1moc064") + +# Score the data using dscore function +output <- dscore(dm, xunit = "months") + +# Add centile rankings to the output +output$centile <- round(100 * pnorm(output$daz), 1) + +# View the scored data +head(output) + +``` + +In the above example, we can see that for 13-month-old children, failing each of these 5 milestones will result in a D-score estimate of 41.16. The DAZ for this first child is calculated as -2.688, meaning that the D-score of the child is -2.688 standard deviations below the mean of 13-month-old children in the reference group. Converting this to percentiles, we see that this child would score well below the first percentile. + +In contrast, the fourth child in the example (who passed 4/5 milestones) has a DAZ estimate of -0.043. This child is very close (just below) the average score of 13-month-old children in the reference group. And the final child in the example, who passed all 5 milestones, has an estimated DAZ of 0.998, nearly a full standard deviation above the mean and higher than 84 percent of same-aged children in the reference group. + +## `NA` values for DAZ + +When scoring DAZ, `dscore` can return `NA` values. Let's take a look at why this happens. + +`NA` values occur when a child's age is missing or out of range. D-scores can be generated even with missing age values, but DAZ is not possible to be calculated because the calculation of DAZ compares the child's D-score with D-scores of same-aged children. We can see this happen with the below data, where we try to score the same responses patterns with children aged `NA`, 12, 18, 48, and -1 months old. + +```{r NA} +# Create a dataset of five children of different ages with the same scores +dm <- matrix( + c( + NA, 1, 1, 1, 1, 1, + 12, 1, 1, 1, 1, 1, + 18, 1, 1, 1, 1, 1, + 48, 1, 1, 1, 1, 1, + -1, 1, 1, 1, 1, 1 + ), + ncol = 6, byrow = TRUE) +colnames(dm) <- c("age", "gs1moc060", "gs1moc061", "gs1lgc062", "gs1sec063", "gs1moc064") + +dscore(dm, xunit = "months") + +``` + +The children with ages `NA`, 48, and -0.0833 have DAZ that are returned as `NA`. DAZ must be relative to age and the reference group is for children 0-36 months old. When scoring data, ensure that ages have been accurately recorded. + +Children aged 12 and 18 months have no problem with the estimation of the D-scores and DAZ. There are two additional notes: + +* While all children have an identical response pattern, the estimate of the D-score differs. This is because there is an age prior that is used in calculating the D-score that assumes children of higher ages have higher D-scores. With just 5 items responded to, the prior has a big influence on the estimated D-score. +* While the 18-month-old child has a higher D-score estimate than the 12-month old child, that DAZ estimate is lower. This is because DAZ is calculated **relative to the reference group**. For the 12-month-old child, 53.41 is about 1.283 SD higher than the mean of D-scores for 12-month-old children in the reference group. For the 18-month-old child, 59.95 is 0.300 higher than 18-month-old children in the reference group. + +While rare, it is also possible that the `dscore()` functions returns an `NA` value for DAZ in extreme cases, e.g. when a three-month-old child is marked as many advanced age items correct such as those related to jumping, talking, and reading. We can illustrate this below: + +```{r inf} +### Get a list of all GSED item names +gsed_names <- get_itemnames(instrument = "gs1") + +### Create a sample dataframe where all responses are 1 +df <- as.data.frame(setNames(as.list(rep(1, length(gsed_names))), gsed_names)) + +### Add an age (in months) of 3 +df$age <- 3 + +dscore(df, xunit = "months") +``` + +If DAZ is estimated `NA`, age may not be recorded properly. Recheck the data of any DAZ estimate that is estimated as `NA`.