- Details
- Parent Category: Programming Assignments' Solutions
We Helped With This R Language Programming Homework: Have A Similar One?

Category | Programming |
---|---|
Subject | R | R Studio |
Difficulty | Graduate |
Status | Solved |
More Info | Online Statistics Homework Help |
Short Assignment Requirements
Assignment Description
GV900 Political Explanation, 2018/2019
Instructor: Daina Chiba
9 January, 2019
Homework Assignment 4
Due Week 19 (5 February)
Perform the necessary statistical analyses using R. Submit the R script file that produces the necessary tables and graphs. Your R file also needs to include some textual discussion and annotations. [You earn 5 points for proper annotation.]
As always, you also need to submit a coversheet in MS word format.
1. Institutional Performance and Civic Community (Putnam data)
1. Load four packages, foreign, ggplot2, stargazer, and effects. [3 points]
2. Load the Putnam data set (putnam.csv). [2 points]
3. Estimate the following three regression models and produce a table that shows the regression coefficients and other statistics in multiple columns:
(a) a simple linear regression model where Institutional Performance is the DV and Civic Community Index is the IV;
(b) an additive model that controls for a dummy variable that captures the North-South division. You may want to create a new dummy variable called North, rather than using the original factor variable NorthSouth for ease of interpretation;
(c) an interactive model that allows Civic Community Index to have different slope for Northern and Southern regions.
[6 points]
4. Based on model fit statistics, which one of the three models would you choose? [6 points]
5. Derive the three sets of implied regression lines from the three models above.
(a) Model (1): The implied regression line: IPˆ
= + ∗CC
(b) Model (2):
The implied regression line for Southern regions: IPˆ
=∗CC
The implied regression line for Northern regions: IPˆ =∗CC
(c) Model (3):
The implied regression line for Southern regions: IPˆ
=∗CC
The implied regression line for Northern regions: IPˆ =∗CC
Your answer for this question must be provided in comment lines in your R file. | [10 |
points]
6. Based on your answers for questions 4 and 5, would you say that we need to have an interactive model here? Why or why not? Your answer for this question must be provided in comment lines in your R file. [5 points]
7. Draw a graph that shows the marginal effect of Civic Community Index based on Model (1). [4 points]
8. Draw two graphs (one for Northern and another for Southern regions) that show the marginal effect of Civic Community Index based on Model (2). [4 points]
9. Draw a graph that shows the marginal effect of Civic Community Index based on Model (3) for Northern and Southern regions. (Hint: your graph should have two panels, one for Northern and another for Southern regions.) [4 points]
10. Based on the numerical regression results as well as the three sets of graphs you have drawn above, would you conclude that the regional distinctions make the relationship between Institutional Performance and Civic Community Index spurious? Why or why not? Your answer for this question must be provided in comment lines in your R file. [6 points]
2. Institutional Performance and Economic Modernization (Putnam data)
1. Estimate the following three regression models and produce a table that shows the regression coefficients and other statistics in multiple columns:
(a) a simple linear regression model where Institutional Performance is the DV and Economic Modernization as the IV;
(b) an additive model that controls for a dummy variable that captures the North-South division;
(c) an interactive model that allows Economic Modernization to have different slope for Northern and Southern regions.
[6 points]
2. Based on model fit statistics, which one of the three models would you choose? [6 points]
3. Derive the three sets of implied regression lines from the three models above.
(a) Model (1): The implied regression line: IPˆ
= + ∗EM
(b) Model (2):
The implied regression line for Southern regions: IPˆ
=∗EM
The implied regression line for Northern regions: IPˆ =∗EM
(c) Model (3):
The implied regression line for Southern regions: IPˆ
=∗EM
The implied regression line for Northern regions: IPˆ =∗EM
[10 points]
4. Based on your answers for questions 2 and 3, would you say that we need to have an interactive model here? Why or why not? [5 points]
5. Draw a graph that shows the marginal effect of the Economic Modernization variable based on Model (1). [4 points]
6. Draw two graphs (one for Northern and another for Southern regions) that show the marginal effect of the Economic Modernization variable based on Model (2). [4 points]
7. Draw a graph that shows the marginal effect of the Economic Modernization variable based on Model (3) for Northern and Southern regions. (Hint: your graph should have two panels, one for Northern and another for Southern regions.) [4 points]
8. Based on the numerical regression results as well as the three graphs you have drawn, would you conclude that the regional distinctions make the relationship between Institutional Performance and Economic Modernization spurious? Why or why not? [6 points]
End of file