logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Peck KellerTechnical writing
(5/5)

756 Answers

Hire Me
expert
Eliana HubbardNursing
(5/5)

798 Answers

Hire Me
expert
Philip BirnbaumAccounting
(5/5)

910 Answers

Hire Me
expert
Moian AliGeneral article writing
(5/5)

980 Answers

Hire Me
R Programming
(5/5)

In this question, you will apply the FWL theorem to estimate a regression coefficient using the birth—weight smoking dataset

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Before von start, itiake sure you have installed and loaded these packages: haven, ggplot2, dplyr. tidyverse,stargazer, AER, MASS. and car

Question 1: Frisch- Waugh-Lovell Theorem

In this question, you will apply the FWL theorem to estimate a regression coefficient using the birth—weight smoking dataset

Regress the variable birt.liweight’ on tue the varial)lcs sinoker. unmarried’. and ‘nprevisC.

Save the residuals as resids 1

Regress the variable drinks’ on the variables ‘smoker’, umnarried’, and nprevist’. Save the

residuals as resids2

use your results from (a) and (b) to estimate the coefficient on ‘drinks’ in the regression of birthweight on drinks’, smoker’, ‘unmarried’, and ‘I11)revist Note: You must use the results from (a) and (b), and time Frischi-Waugh theorem to answer this part of the question. Compare the coefficient you obtained using the Friscim—Waugh theorem to that when estimating the time full model using the 1mo function.Regress ‘birthweight’ on drinks’, ‘smoker’, ‘unmarried’, and ‘nprevist Report the results of the regression in a table (using the stargazer() function

Question 2: Dummy Variables, Interaction Terms

In this question you will ijeed to use the CollegeDistance dataset contained in the AER package. You must

install and load time AER package to access the dataset.

# After installing and loadzng the AER package, you can access the data using this command:

data (“CollegeDistance”)

Create a dummy variable called ‘hispanic’ that is equal to 1 if ‘ethnicity’ = “hispanic”,

and () otherwise. Create a dummy variable called ‘afam’ that is equal to 1 if ‘ethnicity’ = “afam”,

and (J otherwise. Create a duinniy variable called ‘male’ that is equal to 1 if ‘gender’ = ‘iiiale”, and O otherwise.

lise the dummy variables you created iii (a) to run a regression of ‘cðucation on score’,

‘afarmi’, ‘hispanic’, ‘male’, and ‘distance’. Report time results of this regression in a table using time stargazer() function.

Suppose you believe the effect of score on educational attainment differs based on gender.

Adjust the regression in part (b) to include an interaction terni l)etweeII ‘timale’ and ‘score Report the results of this new regression in a table using the stargazer() function.

Question 3: Joint Hypothesis Testing and R2

In this question you will need to use the MASchools dataset contained in the AER package. You nmust install and load the AER package to access the (lataset.

# After znstall’ng and loading the AER package, you can access the data using this command:

data (“MASchools”)

Create a new data frame called ‘MASchools_subset’ containing only the ‘expreg’, ‘strat.io’, ‘in conic’, ‘scoreS’, and ‘english’ columims. Drop any observations with an NA value from ‘MASchools_subset You can access time help file for the MASchools (lataset using time ?MASchools conunan(1 Regress ‘scoreS’ on ‘expreg’, ‘stratio’, ‘inconic’, and ‘english’ using observations from  1\lASchools subset.

Calculate the SST (Total Stun of Squares) of the regression estimated in (b), where SST = — V)2 save the result. Calculate t.he SSR (Residual Sum of Squares) of the regression estimatedin (b), where SSR = (ij )2. Save the result. Hint.: use the residuals() function

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme