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
icon
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
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
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
Step 1: Given Information:

Consider the given data:

XrayBedDaysLengthHours
2463472.924.45566.52
20481339.756.92696.82
3940620.254.281033.15
6505568.333.91603.62
57231497.65.51611.37
115201365.834.61613.27
577916875.621854.17
59691639.925.152160.55
84612872.336.182305.58
201063655.086.153503.93
1331329125.883571.89
1077139214.883741.4
155433865.675.54026.52
361947684.1710343.81
3470312446.3310.7811732.81
3920414098.47.0515414.94
86533155246.3518854.45
steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Similar questions
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
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…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
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
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman