Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

title: Assignment 2 author: First Last format: pdf editor: visual ## Quarto Quarto enables you to weave together content and executable code into a

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

title: "Assignment 2 " author: "First Last" format: pdf editor: visual \#\# Quarto Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see . \#\# Running Code When you click the Render button a document will be generated that includes both content (everything outside the code chunks) and the output of embedded code. To render to a pdf you need tinytex installed. Follow the instructions here: You can embed code like this: {r} # load packages library (tidyverse) library (modelsummary) \# be sure to change this path to match where your file is stored load(slave_trade_assign2.RData) Note: Do not put "install.packages()" lines in the code chunks but do put your "library()" calls in the first code chunk. You can add code chunks by going to "Insert" and then hovering over "code chunk" from the list and finally selecting "R" from the menu. {r} \# example code summary (nunn) Quarto uses markdown syntax, which you can see if you toggled from "Visual" to "Source" in the header bar. The header bar also has formatting options similar to what you would find in Word. Be sure to change the document author in the meta data at the top of the file to your name instead of "First Last". title: "Assignment 2 " author: "First Last" output: pdf_document {r setup, include = FALSE } knitr::opts_chunksset (echo = TRUE) \#\# R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see . When you click the Knit** button a document will be generated that includes both content (everything outside the code chunks) as well as the output of any embedded R code chunks within the document. To knit to a pdf you need tinytex installed. Follow the instructions here: You can embed an R code chunk like this: \{r\} # load packages library (tidyverse) library (modelsummary) \# be sure to change this path to match where your file is stored load (" /Documents/teaching/ECON_2P91/assignments/assign_2/slave_trade_ass ign2.RData") Note: Do not put "install.packages()" lines in the code chunks but do put your "library()" calls in the first code chunk. You can add code chunks by going to "Insert" and then hovering over "code chunk" from the list and finally selecting "R" from the menu. {r} \# example code summary (nunn) Rmarkdown uses markdown syntax, which you can see if you toggled from "Visual" to "Source" in the header bar. The header bar also has formatting options similar to what you would find in Word. Be sure to change the document author in the meta data at the top of the file to your name instead of "First Last". Afrima'e hietarieal elawa trada 1. We saw in class how to create a dummy variable that takes on values of 1 and 0 . We also saw how we can use multiple dummy variables when we have more than two categories. Another important historical event in Africa's past was colonial rule, and we might be concerned, for example, that wealthier areas of Africa were more likely to engage in the slave trade and because of their wealth were more desirable targets for colonisation. So, maybe we would like to account for colonial rule. Add the variables colonyi where i=1,,7. That is, use the OLS to estimate the following multiple regression model: gdppercapita ai=0+1 slaveexports i+2 coastline i+3 popdensity i+ 4 colony 1+5 colony 2+6 colony 3+7 colony 4+ 8 colony 5+9 colony 6+10 colony 7+ui Present your results in a table like those we've seen in class, be sure to use heteroskedasticrobust standard errors. 2. Why did I leave out colonyo in the model above? What would happen if you included it? 3. How many degrees of freedom do we have now? 4. After accounting for a country's colonial history, does the effect of slave exports remain statistically significant at the 5% level? 5. Conduct a joint hypothesis test on all of the colony variables, are they jointly significant at the 5% level? (Hint: Don't forget to use heteroskedastic-robust test statistic.) title: "Assignment 2 " author: "First Last" format: pdf editor: visual \#\# Quarto Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see . \#\# Running Code When you click the Render button a document will be generated that includes both content (everything outside the code chunks) and the output of embedded code. To render to a pdf you need tinytex installed. Follow the instructions here: You can embed code like this: {r} # load packages library (tidyverse) library (modelsummary) \# be sure to change this path to match where your file is stored load(slave_trade_assign2.RData) Note: Do not put "install.packages()" lines in the code chunks but do put your "library()" calls in the first code chunk. You can add code chunks by going to "Insert" and then hovering over "code chunk" from the list and finally selecting "R" from the menu. {r} \# example code summary (nunn) Quarto uses markdown syntax, which you can see if you toggled from "Visual" to "Source" in the header bar. The header bar also has formatting options similar to what you would find in Word. Be sure to change the document author in the meta data at the top of the file to your name instead of "First Last". title: "Assignment 2 " author: "First Last" output: pdf_document {r setup, include = FALSE } knitr::opts_chunksset (echo = TRUE) \#\# R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see . When you click the Knit** button a document will be generated that includes both content (everything outside the code chunks) as well as the output of any embedded R code chunks within the document. To knit to a pdf you need tinytex installed. Follow the instructions here: You can embed an R code chunk like this: \{r\} # load packages library (tidyverse) library (modelsummary) \# be sure to change this path to match where your file is stored load (" /Documents/teaching/ECON_2P91/assignments/assign_2/slave_trade_ass ign2.RData") Note: Do not put "install.packages()" lines in the code chunks but do put your "library()" calls in the first code chunk. You can add code chunks by going to "Insert" and then hovering over "code chunk" from the list and finally selecting "R" from the menu. {r} \# example code summary (nunn) Rmarkdown uses markdown syntax, which you can see if you toggled from "Visual" to "Source" in the header bar. The header bar also has formatting options similar to what you would find in Word. Be sure to change the document author in the meta data at the top of the file to your name instead of "First Last". Afrima'e hietarieal elawa trada 1. We saw in class how to create a dummy variable that takes on values of 1 and 0 . We also saw how we can use multiple dummy variables when we have more than two categories. Another important historical event in Africa's past was colonial rule, and we might be concerned, for example, that wealthier areas of Africa were more likely to engage in the slave trade and because of their wealth were more desirable targets for colonisation. So, maybe we would like to account for colonial rule. Add the variables colonyi where i=1,,7. That is, use the OLS to estimate the following multiple regression model: gdppercapita ai=0+1 slaveexports i+2 coastline i+3 popdensity i+ 4 colony 1+5 colony 2+6 colony 3+7 colony 4+ 8 colony 5+9 colony 6+10 colony 7+ui Present your results in a table like those we've seen in class, be sure to use heteroskedasticrobust standard errors. 2. Why did I leave out colonyo in the model above? What would happen if you included it? 3. How many degrees of freedom do we have now? 4. After accounting for a country's colonial history, does the effect of slave exports remain statistically significant at the 5% level? 5. Conduct a joint hypothesis test on all of the colony variables, are they jointly significant at the 5% level? (Hint: Don't forget to use heteroskedastic-robust test statistic.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Accounting International Edition

Authors: Jerry J. Weygandt, Donald E. Kieso, Paul D. Kimmel

6th Edition

978-0470623275

More Books

Students also viewed these Accounting questions