rename_gcdg_gsed: Rename items from gcdg into gsed lexicon

View source: R/rename_gcdg_gsed.R

rename_gcdg_gsedR Documentation

Rename items from gcdg into gsed lexicon

Description

Function rename_gcdg_gsed() translates item names in the gcdg lexicon to item names in the gsed lexicon.

Usage

rename_gcdg_gsed(x, copy = TRUE)

Arguments

x

A character vector containing item names in the gcdg lexicon

copy

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

Details

The gsed-naming convention is as follows. Position 1-3 codes the instrument, position 4-5 codes the domain, position 6 codes direct/caregiver/message, positions 7-9 is a item sequence number.

The function currently support ASQ-I (aqi), Barrera-Moncade (bar), Batelle (bat), Bayley I (by1), Bayley II (by2), Bayley III (by3), Dutch Development Instrument (ddi), Denver (den), Griffith (gri), MacArthur (mac), WHO milestones (mds), Mullen (mul), pegboard (peg), South African Griffith (sgr), Stanford Binet (sbi), Tepsi (tep), Vineland (vin).

In cases where the domain of the items isn't clear (vin, bar), the domain is coded as 'xx'.

Value

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

Author(s)

Iris Eekhout, Stef van Buuren

References

https://docs.google.com/spreadsheets/d/1zLsSW9CzqshL8ubb7K5R9987jF4YGDVAW_NBw1hR2aQ/edit#gid=0

Examples

from <- c(
  "ag28", "gh2_19", "a14ps4", "b1m157", "mil6",
  "bm19", "a16fm4", "n22", "ag9", "gh6_5"
)
to <- rename_gcdg_gsed(from, copy = FALSE)
to

dscore documentation built on Jan. 22, 2023, 1:50 a.m.