Question

Write a function in R that implements a two-stage least squares (2SLS) estimator. The input of the function should be the dependent variable y, the endogenous predictor x, and the instrumental variable(s) z. The output of the function only needs to include the point estimate of the coefficient on x. (a) Copy and paste your code below. (b) Load the AER package in R and show that your function produces the same results as the ivreg function (you only need to show the equivalence of the point estimates). (c) Suppose you could not observe z, but instead observed another instrument z' that is generated as follows. zprime = z + rnorm(n, sd=10) Is z' still a valid instrument? Provide evidence using your data. (d) Rerun the IV regression (with ivreg) using z' instead of z. What is the effect on your inference for β1?

          Write a function in R that implements a two-stage least squares (2SLS) estimator. The input of the function should be the dependent variable y, the endogenous predictor x, and the instrumental variable(s) z. The output of the function only needs to include the point estimate of the coefficient on x.

(a) Copy and paste your code below.
(b) Load the AER package in R and show that your function produces the same results as the ivreg function (you only need to show the equivalence of the point estimates).
(c) Suppose you could not observe z, but instead observed another instrument z' that is generated as follows. zprime = z + rnorm(n, sd=10) Is z' still a valid instrument? Provide evidence using your data.
(d) Rerun the IV regression (with ivreg) using z' instead of z. What is the effect on your inference for β1?
        
Show more…

Added by Amy M.

Elementary Statistics a Step by Step Approach
Elementary Statistics a Step by Step Approach
Allan G. Bluman 9th Edition
AceChat toggle button
Close icon
Ace pointing down

Please give Ace some feedback

Your feedback will help us improve your experience

Thumb up icon Thumb down icon
Thanks for your feedback!
Profile picture
Write a function in R that implements a two-stage least squares (2SLS) estimator. The input of the function should be the dependent variable y, the endogenous predictor x, and the instrumental variable(s) z. The output of the function only needs to include the point estimate of the coefficient on x. (a) Copy and paste your code below. (b) Load the AER package in R and show that your function produces the same results as the ivreg function (you only need to show the equivalence of the point estimates). (c) Suppose you could not observe z, but instead observed another instrument z' that is generated as follows. zprime = z + rnorm(n, sd=10) Is z' still a valid instrument? Provide evidence using your data. (d) Rerun the IV regression (with ivreg) using z' instead of z. What is the effect on your inference for β1?
Close icon
Play audio
Feedback
Powered by NumerAI
Danielle Fairburn Ivan Kochetkov
David Collins verified

Madhur L and 78 other subject Intro Stats / AP Statistics educators are ready to help you.

Ask a new question

*

Labs

-

Want to see this concept in action?

NEW

Explore this concept interactively to see how it behaves as you change inputs.

View Labs

*

Key Concepts

-
Key Concept
Premium Feature
Explore the core concept behind this problem.
Play button
Key Concept
Premium Feature
Explore the core concept behind this problem.
Your browser does not support the video tag.

*

Recommended Videos

-
the-following-estimated-regression-equation-based-on-10-observations-was-presented-y-281470-05205x1-04972-here-sst-6735125-ssr-6227375-spi-00817-and-5p2-00566_-a-compute-msr-and-mse-b-comput-47016

The following estimated regression equation based on 10 observations was presented. ŷ = 28.1470 + 0.5205x₁ + 0.497x₂ Here, SST = 6,735.125, SSR = 6,227.375, s၂₁ = 0.0817, and s၂₂ = 0.0566. (a) Compute MSR and MSE. (b) Compute F and perform the appropriate F test. Use Α = 0.05. (c) Perform a t test for the significance of Β₁. Use Α = 0.05. (d) Perform a t test for the significance of Β₂. Use Α = 0.05. (a) Compute MSR and MSE. The MSR, mean square due to regression is calculated as follows where SSR is the sum of squares due to regression and p is the number of independent variables in the estimated regression equation. MSR = SSR / p The estimated regression equation was given to be ŷ = 28.1470 + 0.5205x₁ + 0.497x₂. This equation has two independent variables, so p = 2. The value of SSR was given to be SSR = 6,227.375. Use these to find the value of MSR, rounding the result to three decimal places. MSR = SSR / p = 6,227.375 / 2

Madhur L.

least-squares-linear-regression-of-rent-predictor-variables-constant-size-coefficient-127656-016486-std-error-454-843-041717-81-0-40-0-0072-0-6945-r-adjusted-r2-aicg-press-0032-00175-65627-2-08632

Identify the least squares prediction equation (use #'s) for your best model after all your testing was completed (you do not need to show the printouts of any additional tests conducted, just the results of your best model). Use the values from the printout and write the prediction equation below. (3 points) ŷ =1276.56+0.16486*Size Interpret both s and R² associated with your best model. (4 points)

Adi S.

summary-output-regression-statistics-multiple-r-07732-r-square-05978-adjusted-r-square-05476-standard-error-30414-observations-10-anova-df-ss-ms-f-significance-f-regression-1-110-110-11892-0-77918

Summary Output Regression Statistics Multiple R: 0.7732 R Square: 0.5978 Adjusted R Square: 0.5476 Standard Error: 3.0414 Observations: 10 ANOVA df SS MS F Significance F Regression: 1 110 110 11.892 0.009 Residual: 8 74 9.25 Total: 9 184 Coefficients Standard Error t Stat P-value Intercept: 39.222 5.942 6.600 0.000 x: -0.556 0.161 -3.448 0.009 e. 59.783% of the variability in Y is explained by the variability in X. a. What has been the sample size for the above? b. Perform a t test and determine whether or not X and Y are related. Let α = 0.05. c. Perform an F test and determine whether or not X and Y are related. Let α = 0.05. d. Compute the coefficient of determination. e. Interpret the meaning of the value of the coefficient of determination that you found in d. Be very specific.

Krishna G.


*

Recommended Textbooks

-
Elementary Statistics a Step by Step Approach

Elementary Statistics a Step by Step Approach

Allan G. Bluman 9th Edition
achievement 1,973 solutions
The Practice of Statistics for AP

The Practice of Statistics for AP

Daren S. Starnes, Daniel S. Yates, David S. Moore 4th Edition
achievement 1,961 solutions
Introductory Statistics

Introductory Statistics

Barbara Illowsky, Susan Dean 1st Edition
achievement 1,975 solutions

*

Transcript

-
00:01 Hello students here the regression equation we use this pi cap is equal to 28 .1470 plus 0 .5205 x1 plus 0 .497 x2 and given sst is equal to 6735 .125 ssr is equal to 6227 .375 and sb1 is equal to standard deviation of beta 1 is equal to 0 .0817 and sb2 is equal to 0 .0566 k is equal to 3 and n is equal to 10 now part a means of square of regression is equal to msr is equal to ssr divided by degree of freedom of r that is equal to 6227 .375 divided by k minus 1 which is equal to 6227 .375 divided by 2 that is equal to 3113 .688 now in sum of square of error is equal to ssc divided by degree of freedom of error which is equal to so ssc can be calculated as ssc minus ssr divided by degree of freedom of error is n minus k that is equal to 6735 .125 minus 6227 .375 whole divided by n minus k is 10 minus 3 which is equal to 72 .536 now part b here h0 is model is insignificant and h1 model is significant then f calculated value that is f statistic is equal to msr…
Need help? Use Ace
Ace is your personal tutor. It breaks down any question with clear steps so you can learn.
Start Using Ace
Ace is your personal tutor for learning
Step-by-step explanations
Instant summaries
Summarize YouTube videos
Understand textbook images or PDFs
Study tools like quizzes and flashcards
Listen to your notes as a podcast
Continue solving this problem
Create a free account to:
  • View full step-by-step solution
  • Ask follow-up questions with Ace AI
  • Save progress and study later
Continue Free
Join the community

18,000,000+

Students on Numerade


Trusted by students at 8,000+ universities

Numerade

Get step-by-step video solution
from top educators

Continue with Clever
or



By creating an account, you agree to the Terms of Service and Privacy Policy
Already have an account? Log In

A free answer
just for you

Watch the video solution with this free unlock.

Numerade

Log in to watch this video
...and 100,000,000 more!


EMAIL

PASSWORD

OR
Continue with Clever