Question: Answer questions in this part with R code (in code chunks). Consider the model Y = 2 + 0.5X + where N( 0,0.25 ) .
Answer questions in this part with R code (in code chunks). Consider the model Y = 2 + 0.5X + where N( 0,0.25 ) . Given a vector of predictor values x <- runif(50) 1a. (10 points) Simulate a vector y of corresponding response values based on the model. Compute the least squares estimates 0 and 1 . Hint: Use rnorm() function.
1b. (10 points) Find the 95% confidence intervals of 0 and 1
1c. (20 points) Under the frequentist notion of repeated sampling, run simulations to give an empirical justification of the 95% confidence interval of 1 as constructed in 1b.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
