Question: 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,

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

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 explain

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!