1. With the Braking R data, produce a scatterplot of Distance versus Speed, and overlay a plot of the regression predictions using the Third Try model (with the distance-speed ratio as the outcome...

1 answer below »

1. With the Braking R data, produce a scatterplot of Distance versus Speed, and overlay a plot of the regression predictions using the Third Try model (with the distance-speed ratio as the outcome variable). Also, plot a 95% confidence band around the estimated regression function. You may want to vary the colors and line styles to make an attractive plot. For values of speed use xseq = seq(min(Braking$Speed),max(Braking$Speed),length = 1000) as shown earlier in the supporting material.






2. Using the Braking R data. For a car moving at 30 mph give a 95% confidence interval for the mean distance it takes to stop the car once brakes are applied. State why you either do or do not trust this interval.






3. Using the sat R dataset, fit a model with the total SAT score as the response and expend, salary, ratio and takers as predictors. Perform regression diagnostics on this model to answer the following questions. Display any plots that are relevant. Do not provide any plots about which you have nothing to say. Suggest possible improvements or corrections to the model where appropriate.


(a) Check the constant variance assumption for the errors.


(b) Check the normality assumption.


(c) Check for large leverage points.


(d) Check for outliers.


(e) Check for influential points.


(f) Check the structure of the relationship between the predictors and the response.






4.For the
divusaR data, fit a model with divorce as the response and the other variables, except year as predictors. Check for serial correlation.


Answered 1 days AfterNov 30, 2021

Answer To: 1. With the Braking R data, produce a scatterplot of Distance versus Speed, and overlay a plot of...

Atreye answered on Dec 02 2021
114 Votes
Solution 1
Load the dataset
load("C:/Users/Mili/Downloads/braking-dutcqxaw.rdata")
head(Braking)
## Speed Distance
## 1 4 2
## 2 4 10
## 3 7 4
## 4 7 22
## 5 8 16
## 6 9 10
scatterplot of Distance versus Speed with a plot of the regression predictions using the Third Try model along with 95% confidence band.
library(tidyr)
library(ggplot2)
library(MASS)
Braking$DistRatio = Braking$Dista
nce/Braking$Speed
plotdata <- data.frame(x=Braking$Speed, Braking$Distance, Braking$DistRatio)
pd <- gather(plotdata, Series, value, -x)
ggplot(pd, aes(x = x, y = value, colour = Series, shape = Series)) +
geom_point() +
geom_smooth(method = rlm)
## `geom_smooth()` using formula 'y ~ x'
Solution 2
Fit a linear regression model and calculating confidence intervals
model <- lm(Distance ~ Speed, data = Braking)
new_dat <- data.frame(Speed=30)
predict(model, newdata = new_dat, interval = 'confidence')
## fit lwr upr
## 1 100.3932 87.43543 113.3509
Conclusion
From the output, it is observed that the fitted stopping distance at 30 mph speed is just above 100 feet. The confidence interval of (87.44, 113.35) implies the range in which the true population parameter belongs at a 95% level of confidence. # Solution 3
package insatllation and sat dataload
library(faraway)
sat
## expend ratio salary takers verbal math total
## Alabama 4.405 17.2 31.144 8 491 538 1029
## Alaska 8.963 17.6 47.951 47 445 489 934
## Arizona 4.778 19.3 32.175 27 448 496 944
## Arkansas 4.459 17.1 28.934 6 482 523 1005
## California 4.992 24.0 41.078 45 417 485 902
## Colorado 5.443 18.4 34.571 29 462 518 980
## Connecticut 8.817 14.4 50.045 81 431 477 908
## Delaware 7.030 16.6 39.076 68 429 468 897
## Florida 5.718 19.1 32.588 48 420 469 889
## Georgia 5.193 16.3 32.291 65 406 448 854
## Hawaii 6.078 17.9 38.518 57 407 482 889
## Idaho 4.210 19.1 29.783 15 468 511 979
## Illinois 6.136 17.3 39.431 13 488 560 1048
## Indiana 5.826 17.5 36.785 58 415 467 882
## Iowa 5.483 15.8 31.511 5 516 583 1099
## Kansas 5.817 15.1 34.652 9 503 557 1060
## Kentucky 5.217 17.0 32.257 11 477 522 999
## Louisiana 4.761 16.8 26.461 9 486 535 1021
## Maine 6.428 13.8 31.972 68 427 469 896
## Maryland 7.245 17.0 40.661 64 430 479 909
## Massachusetts 7.287 14.8 40.795 80 430 477 907
## Michigan 6.994 20.1 41.895 11 484 549 1033
## Minnesota 6.000 17.5 35.948 9 506 579 1085
## Mississippi 4.080 17.5 26.818 4 496 540 1036
## Missouri 5.383 15.5 31.189 9 495 550 1045
## Montana 5.692 16.3 28.785 21 473 536 1009
## Nebraska 5.935 14.5 30.922 9 494 556 1050
## Nevada 5.160 18.7 34.836 30 434 483 917
## New Hampshire 5.859 15.6 34.720 70 444 491 935
## New Jersey 9.774 13.8 46.087 70 420 478 898
## New Mexico 4.586 17.2 28.493 11 485 530 1015
## New York 9.623 15.2 47.612 74 419 473 892
## North Carolina 5.077 16.2 30.793 60 411 454 865
## North Dakota 4.775 15.3 26.327 5 515 592 1107
## Ohio 6.162 16.6 36.802 23 460 515 975
## Oklahoma 4.845 15.5 28.172 9 491 536 1027
## Oregon 6.436 19.9 38.555 51 448 499 947
## Pennsylvania 7.109 17.1 44.510 70 419 461 880
## Rhode Island 7.469 14.7 40.729 70 425 463 888
## South Carolina 4.797 16.4 30.279 58 401 443 844
## South Dakota 4.775 14.4 25.994 5 505 563 1068
## Tennessee 4.388 18.6 32.477 12 497 543 1040
## Texas 5.222 15.7 31.223 47 419 474 893
## Utah 3.656 24.3 29.082 4 513 563 1076
## Vermont 6.750 13.8 35.406 68 429 472 901
## Virginia 5.327 14.6 33.987 65 428 468 896
## Washington 5.906 20.2 36.151 48 443 494 937
## West Virginia 6.107 14.8 31.944 17 448 484 932
## Wisconsin 6.930 15.9 37.746 9 501 572 1073
## Wyoming 6.160 14.9 31.285 10 476 525 1001
Multiple Regression model fit
model <-...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here