Question

R programming:

Recode the variable ET using V-Shape instead of O and Straight instead of). save it as ETnew. Create a barplot for the new ET variable and test the claim that the

Problem Four: a) b) Create a scatter plot for the ETnew vs MPG then plot the least square regression line on c) Report the summary of your linear model, interpret the slope and the y-intercept in the d) Compare the summary of your SLR in part c with the results of the t-test in Question Conduct simple linear regression using MPG as outcome variable and ETnew as a predictor. the same graph model. Two Part b. State your concludes?

MPG   GPM   WT   DIS   NC   HP   ACC   ET
16.9   5.917   4.360   350   8   155   14.9   1
15.5   6.452   4.054   351   8   142   14.3   1
19.2   5.208   3.605   267   8   125   15.0   1
18.5   5.405   3.940   360   8   150   13.0   1
30.0   3.333   2.155   98   4   68   16.5   0
27.5   3.636   2.560   134   4   95   14.2   0
27.2   3.676   2.300   119   4   97   14.7   0
30.9   3.236   2.230   105   4   75   14.5   0
20.3   4.926   2.830   131   5   103   15.9   0
17.0   5.882   3.140   163   6   125   13.6   0
21.6   4.630   2.795   121   4   115   15.7   0
16.2   6.173   3.410   163   6   133   15.8   0
20.6   4.854   3.380   231   6   105   15.8   0
20.8   4.808   3.070   200   6   85   16.7   0
18.6   5.376   3.620   225   6   110   18.7   0
18.1   5.525   3.410   258   6   120   15.1   0
17.0   5.882   3.840   305   8   130   15.4   1
17.6   5.682   3.725   302   8   129   13.4   1
16.5   6.061   3.955   351   8   138   13.2   1
18.2   5.495   3.830   318   8   135   15.2   1
26.5   3.774   2.585   140   4   88   14.4   0
21.9   4.566   2.910   171   6   109   16.6   1
34.1   2.933   1.975   86   4   65   15.2   0
35.1   2.849   1.915   98   4   80   14.4   0
27.4   3.650   2.670   121   4   80   15.0   0
31.5   3.175   1.990   89   4   71   14.9   0
29.5   3.390   2.135   98   4   68   16.6   0
28.4   3.521   2.670   151   4   90   16.0   0
28.8   3.472   2.595   173   6   115   11.3   1
26.8   3.731   2.700   173   6   115   12.9   1
33.5   2.985   2.556   151   4   90   13.2   0
34.2   2.924   2.200   105   4   70   13.2   0
31.8   3.145   2.020   85   4   65   19.2   0
37.3   2.681   2.130   91   4   69   14.7   0
30.5   3.279   2.190   97   4   78   14.1   0
22.0   4.545   2.815   146   6   97   14.5   0
21.5   4.651   2.600   121   4   110   12.8   0
31.9   3.135   1.925   89   4   71   14.0   0

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Importing the dataset rawdata < read.csv (rawdata.csv, stringsAsFactorsF, headerT) ET recoding rawdataSET_new <- ifelse (rawdatasET -1,straight, v-Shaped) colnames (rawdata) ## ## [1] [9] MEG . . ET-new GPM. . WT . . DIS . . NC . . HP.. Acc.. ET. str (rawdataSET_new) chr [1:38 Straight straight Straight Straight v-Shaped Regression model1 <-1m(MPG..~ET summary (model_1) new, data = rawdata) -Regression model_1 -lm (MPG. . ~ET new, datarawdata) summary (model 1) ## Call: ## 1m ( formula = MPG .. ~ ET new, data= rawdMPG vs ET new CD ### Summary of the regression 0.0 0.2 0.4 0.6 0.8 1.0 ET_new Regression equation MPG = 26.815 + 7.097(ET new-V-shaped) Intercept = when ET-new-straight, MPG-26815 beta coefficient when ET_new- Vshaped the MPG increase by 7.097 as compared to when ET_new straight.

