Question: Exercise 2: Codebook (8 points) For this test, we'll be using data from the American National Election Survey [ANESL a survey that is held after

 Exercise 2: Codebook (8 points) For this test, we'll be usingdata from the American National Election Survey [ANESL a survey that isheld after each presidential election every four years. The survey asks a

Exercise 2: Codebook (8 points) For this test, we'll be using data from the American National Election Survey [ANESL a survey that is held after each presidential election every four years. The survey asks a sample of US voters about their voting habits and their opinions on a variety of social and political issues. I've downloaded the 2016 ANES data, shown in the output below. data. frame' : 4271 obs. of 28 variables: $ case_ID : int 300001 300002 300003 300004 300006 300007 300008 300012 300018 300020 . .. vote_2012 : Factor w/ 4 levels "Barack Obama", . .: NA 1 NA 2 1 2 1 2 2 NA . . party_reg : Factor w/ 5 levels "Democrat", "Republican", . .: 2 4 NA NA NA 4 1 2 NA NA $ like_dem : Factor w/ 2 levels "yes", "no": 2 2 2 2 1 2 1 2 2 2 ... $ like_repub : Factor w/ 2 levels "yes", "no" : 1 1 2 1 1 1 2 1 2 2 ... $ last_year_better_worse: num 3 3 3 5 1 3 3 3 3 3 ... $ pol_id int NA 5 NA NA 4 6 NA 5 4 3 . . . $ pol_compromise Factor w/ 2 levels "Compromise", "No compromise": 2 2 1 1 2 2 1 1 1 2 ... sex_orientation Factor w/ 3 levels "Heterosexual", ..: 1 1 1 1 1 1 1 1 1 1 $ religion_importance : Factor w/ 2 levels "Important", "Not important": 1 2 2 1 1 1 1 1 2 1 ... religious_services : Factor w/ 5 levels "Every week", "Almost every week",..: 4 NA NA 1 2 1 4 NA 4 4 ... $ age int 29 26 23 58 38 60 58 56 45 30 ... marital : Factor w/ 5 levels "Married", "Widowed", . .: 1 5 5 1 3 1 1 2 4 1 ... educ_level : num 9 13 9 9 9 14 5 9 9 10 ... served_usarmy : Factor w/ 2 levels "Never Served", . .: 1 1 1 1 1 1 1 1 1 1 ... hh_union Factor w/ 2 levels "yes", "no": 2 2 2 1 2 2 1 1 2 2 . . . race Factor w/ 5 levels "White", "Black", ..: 1 1 1 1 1 1 2 1 5 1 employment Factor w/ 6 levels "Employed", "Unemployed", . .: 1 1 1 1 1 1 1 1 1 1 ... parents_born : Factor w/ 3 levels "Both US Born", ..: 1 1 1 1 1 1 3 1 1 1 ... kids_hs int 10 2 0 310 002 ... $ feel_feminists int 50 50 50 50 70 50 50 40 50 50 feel_liberals int 50 50 50 50 70 15 85 30 15 50 $ feel_conservatives int 70 60 50 50 70 50 85 40 60 50 $ feel_gay int 15 50 70 50 85 50 85 100 50 50 $ feel_transgender : int 50 50 50 50 85 50 85 70 30 50 . . . age_cat : Factor w/ 4 levels "Young Adult", . .: 1 1 1 3 2 3 3 3 3 2 ... educ_level_num : num 2 5 2 2 2 6 1 2 2 3 . . . educ_level_cat : Factor w/ 8 levels "Not HS graduate", . .: 2 5 2 2 2 6 1 2 2 3 A. How many variables and how many respondents are in the data? (2 points) B. The survey includes the variable v161310x according to the NHANES codebook shown below. (6 points)A. How many variables and how many respondents are in the data? (2 points) B. The survey includes the variable v161310x according to the NHANES codebook shown below. (6 points) v161310x PRE: SUMMARY - R self-identified race VALUE LABEL 1 1. White, non-Hispanic 2 2. Black, non-Hispanic 3 3. Asian, native Hawaiian or other Pacif Islr, non-Hispanic 4 4. Native American or Alaska Native, non-Hispanic 5 5. Hispanic 6 6. Other non-Hispanic incl multiple races Data type: numeric Minimum code defined as valid: 0 Record/columns: 1/129-130 a. What does the variable v161310x measure? (2 points) b. How many values does the variable v161310x have? (1 point) c. What are the labels attached to the value of 5? (1 point) d. Given that these values are numeric and in order, should we treat v161310x as a categorical or numeric variable? Why? (2 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!