Multiple Regression

Instructions

  1. Homework assignment is here with all questions commented out.
  2. Complete all of the coding tasks in the .qmd file
  3. Upload your individual exercise to your GitHub repo by Wed 11:59pm.
  4. Remember to clean your github repo and sort hw submissions by weeks. Each week should have one folder.
# Use the world data set to analyze the determinants of female 
# representation (women09) 


# 1. Estimate a constant-only model





# 2. Estimate a model that uses per capita GDP (gdp_10_thou) as
#    the main independent variable.




# 3. Create a graph that shows the estimated effect of per capita
#    GDP on female representation using the effect function.





# 4. Estimate a model that uses a dummy variable that measures
#    electoral system (pr_sys) as the main independent variable.





# 5. Create a graph that shows the estimated effect of electoral
#    system on female representation using the effect function.





# 6. Estimate a model that includes per capita GDP AND electoral
#   system dummy at the same time.




# 7. Comparing the four models you have estimated so far, which
#    one fit the data best? 




# 8. Create a graph that shows the effect of per capita GDP
#    on Y for countries that adopt proportional representation system.

#    Hint 1: use the given.values option.
#    Hint 2: to refer to the pr_sys variable in the given.values option,
#            you need to call it "pr_sysYes", not "pr_sys". 
#    Hint 3: pr_sysYes is either 1 (Yes) or 0 (No)





# 9. Try creating the same graph by providing "gdp_10_thou:pr_sys" as the term.






# 10. Estimate a regression model of female representation that uses 
#     region as the main independent variable. 







# 11. Create an effect plot that shows the relationship between region and 
#     female representation. 







# 12. Estimate a regression model of female representation on per cpaita
#     GDP that controls for region. Based on the results, can we say 
#     per capita GDP is an important determinant of female representation?
#    Why or why not?






# 13. Estimate a regression model of female representation on frac_eth3, a 
# three-category ordinal variable that measures levels of ethnic fractionalization.
# In doing so, adopt the dummy variable approach 
# (i.e., treat this variable as a nominal variable).






# 14. Based on the results, do you think ethnic fractionalization levels
#     have a positive/negative impact on female representation? 

#     You may answer this either by looking at the regression table you
#     created above or by creating an effect plot.

#####################################################################
#     Note that statistical significance can be VERY MISLEADING here.
#####################################################################