Add a comment
Know the answer?
Add Answer to:
R programming: MPG   GPM   WT   DIS   NC   HP   ACC   ET 16.9   5.917   4.360   350   8   155  ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • R programming: MPG   GPM   WT   DIS   NC   HP   ACC   ET 16.9   5.917   4.360   350   8   155  ...

    R programming: MPG   GPM   WT   DIS   NC   HP   ACC   ET 16.9   5.917   4.360   350   8   155   14.9   1 15.5   6.452   4.054   351   8   142   14.3   1 19.2   5.208   3.605   267   8   125   15.0   1 18.5   5.405   3.940   360   8   150   13.0   1 30.0   3.333   2.155   98   4   68   16.5   0 27.5   3.636   2.560   134   4   95   14.2   0 27.2   3.676   2.300   119   4   97   14.7   0 30.9   3.236   2.230   105   4   75   14.5   0 20.3   4.926   2.830   131   5   103  ...

  • R programming: MPG   GPM   WT   DIS   NC   HP   ACC   ET 16.9   5.917   4.360   350   8   155  ...

    R programming: MPG   GPM   WT   DIS   NC   HP   ACC   ET 16.9   5.917   4.360   350   8   155   14.9   1 15.5   6.452   4.054   351   8   142   14.3   1 19.2   5.208   3.605   267   8   125   15.0   1 18.5   5.405   3.940   360   8   150   13.0   1 30.0   3.333   2.155   98   4   68   16.5   0 27.5   3.636   2.560   134   4   95   14.2   0 27.2   3.676   2.300   119   4   97   14.7   0 30.9   3.236   2.230   105   4   75   14.5   0 20.3   4.926   2.830   131   5   103  ...

  • R programming: MPG   GPM   WT   DIS   NC   HP   ACC   ET 16.9   5.917   4.360   350   8   155  ...

    R programming: MPG   GPM   WT   DIS   NC   HP   ACC   ET 16.9   5.917   4.360   350   8   155   14.9   1 15.5   6.452   4.054   351   8   142   14.3   1 19.2   5.208   3.605   267   8   125   15.0   1 18.5   5.405   3.940   360   8   150   13.0   1 30.0   3.333   2.155   98   4   68   16.5   0 27.5   3.636   2.560   134   4   95   14.2   0 27.2   3.676   2.300   119   4   97   14.7   0 30.9   3.236   2.230   105   4   75   14.5   0 20.3   4.926   2.830   131   5   103  ...

  • The data file Motor Trend is a random sample of 32 automobiles.   The miles per gallon ...

    The data file Motor Trend is a random sample of 32 automobiles.   The miles per gallon (mpg), weight (wt), horsepower (hp) and type of transmission (manual or automatic) is recorded for each sampled automobile. The file is available on Blackboard. Transmission is a categorical variable. Code the variable transmission so that it can be used in a regression model. Your coding should assign a 1 to manual transmission and a 0 to automatic. Develop a regression model with mpg as...

  • PLEASE USE THE BELOW GIVEN DATA TO SOLVE THIS PROBLEM. INCLUDING THE BRIEF REPORT. THANK YOU....

    PLEASE USE THE BELOW GIVEN DATA TO SOLVE THIS PROBLEM. INCLUDING THE BRIEF REPORT. THANK YOU. Sales (Y) Calls (X1) Time (X2) Years (X3) Type 47 167 12.9 5 ONLINE 47 167 16.1 5 ONLINE 44 165 14.2 5 GROUP 43 137 16.6 4 NONE 34 184 12.5 4 GROUP 36 173 14.3 4 GROUP 44 160 14.1 4 NONE 34 132 18.2 4 NONE 48 182 14.1 4 ONLINE 41 158 13.8 4 GROUP 38 163 10.8 4 GROUP...

  • We are interested in the relationship between the compensation of Chief Executive Officers (CEO) ...

    We are interested in the relationship between the compensation of Chief Executive Officers (CEO) of firms and the return on equity of their respective firm, using the dataset below. The variable salary shows the annual salary of a CEO in thousands of dollars, so that y = 150 indicates a salary of $150,000. Similarly, the variable ROE represents the average return on equity (ROE)for the CEO’s firm for the previous three years. A ROE of 20 indicates an average return...

  • find v belt drive design power select belt type determine shive size (belt speed 4000 ft/min)...

    find v belt drive design power select belt type determine shive size (belt speed 4000 ft/min) find shive size from power rating figure find rated power find estimated centre distance find belt length (by selecting standard belt length) calculate actual centre distance find contact angle for small shieve determine correct factors calculate correct power per belt no. of belt needed V-Belt Designing Sample Problem . Given: A 4 cylinder diesel engine runs at 80 hp, 1800 rpm, to drive a...

  • Problem #1: TO SELECT THE MOST ECONOMICAL Wio SHAPE COLUMN ZO FEET IN HEIGHT SUPPORT AH...

    Problem #1: TO SELECT THE MOST ECONOMICAL Wio SHAPE COLUMN ZO FEET IN HEIGHT SUPPORT AH AXIAL LORD OF 370 KIPS using soksi STEEL! ASSUME A FIXED BASE ANDA PINGED TOP (CASE C) WIDE FLANGE SHAPES HP Axis Y-Y Theoretical Dimensions and Properties for Designing Flange Axis X-X | Weight Area Depth Web Section per of of Thick- Thick- Number Foot Section Section Width S 'T Sy Ty ness ness < * A by tw in. in. in.' in. in....

  • If the two signal handling functions in 3000pc were replaced by one function, would there be...

    If the two signal handling functions in 3000pc were replaced by one function, would there be any significant loss of functionality? Briefly explain /* 3000pc.c */ 2 3 4 5 6 7 8 #include <stdio.h> 9 #include <stdlib.h> 10 #include <unistd.h> 11 #include <sys/mman.h> 12 #include <errno.h> 13 #include <string.h> 14 #include <sys/types.h> 15 #include <sys/wait.h> 16 #include <semaphore.h> 17 #include <string.h> 18 #include <time.h> 19 20 #define QUEUESIZE 32 21 #define WORDSIZE 16 22 23 const int wordlist_size =...

  • CASE 1-5 Financial Statement Ratio Computation Refer to Campbell Soup Company's financial Campbell Soup statements in...

    CASE 1-5 Financial Statement Ratio Computation Refer to Campbell Soup Company's financial Campbell Soup statements in Appendix A. Required: Compute the following ratios for Year 11. Liquidity ratios: Asset utilization ratios:* a. Current ratio n. Cash turnover b. Acid-test ratio 0. Accounts receivable turnover c. Days to sell inventory p. Inventory turnover d. Collection period 4. Working capital turnover Capital structure and solvency ratios: 1. Fixed assets turnover e. Total debt to total equity s. Total assets turnover f. Long-term...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT