Rating
4.8/5

# Assignment help 6583

R programming question

a) Read the data file transform_data.txt from the course website into R, and make a scatterplot of y versus x. Clearly, the relationship is nonlinear and monotonic. I can tell you that a good transformation that linearizes the relationship is to take the sqrt of both and x and y. Make a scatterplot of the transformed data.

b) Perform regression on the transformed data, and overlay the regression line on the scatterplot of the transformed data in part a). Call the model lm.1 .

c) It appears that a good model for this data is sqrt(y) = alpha + beta sqrt(x). Using algebra alone (i.e. no R) show that this model is equivalent to the following model: y = alpha +beta_1 sqrt(x) + beta_2 x .

d) Fit a regression model of the form y = alpha + beta_1 sqrt(x) + beta_2 x to the data. Call it lm.2 .

e) To check that the two models (lm.1 and lm.2) are similar, make a scatterplot of their predictions. Just keep in mind that the second model predicts y, but the first model predicts sqrt(y)

## Why US?

##### 100% Confidentiality

Information about customers is confidential and never disclosed to third parties.

##### Timely Delivery

No missed deadlines – 97% of assignments are completed in time.

##### Original Writing

We complete all papers from scratch. You can get a plagiarism report.

##### Money Back

If you are convinced that our writer has not followed your requirements, feel free to ask for a refund.