Review for Exam #1POLS 2140Hansen Lab Exercise #3 READ CAREFULLY ALL THE WAY THROUGH BEFORE YOU BEGIN(50 points)This is an in-class assignment, due at the end of class. You are going to...

Attached are the questions - I can send the R dataset later


Review for Exam #1 POLS 2140 Hansen Lab Exercise #3 READ CAREFULLY ALL THE WAY THROUGH BEFORE YOU BEGIN (50 points) This is an in-class assignment, due at the end of class. You are going to use the 2016 ANES data set and codebook, which are on Canvas. YOU NEED TO SAVE YOUR R SCRIPT FILE AND TURN IN WITH YOUR WRITE-UP. (ASK IF YOU DON’T KNOW WHAT THIS MEANS.) You are to choose ONE dependent variable and THREE independent variables. So think about what would make a good dependent and which three variables would make good independent variables that are possibly (causally) related to your dependent variable. Remember the independent variables are typically used to explain the dependent variable. So think about a question and relationships (hypotheses) that are grounded in political science theory and/or common sense. You need to justify the choice of your variables—i.e. what is the relationship and why do you think each of your independent variables causes/explains your dependent variable. Write out your hypothesis for each relationship, and the theory that justifies the relationships you are interested in. For example, an easy choice for a dependent variable would be variable, V162034a, which is “POST: For whom did R vote for President?” POST means post election as opposed to PRE election. And R stands for Respondent. I want to know what caused voters to choose one candidate over another in the 2016 election. There are lots of policy questions you can use as dependent variables as well, so look through the codebook and data and find something you are interested in! Below is the frequency on the vote variable. Notice that you will have to create a new variable that gets rid of all the responses that you cannot use. So for this variable, you would probably want to create a new variable called Vote2016 with three values for three categories: 1=Clinton, 2=Trump, and 3=Other (categories 3, 4, 5, 7 & 9 below). The remaining categories (-9, -8, -7, -6, -1) would just be treated as missing, NA. Here I am lumping all other candidates besides Clinton and Trump into the “other” category because they each received very few votes so the N is too small to really say anything scientifically sound. BE SURE YOUR NEW VARIABLES HAVE LABELS FOR EACH VALUE SO I KNOW WHAT THEY ARE. . tab V162034a POST: For whom did R vote for President | Freq. Percent Cum. ----------------------------------------+----------------------------------- -9. Refused | 26 0.61 0.61 -8. Don't know (FTF only) | 2 0.05 0.66 -7. No Post, deleted due to insufficien | 86 2.01 2.67 -6. Unit nonresponse, no Post-Election | 536 12.55 15.22 -1 | 958 22.43 37.65 1. Hillary Clinton | 1,290 30.20 67.85 2. Donald Trump | 1,178 27.58 95.43 3. Gary Johnson | 115 2.69 98.13 4. Jill Steiin | 31 0.73 98.85 5. Other candidate SPECIFY | 39 0.91 99.77 7. Other specify given as: none | 1 0.02 99.79 9. Other specify given as: RF | 9 0.21 100.00 ----------------------------------------+----------------------------------- Total | 4,271 100.00 SOME R CODE TO CREATE NEW VARIABLE WITH APPROPRIATE NAME AND RECODE VARIABLE: ANES2016$vote2016 <- anes2016$v162034a="" table(anes2016$vote2016)="" -9="" -8="" -7="" -6="" -1="" 1="" 2="" 3="" 4="" 5="" 7="" 9="" 26="" 2="" 86="" 536="" 958="" 1290="" 1178="" 115="" 31="" 39="" 1="" 9="" #="" recode="" anes2016$vote2016=""><- replace(anes2016$vote2016,="" anes2016$vote2016="">< 0,na="" )="" anes2016$vote2016=""><- replace(anes2016$vote2016,="" anes2016$vote2016="=" 7,na="" )="" anes2016$vote2016=""><- replace(anes2016$vote2016,="" anes2016$vote2016="=" 9,na="" )="" anes2016$vote2016=""><- replace(anes2016$vote2016,="" anes2016$vote2016="=" 4,="" 3="" )="" anes2016$vote2016=""><- replace(anes2016$vote2016,="" anes2016$vote2016="=" 5,="" 3="" )="" table(anes2016$vote2016)="" 1="" 2="" 3="" 1290="" 1178="" 185="" one="" reasonable="" choice="" for="" an="" independent="" variable="" might="" be="" the="" following,="" which="" looks="" at="" attitudes="" towards="" free="" trade="" agreements:="" .="" tab="" v162176x="" post:="" summary-="" favor/oppose="" free="" trade="" |="" agreements="" |="" freq.="" percent="" cum.="" ----------------------------------------+-----------------------------------="" -9.="" refused="" |="" 21="" 0.49="" 0.49="" -8.="" don't="" know="" |="" 33="" 0.77="" 1.26="" -7.="" no="" post="" data,="" deleted="" due="" to="" incomp="" |="" 86="" 2.01="" 3.28="" -6.="" no="" post-election="" interview="" |="" 536="" 12.55="" 15.83="" 1.="" favor="" a="" great="" deal="" |="" 354="" 8.29="" 24.12="" 2.="" favor="" moderately="" |="" 821="" 19.22="" 43.34="" 3.="" favor="" a="" little="" |="" 245="" 5.74="" 49.08="" 4.="" neither="" favor="" nor="" oppose="" |="" 1,449="" 33.93="" 83.00="" 5.="" oppose="" a="" little="" |="" 138="" 3.23="" 86.23="" 6.="" oppose="" moderately="" |="" 340="" 7.96="" 94.19="" 7.="" oppose="" a="" great="" deal="" |="" 248="" 5.81="" 100.00="" ----------------------------------------+-----------------------------------="" total="" |="" 4,271="" 100.00="" for="" any="" variables="" you="" choose,="" you="" will="" have="" to="" create="" a="" new="" variables="" from="" them,="" excluding="" options="" like="" “don’t="" know”="" or="" “refused”,="" etc.="" for="" this="" independent="" variable,="" you="" would="" only="" want="" to="" keep="" categories="" 1="" through="" 7="" in="" your="" new="" variable.="" the="" other="" values="" would="" be="" recoded="" to="" na,="" missing.="" anes2016$trade_opp=""><- anes2016$v162176x table(anes2016$trade_opp) anes2016$v162176x="">
Oct 22, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here