--- title: "Assignment 2" subtitle: "Econ 3210, Fall 2020" author: "Your name here" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = TRUE, message = FALSE, warning =...

1 answer below »
The assignment have to be done on R studio ,making a code R and HTML document



--- title: "Assignment 2" subtitle: "Econ 3210, Fall 2020" author: "Your name here" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = TRUE, message = FALSE, warning = FALSE ) # Set the graphical theme ggplot2::theme_set(ggplot2::theme_light()) library(AER) library(wooldridge) library(tidyverse) ``` ## Question 1. This data is based on the following paper: K. Graddy (1997), "Do Fast-Food Chains Price Discriminate on the Race and Income Characteristics of an Area?" Journal of Business and Economic Statistics 15, 391-401. In the paper, the authors argue that fast food chains employ discriminatory pricing practices by charging higher amounts for common items in areas that have a higher proportion of African Americans (the variable **prpblck**). a. What are the names of the variables in the **discrim** data? ```{r} # Your code here. discrim <- wooldridge::discrim="" ```="" b.="" consider="" the="" relationship="" below.="" $$="" psoda_i="\beta_0" +="" \beta_1="" prpblck_i="" +="" u_i="" $$="" run="" a="" simple="" regression="" to="" find="" the="" relationship="" between="" the="" price="" of="" soda="" (**psoda**)="" and="" the="" proportion="" of="" african="" americans="" in="" a="" district="" (the="" variable="" **prpblck**).="" is="" there="" a="" significant="" correlation?="" do="" you="" think="" that="" this="" represents="" a="" causal="" relationship?="" ```{r}="" #="" your="" code="" here="" ```="" d.="" construct="" a="" 95="" percent="" confidence="" interval="" for="" the="" coefficient="" on="" `prpblck`.="" what="" is="" the="" interpretation="" of="" a="" confidence="" interval?="" ```{r}="" #="" your="" code="" here="" ```="" ##="" question="" 2.="" using="" the="" data="" set="" `beauty`="" below.="" it="" contains="" the="" variable="" `wage`="" (hourly="" wage)="" and="" another="" variable="" `abvavg`="" that="" is="" a="" dummy="" variable="" for="" being="" "above="" average="" looking".="" this="" data="" is="" taken="" from="" an="" actual="" paper="" that="" looks="" at="" discrimination="" in="" the="" labour="" market.="" ```{r}="" beauty=""><- wooldridge::beauty="" ```="" 1.="" use="" the="" command="" `table()`="" to="" tabulate="" the="" variable="" `abvavg`.="" this="" command="" tells="" you="" how="" many="" above="" average="" looking="" people="" are="" in="" the="" sample.="" ```{r}="" #="" your="" code="" here="" ```="" 2.="" consider="" the="" relationship="" $$="" wage_i="\beta_0" +="" \beta_1="" abvavg="" +="" u_i="" $$="" what="" is="" the="" interpretation="" of="" $u_i$?="" what="" sorts="" of="" things="" could="" be="" in="" $u_i$.=""> answer here 3. Estimate the relationship in (2). Interpret both the of the estimates of $\hat\beta_0$ and $\hat \beta_1$. ```{r} # code here ``` > answer here 4. Do beatiful people earn more than less beautiful people? (ie, is the coeffient $\hat \beta_1$ statistically significant)? 5. Now use the variable `belavg` instead `abvavg` in a regress. Is there a penalty for being below average looking (`belavg` is below average looking). ## Question 3. Suppose we wanted to predict a CEO's salary based on the firms return on equity over the previous 2 years. The data set `ceosal` contains the variables `salary` (annual salary in thousands) and `roe`, the return on equity in percent (ie, return * 100). Consider the following equation: $$ salary_i = \beta_0 + \beta_1 roe_i + u_i $$ ```{r} ceosal <- wooldridge::ceosal1="" ```="" 1.="" estimate="" the="" equation="" above="" and="" interpret="" the="" coefficient="" on="" $roe_i$.="" the="" units="" are="" important="" here="" --="" the="" depednet="" variable="" is="" measured="" in="" thousands="" of="" dollars="" and="" $roe_i$="" is="" in="" percent.="" your="" interpretation="" should="" relate="" to="" these="" units="" of="" measurment.="" discuss="" the="" test="" $$="" h_0:="" \beta_1="0" \\="" h_1:="" \beta_1="" \neq="" 1="" $$=""> answer here 2. In the following code chunck, I change the units of measurment. In particular, $roe\_decimal_i$ is $roe_i/100$ or measured as the return in decimals. The variable $salary\_dollars_i$ is salary measured in dollars rather than a thousands of dollars. ```{r} ceosal <- ceosal="" %="">% mutate(roe_decimal = roe / 100, salary_dollars = salary * 1000) ``` Estimate $$ salary\_dollars_i = \alpha_0 + \alpha_1 roe_i + u_i $$ and $$ salary_i = \gamma_0 + \gamma_1 roe\_decimal_i + u_i $$ in the code chunk below and interpret both the intercept and the slope coefficient. What is the relationship between $\beta_1$ and $\gamma_1$ and $\alpha_1$, and $\beta_0$ and $\gamma_0$ and $\alpha_0$ ```{r} # your code here ``` > answer here 3. Investigate the following hypothesis: $$ H_0: \gamma_1 = 0 \\ H_1: \gamma_1 \neq 1 $$ Do our conclusions change from part 1?
Answered Same DayOct 13, 2021

Answer To: --- title: "Assignment 2" subtitle: "Econ 3210, Fall 2020" author: "Your name here" output:...

Naveen answered on Oct 14 2021
153 Votes
---
title: "Assignment 2"
subtitle: "Econ 3210, Fall 2020"
author: "Alain"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(
echo = TRUE,
message = FALSE,

warning = FALSE
)
# Set the graphical theme
ggplot2::theme_set(ggplot2::theme_light())
library(AER)
library(wooldridge)
library(tidyverse)
library(dplyr)
```
## Question 1.
This data is based on the following paper:

K. Graddy (1997), "Do Fast-Food Chains Price Discriminate on the Race and Income Characteristics of an Area?" Journal of Business and Economic Statistics 15, 391-401.
In the paper, the authors argue that fast food chains employ discriminatory pricing practices by charging higher amounts for common items in areas that have a higher proportion of African Americans (the variable **prpblck**).
a. What are the names of the variables in the **discrim** data?

```{r}
# Your code here.
discrim <- wooldridge::discrim
# Printig the names of the variables in the discrim data
names(discrim)
```
b. Consider the relationship below.
$$
psoda_i = \beta_0 + \beta_1 prpblck_i + u_i
$$

Run a simple regression to find the relationship between the price of soda (**psoda**) and the proportion of African Americans in a district (the variable **prpblck**).
Is there a significant correlation? Do you think that this represents a causal relationship?
```{r}
# performing simple linear regression
model.lm <- lm(psoda ~ prpblck, data = discrim)
# print summary of the model
summary(model.lm)
```
>Ans: There is no significant correlation between the variables and above given correlation is represents the casual relationship.
d. Construct a 95 percent confidence interval for the coefficient on `prpblck`. What is the interpretation of a confidence interval?

```{r}
# Your code here
confint(model.lm, "prpblck", level = .95)
```
>Ans: The coefficient of prpblck variable will take the values in between 0.017829 and...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here