Emails us- Call US

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.

dat <- read.table(“http:// header=T) <<<< this is the course website

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)


15% off for this assignment.

Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!

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.