联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> OS作业OS作业

日期:2024-04-29 04:03

PPOL 5001 Spring 2024 (Jensen)

Problem Set #5

Due before midnight on Thursday, May 2, 2024.

Please note:

•  You must show your work and explain your answers clearly to receive full credit. Make sure to explain your and reasoning and to fully answer all question parts.

•   Problem sets should be typed, though you may circle or highlight by hand the relevant parts of any Stata output or plots that you reference in your answer

•   Raw Stata output or highlighted output without explanation will not receive full credit. Please copy-and-paste the final Stata code that you use to answer each question.

•  On the front page, be sure to include the name your study partner (if any), as well as the total hours you spent completing the problem set.

Dataset:

•    You will need to download uscid.dta dataset from Canvas.

Problems:

1.  The 2006 U.S. Citizenship, Involvement and Democracy survey asked 1,001

American adults the following question: “Out of every 100 people living in the U.S., how many do you think were born outside of the country?” (The correct answer was  12, but most people over-estimated this.) Responses to this question were coded as the variable pct_foreign. Here are its summary statistics:

. summ pct_foreign Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- pct_foreign | 890 27.77528 19.30354 0 100

Respondents were also asked: “Do you think the number of immigrants from foreign  countries who are permitted to come to the United States to live should be increased a lot, increased a little, left the same as it is now, decreased a little, or decreased a lot?” Responses were coded as the variable immigration. Here are frequency tables for this variable:

. tab1 immigration 168. Should the number of | immigrants from foreign | countries permitted to | come to | Freq. Percent Cum. ------------------------------+----------------------------------- 1. Increased a lot | 51 5.41 5.41 2. Increased a little | 100 10.62 16.03 3. Left the same as it is now | 325 34.50 50.53 4. Decreased a little | 215 22.82 73.35 5. Decreased a lot | 251 26.65 100.00 ------------------------------+----------------------------------- Total | 942 100.00

Finally, the variable brncntr indicates whether or not the respondent was born in the United States, as shown here:

. tab1 brncntr -> tabulation of brncntr 159. Were | you born in | the United | States? | Freq. Percent Cum. ------------+----------------------------------- Yes | 930 93.00 93.00 No | 70 7.00 100.00 ------------+----------------------------------- Total | 1,000 100.00

1.1. Begin by creating an indicator variable called lower_immig and code it =1 for people who said that immigration should be “decreased a little” or “decreased a lot,” =0 for people who said that immigration should be left the same or increased, and =. for people who did not answer the question. Create a two- way table showing that this variable has been properly coded, including the  missing data.

1.2. Create an indicator variable called us_born that is coded =1 if someone was born in the United States, =0 if they were not, and =. if they did not answer the question. Create a two-way table showing that this variable has been properly coded, including the missing data.

1.3. Run a logit regression using factor variables that is specified as follows: Y variable - lower_immig

X variables - pct_foreign, the square of pct_foreign and the indicator us_born. Copy and paste the regression output into your answer. You do not need to reformat it.

1.4. What is the theoretic reason for including the square of pct_foreign? (Offer a plausible theory in plain language, but make sure it is consistent with the signs of both coefficients shown in the regression output.)

1.5. Use the margins command to estimate the marginal impact of the foreign

percentage estimate on the probability that a person believes that immigration should be decreased. Follow these guidelines:

• Include the option  level(90) in the margins and the marginsplot commands to specify = 0.1.

• Be sure to estimate the marginal impact at multiple values across the entire range of pct_foreign.

• Run the estimates separately for those born in the U.S. and those not born in the U.S.

• Do not copy the margins output into your answer—instead, run

marginsplot after both margins estimates and copy and paste those figures into your answers.

1.6. Examine the two plots you created in 1.5 and discuss the statistical significance (“ = 0.1), if any, of datapoints presented.

1.7. Offer an overall interpretation of the impact of foreign_pct on the probability that a person born in the U.S. believes in decreasing the number of permitted immigrants. Focus on presenting a plausible theory about the phenomenon in plain language. (Hint: This is not just reciting the results above; what do you    think the foreign_pct variable is actually measuring and why?).

1.8. Examine the Stata output below. Why do the two following commands

produce different estimates of the marginal effect of foreign_pct? Be specific about why the estimations vary. Which estimate do you think is preferable and why?

Estimate 1

. margins, dydx(foreign_pct) atmeans Conditional marginal effects Number of bs = 855 Model VCE : OIM Expression : Pr(decrease_im), predict() dy/dx w.r.t. : foreign_pct at : foreign_pct = 27.48421 (mean) 0.us_born = .0690058 (mean) 1.us_born = .9309942 (mean) ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- foreign_pct | .0015327 .0011386 1.35 0.178 -.0006989 .0037643 ------------------------------------------------------------------------------

Estimate 2

. margins, dydx(foreign_pct) asobserved Average marginal effects Number of bs = 855 Model VCE : OIM Expression : Pr(decrease_im), predict() dy/dx w.r.t. : foreign_pct ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- foreign_pct | .0013994 .0010979 1.27 0.202 -.0007523 .0035512 ------------------------------------------------------------------------------







版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp