Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

question4 Question IV Read the Stata program below clear scalar alpha = sqrt (2) scalar beta = 3. 14 scalar gamma = exp (1) capture

question4

image text in transcribed
Question IV Read the Stata program below clear scalar alpha = sqrt (2) scalar beta = 3. 14 scalar gamma = exp (1) capture postclose tom postfile fileid beta_star_hat beta_hat gamma_hat delta_hat using OVB. dta, replace set seed 1 forvalues i = 1(1) 100 { qui drop _all qui set obs 100 gen z = rnormal () gen x = z + rnormal () gen u = rnormal () gen y = alpha + x*beta + z*gammatu drop u /*save xyz. dta, replace */ quietly reg y x z,r scalar beta_hat = _b[x] scalar gamma_hat = _b[z] quietly reg y x,r scalar beta_star_hat = _b[x] quietly reg z x,r scalar delta_hat = _b[x] post fileid (beta_star_hat) (beta_hat) (gamma_hat) (delta_hat) postclose fileid use OVB . dta, clear gen bias = beta_star_hat - beta_hat gen proxy_effect = gamma_hat*delta_hat sum The sum command provides the summary statistics for each variable in the data set OVB.dta. What would you expect the mean of each variable to be? Explain. Is the mean of 'bias' close to that of 'proxy_effect'? Explain

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

Linear Algebra With Applications

Authors: Jeffrey Holt

2nd Edition

1319057691, 9781319057695

More Books

Students also viewed these Mathematics questions