Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# Instrumental Variables example library(sem) #If gets error, add code < install.packages(Hmisc,dependecies=T)> or download a new version R studio wages

# Instrumental Variables example library(sem) #If gets error, add code< install.packages("Hmisc",dependecies=T)> or download a new version R studio wages<-read.csv('http://inta.gatech.s3.amazonaws.com/wage2.csv') iv.results<-tsls(lwage ~ educ + age + married + black + exper, ~ feduc + age + married + black + exper, data=wages) ols.results<-lm(lwage ~ educ + age + married + black + exper, data=wages) print(summary(ols.results)) print(summary(iv.results)) library(MASS) start.model<-lm(wage ~ hours + IQ + KWW + educ + exper + tenure + age + married + black + south + urban + sibs, data=wages) summary(start.model) stepwise.model<- step(start.model) summary(stepwise.model) stepwise.model.interactions <- step(start.model, scope=wage~.^2) summary(stepwise.model.interactions)

below is a screenshot for the code:

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

Mathematics for Economics and Business

Authors: Ian Jacques

9th edition

129219166X, 9781292191706 , 978-1292191669

More Books

Students also viewed these Mathematics questions