# ADA1: Class 04, Personal Codebook

Advanced Data Analysis 1, Stat 427/527, Fall 2022, Prof. Erik Erhardt, UNM

Author

Published

August 13, 2022

# Rubric

1. (1 p) Is there a topic of interest?

2. (2 p) Are the variables relevant to a set of research questions?

3. (4 p) Are there at least 2 categorical and 2 numerical variables (at least 4 “data” variables)?

• 1 categorical variable with only 2 levels
• 1 categorical variable with at least 3 levels
• 2 numerical variables with many possible unique values
• More variables are welcome and you’re likely to add to this later in the semester
4. (3 p) For each variable, is there a variable description, a data type, and coded value descriptions?

5. Compile this Rmd file to an html, print/save to pdf, and upload to UNM Learn.

Using the NESARC dataset, choose from among the variables listed at the bottom. I selected this list of about 150 to narrow your attention from among the 3008 variables in the NESARC dataset. This is the beginning of your investigation toward answering a few questions that you’ll pursue throughout the semester.

I recommend this strategy:

1. Save the NESARC codebook to your computer: https://statacumen.com/teach/ADA1/PDS_data/NESARC_W1_CodeBook.pdf
2. Review the list of variables at the bottom of this document, referring to the codebook for more information as required.
3. Find a set of variables that are of some interest to you that are around a theme.
• Make sure you satisfy the “at least 2 categorical and 2 numerical variables” requirement in the Rubric.
4. Develop a few research questions that relate pairs of these variables: “Does A relate to B?”
5. Define a topic that synthesizes the research questions; my example is about an “association between nicotine dependence and number of cigarettes smoked.”
6. Complete your Codebook after you are happy with your research questions and topic.
7. Refer to the Rubric and “grade yourself” by making sure you satisfy all of the components of the assignment.

Your codebook may continue to develop throughout the semester.

# Topic and research questions

Topic:

As you select variables from the bottom of this document, a general topic should reveal itself to you.

The relationship between depression and drinking (beer).

Research questions:

1. Does going to a counselor for depression (DepressionCounselor) predict the number of beers when you drink (NumBeersConsumed)?

2. Question 2

3. Question 3

# Codebook

National Epidemiologic Survey on Alcohol and Related Conditions-III (NESARC-III)

• Official site: https://www.niaaa.nih.gov/research/nesarc-iii
• Introduction: https://pubs.niaaa.nih.gov/publications/arh29-2/74-78.htm
``````Dataset: NESARC
Primary association: nicotine dependence vs frequency and quantity of smoking

Key:
RenamedVarName
VarName original in dataset
Variable description
Data type (Continuous, Discrete, Nominal, Ordinal)
Frequency ItemValue Description

ID
IDNUM
UNIQUE ID NUMBER WITH NO ALPHABETICS
Nominal
43093 1-43093. Unique Identification number

Sex
SEX
SEX
Nominal
18518 1. Male
24575 2. Female

Age
AGE
AGE
Continuous
43079 18-97. Age in years
14 98. 98 years or older

Height_ft
S1Q24FT
HEIGHT: FEET
42363 4-7. Feet
730 99. Unknown
* change 99 to NA

Height_in
S1Q24IN
HEIGHT: INCHES
Continuous
3572 0. None
38760 1-11. Inches
761 99. Unknown
* change 99 to NA

Weight_lb
S1Q24LB
WEIGHT: POUNDS
Continuous
41717 62-500. Pounds
1376 999. Unknown
* change 999 to NA

DrinkingStatus
CONSUMER
DRINKING STATUS
Categorical
26946 1. Current drinker
7881 2. Ex-drinker
8266 3. Lifetime Abstainer

S2AQ5A     drank any beer in last 12 months
S2AQ5A
DRANK ANY BEER IN LAST 12 MONTHS
--------------------------------
18346 1. Yes
8562 2. No
38 9. Unknown
16147 BL. NA, former drinker or lifetime abstainer

