Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using R, Exercise 4 (Be a Skeptic) Consider the model with W where Bo-10 and B1-0 Before answering the following parts, set a seed value
Using R,
Exercise 4 (Be a Skeptic) Consider the model with W where Bo-10 and B1-0 Before answering the following parts, set a seed value equal to your birthday, as was done in the previous assignment birthday 18760613 set.seed (birthday) (a) Use R to repeat the process of simulating n-25 observations from the above model 1500 times. For the remainder of this exercise, use the following "known" values of r x runif (n - 25, 0, 10) Each time fit a SL.R model to the data and store the value of in a variable called beta_hat_1. You may use the sim_slr function provided in the text. Hint: Yes 0 (b) Plot a histogram of beta_hat_1. Comment on the shape of this histogram. (c) Import the data in skeptic.csv and fit a SLR model. The variable names in skeptic.csv follow the same convention as those returned by sim_slrO. Extract the fitted coefficient for Bi (d) Re-plot the histogram from (b). Now add a vertical red line at the value of B in part (c). To do so, you'll need to use abline(v c, col "red") where c is your value. (e) Your value of in (c) should be positive. What proportion of the beta-hat-1 values are larger than your A? Return this proportion, as well as this proportion multiplied by 2. (f Based on your histogram and part (e), do you think the skeptic.csv data could have been generated by the model given above? Briefly explain Exercise 4 (Be a Skeptic) Consider the model with W where Bo-10 and B1-0 Before answering the following parts, set a seed value equal to your birthday, as was done in the previous assignment birthday 18760613 set.seed (birthday) (a) Use R to repeat the process of simulating n-25 observations from the above model 1500 times. For the remainder of this exercise, use the following "known" values of r x runif (n - 25, 0, 10) Each time fit a SL.R model to the data and store the value of in a variable called beta_hat_1. You may use the sim_slr function provided in the text. Hint: Yes 0 (b) Plot a histogram of beta_hat_1. Comment on the shape of this histogram. (c) Import the data in skeptic.csv and fit a SLR model. The variable names in skeptic.csv follow the same convention as those returned by sim_slrO. Extract the fitted coefficient for Bi (d) Re-plot the histogram from (b). Now add a vertical red line at the value of B in part (c). To do so, you'll need to use abline(v c, col "red") where c is your value. (e) Your value of in (c) should be positive. What proportion of the beta-hat-1 values are larger than your A? Return this proportion, as well as this proportion multiplied by 2. (f Based on your histogram and part (e), do you think the skeptic.csv data could have been generated by the model given above? Briefly explainStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started