Questions
251ECON-184B-1 Coding test
Essay
Consider the following potential outcome framework. \(Y_i (1)\): the log wage of person \(i\) if person \(i\) attends a job training program \(Y_i (0)\): the log wage of person \(i\) if person \(i\) does not a job training program Suppose that \(Y_i (1)=Y_i (0)-0.5\) for each person \(i\). Set \(n=203\). Implement the following steps:Generate \(Y_i (0)=10+u_i\) for \(i=1,…,n\), where \(u_i\) is i.i.d. from \(N(0, 5)\). Generate \(Y_i (1)=Y_i (0)-0.5\) for \(i=1,…,n\) Generate \(X_i \)from the Bernoulli distribution with mean 0.73 Compute \(Y_i=Y_i (1) \cdot X_i+Y_i (0) \cdot (1-X_i)\). Run OLS regression: \(Y_i=\beta_0+\beta_1 X_i+u_i\) Construct a 90% confidence interval for \( \beta_1 \). Record whether or not the confidence interval captures the treatment effect -0.5. Repeat the above steps 300 times. Use set.seed(904). What is the probability that the 90% confidence interval captures the treatment effect -0.5? (25 points)
View Explanation
Verified Answer
Please login to view
Step-by-Step Analysis
This is a Monte Carlo exercise about generating data under a fixed data-generating process and then evaluating how often a 90% CI for the OLS coefficient contains the true treatment effect.
Step 1: Understand the data-generating process
- We have Y_i(0) = 10 + u_i with u_i ~ N(0, 5). Therefore Y_i(0) is Normal with mean 10 and variance 5.
- The potential treated outcome is defined as Y_i(1) = Y_i(0) - 0.5, so the treatment reduces the log wage by 0.5 on the treated potential outcome scale.
- The observed outcome is Y_i = Y_i(1) * X_i + Y_i(0) * (1 - X_i). Since X_i ~ Bernoulli(0.73), this simplifies to Y_i = Y_i(0) - 0.5 * X_i. Intuitively, when treated (X_i = 1), you observe Y_i = Y_i(0) - 0.5; when not treated (X_i = 0), you observe Y_i = Y_i(0).
- The covariate X_i is independent of u_i and drawn from Bernoulli wi......Login to view full explanationLog in for full answers
We've collected over 50,000 authentic exam questions and detailed explanations from around the globe. Log in now and get instant access to the answers!
Similar Questions
In a consumer society, many adults channel creativity into buying things
Economic stress and unpredictable times have resulted in a booming industry for self-help products
People born without creativity never can develop it
A product has a selling price of $20, a contribution margin ratio of 40% and fixed cost of $120,000. To make a profit of $30,000. The number of units that must be sold is: Type the number without $ and a comma. Eg: 20000
More Practical Tools for Students Powered by AI Study Helper
Making Your Study Simpler
Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!