S2AQ5B     how often drank beer in last 12 months
S2AQ5D     number of beers usually consumed on days when drank beer in last 12 months

NumBeersConsumed
S2AQ5D
NUMBER OF BEERS USUALLY CONSUMED ON DAYS WHEN DRANK BEER IN LAST 12 MONTHS
Numeric
18268 1-42. Number of beers
78 99. Unknown
24747 BL. NA, did not drink or unknown if drank beer in last 12 months

S2AQ5E     largest number of beers consumed on days when drank beer in last 12 months
NumBeersConsumed_largest

S2AQ5F     how often drank largest number of beers in last 12 months
S2AQ5I     where usually drank beer in last 12 months

S2DQ1      blood/natural father ever an alcoholic or problem drinker
AlcoholicFather
S2DQ2      blood/natural mother ever an alcoholic or problem drinker
AlcoholicMother

S4AQ1      ever had 2-week period when felt sad, blue, depressed, or down most of time
S4AQ2      ever had 2-week period when didn't care about things usually cared about
S4AQ6A     age at onset of first episode
S4AQ7      number of episodes
S4AQ16     went to counselor/therapist/doctor/other person for help to improve mood
DepressionCounselor

S4AQ18     doctor prescribed medicine/drug to improve mood/make you feel better
S4AQ19A    age at first time sought help

S4BQ1      blood/natural father ever depressed
S4BQ2      blood/natural mother ever depressed
S4BQ3C     any full brothers ever depressed
S4BQ4C     any full sisters ever depressed

``````

Additional variables were created from the original variables:

``````CREATED VARIABLES

Height_inches
Total height in inches
Height_ft * 12 + Height_in

AlcoholicFamily
Family history of alcoholism
AlcoholicFather OR AlcoholicMother

