Description Usage Arguments Details Value Note
Adjusts 30 day SU variables to zero if lifetime use is zero
1 | zero30dSU(pDT)
|
pDF |
A data.table in the format returned by 'getNQTVCs', i.e. an image of the database table 'SWave' that includes at least the variables for lifetime and 30 day substance use included in the Short Survey. |
Survey skip logic skips over 30 day SU questions if no lifetime use of the substance is reported concurrently. This recode allows the 30 day variables to be used in analyses under such circumstances, instead of being missing.
A data.table in the same format as the input DF, with 30 day substance use variables recoded to 0 if no lifetime use of the corresponding substance has been reported concurrently.
This function is a helper function for 'makeTVTbl'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.