Figure 6.19 used the function errorsINx(), with the argument gpdiff=1.5, to simulate data in which the regression relationship y = XXXXXXXXXX5x is the same in each of two groups (called ctl and trt)....


Figure 6.19 used the function errorsINx(), with the argument gpdiff=1.5, to simulate data in which the regression relationship y = 15 + 1.5x is the same in each of two groups (called ctl and trt). The left panel identifies the two fitted lines when the explanatory variable is measured without error. These are, to within statistical error, identical. The right panel shows the fitted regression lines when random error of the same order of magnitude as the within-groups variation in x is added to x, giving the column of values zWITHerr.


(a) Run the function for several different values of gpdiff in the interval (0, 1.5), and plot the estimate of the treatment effect against gpdiff.


(b) Run the function for several different values of timesSDz in the interval (0, 1.5), and plot the estimate of the treatment effect against gpdiff.


(c) Run the function with beta = c(-1.5,0). How does the estimate of the treatment effect change, as compared with b = c(1.5,0)? Explain the change.



Dec 07, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here