ddi_derivation {rddi}R Documentation

derivation and its child nodes

Description

Used only in the case of a derived variable, this element provides both a description of how the derivation was performed and the command used to generate the derived variable, as well as a specification of the other variables in the study used to generate the derivation. The "var" attribute provides the ID values of the other variables in the study used to generate this derived variable. More information on these elements, especially their allowed attributes, can be found in the references.

Usage

ddi_derivation(...)

ddi_drvdesc(...)

ddi_drvcmd(...)

Arguments

...

Child nodes or attributes.

Details

Parent nodes

derivation is included in var.

derivation specific child nodes

Value

A ddi_node object.

References

derivation documentation

drvcmd documentation

drvdesc documentation

Examples

ddi_derivation()

# Functions that need to be wrapped in ddi_derivation()

ddi_drvcmd(syntax = "SPSS",
           "RECODE V1 TO V3 (0=1) (1=0) (2=-1) INTO DEFENSE WELFARE HEALTH.")

ddi_drvdesc("VAR215.01 'Outcome of first pregnancy' (1988 NSFG=VAR611 PREGOUT1) 
            If R has never been pregnant (VAR203 PREGNUM EQ 0) then OUTCOM01 is 
            blank/inapplicable. Else, OUTCOM01 is transferred from VAR225 
            OUTCOME for R's 1st pregnancy.")


[Package rddi version 0.1.1 Index]