# r studio and economics hw

Attached is the data of the assignment and there are sample R-codes that you need to use. (I’m not sure if you need anything else) Being able to the graph is the most important thing for me, and once we agree I will tell the Control groups for the assignment. If you know R, it will be very easy to write couple lines of code to get the graphs. You do not need to worry about the explanation and etc. I only need the correct graphs.

Please hand in assignment as one (stapled) document. Any graphs should be legible and should be properly labelled. For instance, if there are two lines please label both lines appropriately in the legend (e.g., as â€œMiamiâ€ and â€œRest of USAâ€). Then answer the questions. Besides the graphs (which can take up a lot of room), the writing for this assignment should not be too onerous and should represent well under one page of writing. This assignment follows our classroom discussion about the Mariel Boatlift. In this assignment, we will recreate Card (1990) but assign different control cities. You will see that the results can be quite sensitive to this choice.

Question 1 Graph the average wages for individuals in Miami vs. the rest of the USA by year. Briefly (2-3 sentences) describe the pattern that you see.

Question 2 Graph the average wages for individuals in Miami vs. the rest of the USA by year for high school dropout and non-high school dropouts (e.g., you should create two graphs). Briefly (2-3 sentences) describe the pattern that you see.

Question 3 Define what you believe to be the most reasonable control group for your difference-indifferences to answer the question â€œDoes immigration affect the wages of locals?â€ State why you picked these cities as â€˜controlâ€™ in 3-5 sentences. [note: please pick a different control group from that of Card (1990). Your treatment group should obviously be Miami due to the Mariel Boatlift.]

Question 4 Graph the average wages for your treatment and control group by year. Then, run an explicit difference-in-differences regression using city and year fixed effects. Please copy and paste the (one line) R code you used to do this in the document.2 Report the point estimate from the regression and interpret it in one sentence.

Question 5 Based on your results discuss whether you believe immigration affects the wages of locals. To do so, please discuss the internal validity of your design by evaluating the likelihood that the parallel trends assumption will hold given your results. 3-5 sentences should suffice. [note: No right or wrong answer here and answer very well might depend on your control group definition. To be clear, though, your evaluation of the parallel trends assumption should be specifically evaluated using your data and not just a general discussion of it].