ADD MORE HERE (If you think you'll combine or transform any variables)
``````

## Choose from among these variables

This is a list of “original variable names” and “descriptions”.

``````Dataset: NESARC
Suggested variable list

Must include:

IDNUM      unique id number with no alphabetics
AGE        age
SEX        sex
S1Q24FT    height: feet
S1Q24IN    height: inches
S1Q24LB    weight: pounds

Choose several from the following:

SECTION 1: BACKGROUND INFORMATION
S1Q1F      born in united states
MARITAL    current marital status
S1Q3B      number of marriages (not counting living together as if married)
S1Q4A      age at first marriage
S1Q6A      highest grade or year of school completed
S1Q7A1     present situation includes working full time (35+ hours a week)
S1Q7A2     present situation includes working part time (<35 hours a week)
S1Q7A6     present situation includes unemployed or laid off and looking for work
S1Q7A8     present situation includes unemployed and permanently disabled
S1Q7A9     present situation includes retired
S1Q7A10    present situation includes in school full time
S1Q7A13    present situation includes full time homemaker
S1Q8D      age when first worked full time (30+ hours a week)
S1Q10A     total personal income in last 12 months
S1Q14C1    currently covered by medicare
S1Q14C2    currently covered by medicaid
S1Q14C3    currently covered by champus, champva, va or other military health care
S1Q14C4    currently covered by private health insurance
S1Q16      self-perceived current health
S1Q231     any family members or close friends died in last 12 months
S1Q232     any family members or close friends had serious illness or injury in last 12 months
S1Q237     changed jobs, job responsibilities or work hours in last 12 months

SECTION 2A: ALCOHOL CONSUMPTION
CONSUMER   drinking status
S2AQ5A     drank any beer in last 12 months
S2AQ5B     how often drank beer in last 12 months
S2AQ5D     number of beers usually consumed on days when drank beer in last 12 months
S2AQ5E     largest number of beers consumed on days when drank beer in last 12 months
S2AQ5F     how often drank largest number of beers in last 12 months
S2AQ5I     where usually drank beer in last 12 months
S2AQ6A     drank any wine in last 12 months
S2AQ6B     how often drank wine in last 12 months
S2AQ6D     number of glasses/containers of wine usually consumed on days when drank wine in last 12 months
S2AQ6E     largest number of glasses/containers of wine consumed on days when drank wine in last 12 months
S2AQ6F     how often drank largest number of glasses/containers of wine in last 12 months
S2AQ6H     where usually drank wine in last 12 months
S2AQ7A     drank any liquor in last 12 months
S2AQ7B     how often drank liquor in last 12 months
S2AQ7D     number of drinks of liquor usually consumed on days when drank liquor in last 12 months
S2AQ7E     largest number of drinks of liquor consumed on days when drank liquor in last 12 months
S2AQ7F     how often drank largest number of drinks of liquor in last 12 months
S2AQ7I     where usually drank liquor in last 12 months
S2AQ8A     how often drank any alcohol in last 12 months
S2AQ8B     number of drinks of any alcohol usually consumed on days when drank alcohol in last 12 months
S2AQ8C     largest number of drinks of any alcohol consumed on days when drank alcohol in last 12 months
S2AQ8D     how often drank largest number of drinks of any alcohol in last 12 months
S2AQ10     how often drank enough to feel intoxicated in last 12 months
S2AQ11     how many drinks can hold without feeling intoxicated
S2AQ16A    age when started drinking, not counting small tastes or sips

SECTION 2D: FAMILY HISTORY (I) OF ALCOHOLISM
S2DQ1      blood/natural father ever an alcoholic or problem drinker
S2DQ2      blood/natural mother ever an alcoholic or problem drinker

SECTION 3A: TOBACCO USE AND DEPENDENCE
SMOKER     tobacco use status
S3AQ2A1    age when smoked first full cigarette
CHECK321   cigarette smoking status
S3AQ3B1    usual frequency when smoked cigarettes
S3AQ3C1    usual quantity when smoked cigarettes

SECTION 3B: MEDICINE USE
S3BQ1A5    ever used cannabis
S3BD5Q2A   age first used cannabis
S3BD5Q2C   how often used cannabis in the last 12 months
S3BQ3      number of cannabis joints usually smoked in a day in the last 12 months
S3BD5Q2E   how often used cannabis when using the most
S3BD5Q2F   age when began using cannabis most
S3BQ4      number of cannabis joints usually smoked in a day when using cannabis the most

SECTION 3C: DRUG ABUSE/DEPENDENCE (MEDICINE EXPERIENCES)
S3CD5Q12C1 ever have arguments with family or friends because of ... happen in the last 12 months with cannabis
S3CD5Q12E1 ever have arguments with family or friends because of ... happen prior to last 12 months with cannabis
S3CD5Q12C2 ever get into physical fight under influence ... happen in the last 12 months with cannabis
S3CD5Q12E2 ever get into physical fight under influence ... happen prior to last 12 months with cannabis
S3CD5Q12C3 ever continue to use medicine/drug even though causing trouble with family or friends ... happen in the last 12 months with cannabis
S3CD5Q12E3 ever continue to use medicine/drug even though causing trouble with family or friends ... happen prior to last 12 months with cannabis
S3CD5Q12C4 ever have job or school troubles because of ... happen in the last 12 months with cannabis
S3CD5Q12E4 ever have job or school troubles because of ... happen prior to last 12 months with cannabis
S3CD5Q12C7 more than once drive a vehicle under the influence of ... happen in the last 12 months with cannabis
S3CD5Q12E7 more than once drive a vehicle under the influence of ... happen prior to last 12 months with cannabis
S3CD5Q13A  age at onset of cannabis abuse
S3CD5Q13B  number of episodes of cannabis abuse
S3CD5Q13CR duration (months) of longest/only episode of cannabis abuse (based on s3cd5q13e if only 1 episode)
S3CD5Q13DR age when only/most recent episode of cannabis abuse began (based on s3cd5q13ar if only 1 episode)
S3CD5Q13F  age at full remission of cannabis abuse
S3CD5Q14C1 more than once want to stop or cut down on ... happen in the last 12 months with cannabis
S3CD5Q14E1 more than once want to stop or cut down on ... happen prior to last 12 months with cannabis
(If you're interested in additional effects of use, continue looking through these variables.)

SECTION 3D: DRUG TREATMENT UTILIZATION

SECTION 3E: FAMILY HISTORY (II) OF DRUG ABUSE

SECTION 4A: MAJOR DEPRESSION (LOW MOOD I)
S4AQ1      ever had 2-week period when felt sad, blue, depressed, or down most of time
S4AQ2      ever had 2-week period when didn't care about things usually cared about
S4AQ6A     age at onset of first episode
S4AQ7      number of episodes
S4AQ16     went to counselor/therapist/doctor/other person for help to improve mood
S4AQ18     doctor prescribed medicine/drug to improve mood/make you feel better
S4AQ19A    age at first time sought help

SECTION 4B: FAMILY HISTORY (III) OF MAJOR DEPRESSION
S4BQ1      blood/natural father ever depressed
S4BQ2      blood/natural mother ever depressed
S4BQ3C     any full brothers ever depressed
S4BQ4C     any full sisters ever depressed

SECTION 4C: DYSTHYMIA (LOW MOOD II)

SECTION 5: MANIA OR HYPOMANIA (HIGH MOOD)

SECTION 6: PANIC DISORDERS AND AGORAPHOBIA (ANXIETY)
the variables in this section refer to one of the following disorders:
1. Panic Disorder With Agoraphobia (PDwA)
2. Panic Disorder Without Agoraphobia (PDw/oA)
3. Agoraphobia Without Panic Disorder (Aw/oPD)
S6Q1       had panic attack, suddenly felt frightened/overwhelmed/nervous as if in great danger but were not
S6Q12A     age at onset of first episode
S6Q13      number of episodes
S6Q21      went to counselor/therapist/doctor/other person for help with panic attacks
S6Q25A     age at first time sought help

SECTION 7: SOCIAL PHOBIA (SOCIAL SITUATIONS)
S7Q1       ever had strong fear or avoidance of social situation
S7Q2       had fear/avoidance of social situation due to fear of embarrassment at what you might say/do around others
S7Q3       had fear/avoidance of social situation due to fear of becoming speechless, having nothing to say or saying something foolish
S7Q4A1     ever had fear/avoidance of talking in front of others
S7Q17A     age at onset of first episode
S7Q17C     number of episodes

SECTION 8: SPECIFIC PHOBIA (SPECIFIC SITUATIONS)

SECTION 9: GENERALIZED ANXIETY (GENERAL ANXIETY)
S9Q1A      ever had 6+ month period felt tense/nervous/worried most of time
S9Q6A      age at onset of first episode
S9Q7       number of episodes

SECTION 10: PERSONALITY DISORDERS (USUAL FEELINGS AND ACTIONS)

SECTION 11A: ANTISOCIAL PERSONALITY DISORDER (BEHAVIOR)
S11AQ1A2   ever stay out late at night even though parents told you to stay home
S11AQ1A6   more than once quit a job without knowing where would find another one
S11AQ1A14  ever do things that could easily have hurt you or someone else, like speeding or driving after having too much to drink
S11AQ1A15  ever get more than 3 tickets for reckless/careless driving, speeding, or causing an accident
S11AQ1A16  ever have drivers license suspended or revoked for moving violations
S11AQ1A20  ever steal something from someone/someplace when no one was around
S11AQ1A25  ever do something you could have been arrested for, regardless of whether you were caught or not
S11AQ1D    age at first time some of these experiences began to happen

SECTION 11B: FAMILY HISTORY (IV) OF ANTISOCIAL PERSONALITY DISORDER
S11BQ1     blood/natural father ever had behavior problems
S11BQ2     blood/natural mother ever had behavior problems

SECTION 12: PATHOLOGICAL GAMBLING (BETTING)

SECTION 13: MEDICAL CONDITIONS/VICTIMIZATION

SECTION 14: DSM-IV DIAGNOSES``````