What would I need to type in in R programming to get similar results to the one
MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
Related questions
Question
What would I need to type in in R programming to get similar results to the one listed in the example results
![Hours (y) = monthly labor hours required
Xray(x₁) = monthly X-ray exposures
BedDays (x₂) = monthly occupied bed days
Length(13) = average lengh of patients' stay (in days)
The main objective of the regression analysis is to help the navy evaluate the performance of
its hospitals in terms of how many labor hours are used relative to how many labor hours are
needed. The navy selected hospitals 1 through 17 from hospitals that it thought were efficiently
run hospitals to evaluate the efficiency of questionable hospitals. Consider relating y to x₁, I2,
and 23 by using the model.
y = Bo + B₁1+ B₂x2 + 3x3 + €
Print and submit R code and output of your regression analysis. Results should look similar
to figure 1.
Coefficients:
Estimate Std. Error t value Pr (>|t|)
(Intercept) 1523.38924 786.89772
0.0749.
1.936
2.637 0.0205 *
9.305 4.12e-07 ***
-320.95083 153.19222 -2.095 0.0563.
0.05299
0.97848
0.02009
0.10515
xray
BedDays
Length
signif. codes: 0 ***** 0.001 **** 0.01 **' 0.05.¹0.1¹ 1
Residual standard error: 614.8 on 13 degrees of freedom
Multiple R-squared: 0.9901,
Adjusted R-squared: 0.9878
F-statistic: 432 on 3 and 13 DF, p-value: 2.894e-13](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe168234c-8641-43ba-b22b-28f74f97e6ae%2F5addb8d4-95d6-4299-89a5-01abd7ff7488%2Fmafaa88_processed.png&w=3840&q=75)
Transcribed Image Text:Hours (y) = monthly labor hours required
Xray(x₁) = monthly X-ray exposures
BedDays (x₂) = monthly occupied bed days
Length(13) = average lengh of patients' stay (in days)
The main objective of the regression analysis is to help the navy evaluate the performance of
its hospitals in terms of how many labor hours are used relative to how many labor hours are
needed. The navy selected hospitals 1 through 17 from hospitals that it thought were efficiently
run hospitals to evaluate the efficiency of questionable hospitals. Consider relating y to x₁, I2,
and 23 by using the model.
y = Bo + B₁1+ B₂x2 + 3x3 + €
Print and submit R code and output of your regression analysis. Results should look similar
to figure 1.
Coefficients:
Estimate Std. Error t value Pr (>|t|)
(Intercept) 1523.38924 786.89772
0.0749.
1.936
2.637 0.0205 *
9.305 4.12e-07 ***
-320.95083 153.19222 -2.095 0.0563.
0.05299
0.97848
0.02009
0.10515
xray
BedDays
Length
signif. codes: 0 ***** 0.001 **** 0.01 **' 0.05.¹0.1¹ 1
Residual standard error: 614.8 on 13 degrees of freedom
Multiple R-squared: 0.9901,
Adjusted R-squared: 0.9878
F-statistic: 432 on 3 and 13 DF, p-value: 2.894e-13
![1
2
WN
3
4
5
6
7
∞
8
9
10
11
12
13
14
15
16
17
18
19
A
B
Xray BedDays
472.92
2463
2048
1339.75
3940
620.25
6505 568.33
1497.60
1365.83
5723
11520
5779
1687.00
5969
1639.92
8461
2872.33
20106
3655.08
13313
2912.00
10771
3921.00
15543
3865.67
36194
7684.10
34703
12446.33
39204 14098.40
86533 15524.00
D
Length
Hours
4.45
566.52
6.92
696.82
4.28
1033.15
3.90
1603.62
5.50 1611.37
4.60
1613.27
5.62 1854.17
2160.55
2305.58
3503.93
5.15
6.18
6.15
5.88
4.88
5.50
7.00 10343.81
10.78
11732.17
3571.89
3741.40
4026.52
7.05 15414.94
6.35 18854.45](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe168234c-8641-43ba-b22b-28f74f97e6ae%2F5addb8d4-95d6-4299-89a5-01abd7ff7488%2Fu8csi_processed.png&w=3840&q=75)
Transcribed Image Text:1
2
WN
3
4
5
6
7
∞
8
9
10
11
12
13
14
15
16
17
18
19
A
B
Xray BedDays
472.92
2463
2048
1339.75
3940
620.25
6505 568.33
1497.60
1365.83
5723
11520
5779
1687.00
5969
1639.92
8461
2872.33
20106
3655.08
13313
2912.00
10771
3921.00
15543
3865.67
36194
7684.10
34703
12446.33
39204 14098.40
86533 15524.00
D
Length
Hours
4.45
566.52
6.92
696.82
4.28
1033.15
3.90
1603.62
5.50 1611.37
4.60
1613.27
5.62 1854.17
2160.55
2305.58
3503.93
5.15
6.18
6.15
5.88
4.88
5.50
7.00 10343.81
10.78
11732.17
3571.89
3741.40
4026.52
7.05 15414.94
6.35 18854.45
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
Step 1: Given Information:
Consider the given data:
Xray | BedDays | Length | Hours |
2463 | 472.92 | 4.45 | 566.52 |
2048 | 1339.75 | 6.92 | 696.82 |
3940 | 620.25 | 4.28 | 1033.15 |
6505 | 568.33 | 3.9 | 1603.62 |
5723 | 1497.6 | 5.5 | 1611.37 |
11520 | 1365.83 | 4.6 | 1613.27 |
5779 | 1687 | 5.62 | 1854.17 |
5969 | 1639.92 | 5.15 | 2160.55 |
8461 | 2872.33 | 6.18 | 2305.58 |
20106 | 3655.08 | 6.15 | 3503.93 |
13313 | 2912 | 5.88 | 3571.89 |
10771 | 3921 | 4.88 | 3741.4 |
15543 | 3865.67 | 5.5 | 4026.52 |
36194 | 7684.1 | 7 | 10343.81 |
34703 | 12446.33 | 10.78 | 11732.81 |
39204 | 14098.4 | 7.05 | 15414.94 |
86533 | 15524 | 6.35 | 18854.45 |
Step by step
Solved in 3 steps with 6 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![MATLAB: An Introduction with Applications](https://www.bartleby.com/isbn_cover_images/9781119256830/9781119256830_smallCoverImage.gif)
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
![Probability and Statistics for Engineering and th…](https://www.bartleby.com/isbn_cover_images/9781305251809/9781305251809_smallCoverImage.gif)
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
![Statistics for The Behavioral Sciences (MindTap C…](https://www.bartleby.com/isbn_cover_images/9781305504912/9781305504912_smallCoverImage.gif)
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
![MATLAB: An Introduction with Applications](https://www.bartleby.com/isbn_cover_images/9781119256830/9781119256830_smallCoverImage.gif)
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
![Probability and Statistics for Engineering and th…](https://www.bartleby.com/isbn_cover_images/9781305251809/9781305251809_smallCoverImage.gif)
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
![Statistics for The Behavioral Sciences (MindTap C…](https://www.bartleby.com/isbn_cover_images/9781305504912/9781305504912_smallCoverImage.gif)
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
![Elementary Statistics: Picturing the World (7th E…](https://www.bartleby.com/isbn_cover_images/9780134683416/9780134683416_smallCoverImage.gif)
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
![The Basic Practice of Statistics](https://www.bartleby.com/isbn_cover_images/9781319042578/9781319042578_smallCoverImage.gif)
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
![Introduction to the Practice of Statistics](https://www.bartleby.com/isbn_cover_images/9781319013387/9781319013387_smallCoverImage.gif)
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman