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.

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

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!