R studio

profileEliza03
GOVT300_PS10_F20207.pdf

Problem Set 10

1 Exercise 1: UK Campaign Spending, Revisited (40%)

The file UKSpendingVoteShare.csv contains data on the vote share and total spending of the 7 largest parties in the British Elections of 2019 for each constituency (the data excludes Northern Ireland). The following table contains the variable names and their descriptions.

Variable Name Description ConstituencyID A unique identifier for each constituency in Britain Constituency The official name of each constituency in Britain voteshareLab The vote share of the Labour candidate in each constituency SpendingLab The total spending of the Labour candidate in each constituency, measured in thousands of pounds voteshareCon The vote share of the Conservative candidate in each constituency SpendingCon The total spending of the Conservative candidate in each constituency, measured in thousands of pounds voteshareLD The vote share of the Liberal Democrat candidate in each constituency SpendingLD The total spending of the LD candidate in each constituency, measured in thousands of pounds votesharePC The vote share of the Plaid Cymru candidate in each constituency SpendingPC The total spending of the Plaid Cymru candidate in each constituency, measured in thousands of pounds voteshareSNP The vote share of the Scottish National Party candidate in each constituency SpendingSNP The total spending of the SNP candidate in each constituency, measured in thousands of pounds voteshareGrn The vote share of the Green Party candidate in each constituency SpendingGrn The total spending of the Green Party candidate in each constituency, measured in thousands of pounds voteshareUKIP The vote share of the UK Independence Party candidate in each constituency SpendingUKIP The total spending of the UK Independence Party candidate in each constituency, measured in thousands of pounds Nation Indicates whether the constituency is in England, Scotland, or Wales

All vote shares are measured from 0 to 100. So if a party obtained 50% of the vote in a constituency, it will show up as 50 (not 0.5). All spending in measured in thousands of pounds, so if a party spent 1,000 pounds in a constituency, it will show as 1 (not 1,000); if a party spent 2,000 pounds in a constituency, it will show as 2 (not 2,000) in the data.

a. (5pts) In Problem Set 6, Exercise 1a, you estimated how the spending by different parties affects the vote share of the Conservative party using a multivariate regression. Re-estimate that regression here: Labour, Liberal Democrat, and UKIP parties:

voteshareConi = α+ β1SpendingConi + β2SpendingLabi + β3SpendingLDi + β4SpendingUKIPi + εi

b. (10pts) Using a 5% significance level, test the null hypothesis that the effect of spending by the Conservative party on the vote share of the Conservative party is equal to 0. Based on the result of the test, is it reasonable to say, statistically speaking, that Conservative party spending does help the party increase its own vote share when controlling for the spending of the other parties?

c. (1opts) Using a 5% significance level, the spending of which of the other parties has a statistically significant effect on the vote share of the Conservative party?

(Hint: for which do you reject the null hypothesis that the corresponding effect is zero).

d. (15pts) Using the confint function in R produce 95% confidence intervals for all the parameters in the regression you estimated in (a). Provide an interpretation of the confidence interval for each one of those parameters.

(Hint: For an example of how to use the confint function check out the the R video lesson from Lesson 12 as well as the code corresponding to that lesson, called RegressionWithUncertainty.R. )

2 Exercise 2: Indiscriminate Violence, Revisited (25%)

The names and descriptions of the variables in the data file chechen.csv are: This is the same data used in PS3, PS8, and PS9. If you need to refresh the description of the data, please refer to one

of those problem sets.

a. (15pts) We saw in class that we could use a linear regression to estimate the Difference-in-Means estimator. The benefit of doing this with linear regression is two-fold: (1) the code is simpler, and (2) the summary of the regression

1

Name Description village Name of Village groznyy Variable indicating whether a village is in Grozny (1) or not (0) fire Whether Russians shelled a village with artillery fire (1) or not (0) deaths Number of individuals killed during Russian artillery fire or NA if not fired on preattack The number of insurgent attacks in the 90 days before being fired on postattack The number of insurgent attacks in the 90 days after being fired on

will provide us with the estimate, the standard deviation of the estimate, and the z-score to test the null hypothesis that the effect is equal to zero. Use a linear regression to estimate the Difference-in-Means and confirm that you obtain the same results for DiM, the standard deviation of DiM as in PS8:

postattacki = α+ βfirei + εi

b. (10pts) Using the confint function in R obtain a 95% as well as a 90% confidence interval for DiM and interpret their results.

3 Exercise 3: Assorted Questions (35%)

a. (5pts) Suppose you conduct a hypothesis test using a 5% significance level and you reject the null hypothesis. If you were to build a 95% confidence interval, would the null hypothesis be inside or outside that confidence interval? Explain why or why not.

b. (5pts) In Lesson 12, we discussed the assumptions that were necessary for a linear regression to produce unbiased and consistent estimates of the parameters. What were these three assumptions?

c. (5pts) In Lesson 12, we discussed the assumptions that were necessary for the formula of the variance we normally use to be correct. What where these two additional assumptions?

d. (5pts) To do hypothesis testing and build confidence intervals we relied heavily on the Central Limit Theorem. What does this theorem say and why is it so useful?

e. (5pts) Suppose what we somehow manage to increase the size of the sample we are using to estimate a linear regression. What will happen to the variance and standard deviation of the coefficients? Will they increase or decrease? Very briefly explain why (You can use the formula for the variance of regression coefficients to explain why).

f. (5pts) Suppose we estimate a multivariate linear regression in which two of the independent variables are very highly correlated with each other. What will the consequence of this be for the variance of the coefficients for those variables?

g. (5pts) Suppose you calculated a 90%, a 95%, and a 99% confidence interval. Which confidence interval will be wider, and why?

2