Question: 6) For each part, write R code that generates a model. Include a scatterplot showing the results of your model. You'll need to generate random

6) For each part, write R code that generates a model. Include a scatterplot showing the results of your model. You'll need to generate random data. Before you do so, use the set.seed() function. The input is any integer. You'll need to call this function before each random number generation. For example: > set.seed (123) > rnorm (10,0,3) For each part, generate 100 observations. a) Generate data that perfectly follow a perfect linear trend. Compute the correlation coefficient, r. b) Generate data that follow a weak linear trend. Calculate the correlation coefficient, r. c) Generate data that follow a moderate or strong linear trend. Calculate the correlation coefficient, r
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
