Closed iHrushikesh closed 6 years ago
The former actually really isn't part of the model. It is part of the creation of the predictor variable. By multiplying by 5 there, the predictor takes values between 0 and 5 instead of 0 and 1. (I can see how this is confusing since 5 is used for both this and the model.)
The model is Y = 3 + 5x + eps, but in the sim function the x was multiplied by 5 twice, once in rnorm and second time while calculating Y. I removed the former one to correct.