file.exists("/Users/giangnguyen/Desktop/GiangNT/2025/Course_R/Datasets/Pre-Post study one group.csv")
## [1] TRUE
file.exists("/Users/giangnguyen/Desktop/GiangNT/2025/Course_R/Datasets/Pre-Post test dataset.csv")
## [1] TRUE
df = read.csv("/Users/giangnguyen/Desktop/GiangNT/2025/Course_R/Datasets/Pre-Post study one group.csv")
str(df)
## 'data.frame': 25 obs. of 3 variables:
## $ EmpID : int 26 27 28 29 30 31 32 33 34 35 ...
## $ Before: int 43 58 52 47 43 50 66 48 49 49 ...
## $ After : int 66 74 62 84 78 73 60 61 71 83 ...
dim(df)
## [1] 25 3
head(df)
## EmpID Before After
## 1 26 43 66
## 2 27 58 74
## 3 28 52 62
## 4 29 47 84
## 5 30 43 78
## 6 31 50 73
ttest(Before, After, paired = TRUE, data = df)
##
##
## ------ Describe ------
##
## Difference: n.miss = 0, n = 25, mean = 19.640, sd = 11.597
##
##
## ------ Normality Assumption ------
##
## Null hypothesis is a normal distribution of Difference.
## Shapiro-Wilk normality test: W = 0.9687, p-value = 0.613
##
##
## ------ Infer ------
##
## t-cutoff for 95% range of variation: tcut = 2.064
## Standard Error of Mean: SE = 2.319
##
## Hypothesized Value H0: mu = 0
## Hypothesis Test of Mean: t-value = 8.468, df = 24, p-value = 0.000
##
## Margin of Error for 95% Confidence Level: 4.787
## 95% Confidence Interval for Mean: 14.853 to 24.427
##
##
## ------ Effect Size ------
##
## Distance of sample mean from hypothesized: 19.640
## Standardized Distance, Cohen's d: 1.694
##
##
## ------ Graphics Smoothing Parameter ------
##
## Density bandwidth for 6.941
### Kiểm định paired t-test được thực hiện để so sánh nồng độ hormone trước (Before) và sau (After) can thiệp. Kết quả như sau:
#a. Thống kê mô tả
#Số quan sát: 25 (n = 25).
#Hiệu số trung bình (Difference = After - Before): 19.640.
#Độ lệch chuẩn của hiệu số (sd): 11.597.
#b. Kiểm tra giả định phân phối chuẩn (Normality Assumption)
#Kiểm định Shapiro-Wilk được sử dụng để kiểm tra xem hiệu số (After - Before) có tuân theo phân phối chuẩn hay không.
#Kết quả: W = 0.9687, p-value = 0.613.
#Diễn giải: Vì p-value = 0.613 > 0.05, không có đủ bằng chứng để bác bỏ giả thuyết rằng hiệu số tuân theo phân phối chuẩn. Giả định phân phối chuẩn được thỏa mãn, do đó paired t-test là phù hợp.
#c. Kết quả kiểm định t-test
#Giả thuyết:
#H0: Hiệu số trung bình = 0 (can thiệp không có hiệu quả).
#H1: Hiệu số trung bình ≠ 0 (can thiệp có hiệu quả).
#Thống kê kiểm định: t = 8.468, df = 24, p-value = 0.000.
#Diễn giải: p-value = 0.000 < 0.05, bác bỏ H0. Điều này cho thấy có sự khác biệt có ý nghĩa thống kê giữa nồng độ hormone trước và sau can thiệp. Cụ thể, nồng độ hormone tăng trung bình 19.640 sau can thiệp.
#d. Khoảng tin cậy và sai số
#Sai số chuẩn (SE): 2.319.
#Sai số cho khoảng tin cậy 95% (Margin of Error): 4.787.
#Khoảng tin cậy 95% cho hiệu số trung bình: [14.853, 24.427].
#Diễn giải: Với độ tin cậy 95%, hiệu số trung bình thực sự của nồng độ hormone trước và sau can thiệp nằm trong khoảng 14.853 đến 24.427. Khoảng này không chứa 0, củng cố kết luận rằng can thiệp có hiệu quả.
#e. Kích thước hiệu ứng (Effect Size)
#Khoảng cách trung bình so với giả thuyết H0 (Distance from Hypothesized): 19.640.
#Hệ số Cohen’s d: 1.694.
#Diễn giải: Cohen’s d = 1.694 cho thấy kích thước hiệu ứng rất lớn (theo chuẩn Cohen: d > 0.8 là hiệu ứng lớn). Điều này có nghĩa là can thiệp có tác động rất mạnh đến sự thay đổi nồng độ hormone.
#4. Biểu đồ trực quan
#a. Biểu đồ phân phối (One-Group Plot with Mean and Null Mean)
#Biểu đồ này minh họa phân phối của hiệu số (After - Before).
#Trung bình hiệu số (19.640) được đánh dấu, cùng với khoảng tin cậy 95% (14.853 đến 24.427).
#Giả thuyết H0 (trung bình hiệu số = 0) nằm ngoài phân phối, phù hợp với kết quả p-value nhỏ, cho thấy sự khác biệt rõ rệt.
#b. Biểu đồ so sánh Before và After
#Biểu đồ này hiển thị từng cặp giá trị Before (màu xanh) và After (màu nâu) cho mỗi người tham gia.
#Hầu hết các giá trị After đều cao hơn Before, minh họa trực quan rằng nồng độ hormone tăng sau can thiệp.
#5. Kết luận
#Hiệu quả của can thiệp: Can thiệp có hiệu quả rõ rệt trong việc tăng nồng độ hormone, với mức tăng trung bình là 19.640 (p-value < 0.001).
#Kích thước hiệu ứng: Hiệu ứng rất lớn (Cohen’s d = 1.694), cho thấy can thiệp có tác động mạnh mẽ.
#Độ tin cậy: Khoảng tin cậy 95% (14.853 đến 24.427) không chứa 0, củng cố kết luận về hiệu quả của can thiệp.
#Tính phù hợp của kiểm định: Giả định phân phối chuẩn được thỏa mãn, do đó kết quả paired t-test là đáng tin cậy.
#Tính hiệu quả của can thiệp:
#Kết quả kiểm định paired t-test cho thấy can thiệp có hiệu quả rõ rệt trong việc tăng nồng độ hormone, với mức tăng trung bình là 19.640 (p-value < 0.001). Điều này chứng minh can thiệp mang lại sự thay đổi có ý nghĩa thống kê, phù hợp với mục tiêu của nghiên cứu.
#Độ lớn của hiệu quả:
#Hệ số Cohen’s d = 1.694 cho thấy kích thước hiệu ứng rất lớn (theo chuẩn Cohen, d > 0.8 là lớn). Điều này không chỉ khẳng định hiệu quả của can thiệp mà còn cho thấy tác động của nó rất mạnh mẽ và có ý nghĩa thực tiễn, đặc biệt trong bối cảnh cần cải thiện nồng độ hormone đáng kể.
#Độ tin cậy của kết quả:
#Khoảng tin cậy 95% cho hiệu số trung bình là [14.853, 24.427], không chứa giá trị 0, củng cố kết luận về hiệu quả của can thiệp. Sai số chuẩn (SE = 2.319) và sai số cho khoảng tin cậy (4.787) ở mức hợp lý, cho thấy kết quả có độ chính xác cao.
#Tính phù hợp của phương pháp phân tích:
#Giả định phân phối chuẩn được thỏa mãn (p-value Shapiro-Wilk = 0.613 > 0.05), do đó việc sử dụng paired t-test là phù hợp và kết quả kiểm định đáng tin cậy. Điều này đảm bảo tính khoa học trong phân tích dữ liệu.
#Trực quan hóa dữ liệu:
#Biểu đồ phân phối hiệu số và biểu đồ so sánh Before vs. After minh họa rõ ràng sự thay đổi tích cực sau can thiệp. Hầu hết giá trị After đều cao hơn Before, và trung bình hiệu số (19.640) nằm xa giá trị H0 (0), phù hợp với kết quả thống kê.
#Hạn chế tiềm tàng:
#Mẫu nghiên cứu chỉ có 25 người, tuy đủ để phát hiện hiệu quả với kích thước hiệu ứng lớn, nhưng có thể không đại diện cho quần thể lớn hơn.
#Thiếu thông tin về các yếu tố nhiễu tiềm tàng (ví dụ: độ tuổi, giới tính, tình trạng sức khỏe của người tham gia) có thể ảnh hưởng đến kết quả.
#Nghiên cứu không so sánh với nhóm chứng (control group), nên khó đánh giá liệu sự thay đổi có hoàn toàn do can thiệp hay do các yếu tố khác.
df2 = read.csv("/Users/giangnguyen/Desktop/GiangNT/2025/Course_R/Datasets/Pre-Post test dataset.csv")
str(df2)
## 'data.frame': 50 obs. of 4 variables:
## $ EmpID : int 26 27 28 29 30 31 32 33 34 35 ...
## $ Treatment: chr "New" "New" "New" "New" ...
## $ Before : int 41 56 50 45 41 48 64 46 47 47 ...
## $ After : int 66 74 62 84 78 73 60 61 71 83 ...
dim(df2)
## [1] 50 4
head(df2)
## EmpID Treatment Before After
## 1 26 New 41 66
## 2 27 New 56 74
## 3 28 New 50 62
## 4 29 New 45 84
## 5 30 New 41 78
## 6 31 New 48 73
df2$Diff = df2$After - df2$Before
ttest(Diff ~ Treatment, data = df2)
##
## Compare Diff across Treatment with levels New and Old
## Grouping Variable: Treatment
## Response Variable: Diff
##
##
## ------ Describe ------
##
## Diff for Treatment New: n.miss = 0, n = 25, mean = 22.040, sd = 11.238
## Diff for Treatment Old: n.miss = 0, n = 25, mean = 13.280, sd = 12.785
##
## Mean Difference of Diff: 8.760
##
## Weighted Average Standard Deviation: 12.036
##
##
## ------ Assumptions ------
##
## Note: These hypothesis tests can perform poorly, and the
## t-test is typically robust to violations of assumptions.
## Use as heuristic guides instead of interpreting literally.
##
## Null hypothesis, for each group, is a normal distribution of Diff.
## Group New Shapiro-Wilk normality test: W = 0.964, p-value = 0.502
## Group Old Shapiro-Wilk normality test: W = 0.954, p-value = 0.309
##
## Null hypothesis is equal variances of Diff, homogeneous.
## Variance Ratio test: F = 163.460/126.290 = 1.294, df = 24;24, p-value = 0.532
## Levene's test, Brown-Forsythe: t = -0.983, df = 48, p-value = 0.331
##
##
## ------ Infer ------
##
## --- Assume equal population variances of Diff for each Treatment
##
## t-cutoff for 95% range of variation: tcut = 2.011
## Standard Error of Mean Difference: SE = 3.404
##
## Hypothesis Test of 0 Mean Diff: t-value = 2.573, df = 48, p-value = 0.013
##
## Margin of Error for 95% Confidence Level: 6.845
## 95% Confidence Interval for Mean Difference: 1.915 to 15.605
##
##
## --- Do not assume equal population variances of Diff for each Treatment
##
## t-cutoff: tcut = 2.011
## Standard Error of Mean Difference: SE = 3.404
##
## Hypothesis Test of 0 Mean Diff: t = 2.573, df = 47.223, p-value = 0.013
##
## Margin of Error for 95% Confidence Level: 6.848
## 95% Confidence Interval for Mean Difference: 1.912 to 15.608
##
##
## ------ Effect Size ------
##
## --- Assume equal population variances of Diff for each Treatment
##
## Standardized Mean Difference of Diff, Cohen's d: 0.728
##
##
## ------ Practical Importance ------
##
## Minimum Mean Difference of practical importance: mmd
## Minimum Standardized Mean Difference of practical importance: msmd
## Neither value specified, so no analysis
##
##
## ------ Graphics Smoothing Parameter ------
##
## Density bandwidth for Treatment New: 6.726
## Density bandwidth for Treatment Old: 7.655
reg(After ~ Before + Treatment + Before*Treatment, data = df2)
##
## >>> Treatment is not numeric. Converted to indicator variables.
## >>> Suggestion
## # Create an R markdown file for interpretative output with Rmd = "file_name"
## reg(After ~ Before + Treatment + Before * Treatment, data=df2, Rmd="eg")
##
##
## BACKGROUND
##
## Data Frame: df2
##
## Response Variable: After
## Predictor Variable 1: Before
## Predictor Variable 2: TreatmentOld
## Predictor Variable 3: Before.TreatmentOld
##
## Number of cases (rows) of data: 50
## Number of cases retained for analysis: 50
##
##
## BASIC ANALYSIS
##
## Estimate Std Err t-value p-value Lower 95% Upper 95%
## (Intercept) 90.468 12.149 7.446 0.000 66.012 114.923
## Before -0.360 0.239 -1.503 0.140 -0.842 0.122
## TreatmentOld -9.181 16.948 -0.542 0.591 -43.295 24.933
## Before.TreatmentOld -0.056 0.342 -0.163 0.871 -0.744 0.632
##
## Standard deviation of After: 9.7945
##
## Standard deviation of residuals: 7.8801 for df=46
## 95% range of residuals: 31.7235 = 2 * (2.013 * 7.8801)
##
## R-squared: 0.392 Adjusted R-squared: 0.353 PRESS R-squared: NA
##
## Null hypothesis of all 0 population slope coefficients:
## F-statistic: 9.901 df: 3 and 46 p-value: 0.000
##
## -- Analysis of Variance from Type II Sums of Squares
##
## df Sum Sq Mean Sq F-value p-value
## Before 1 319.163 319.163 5.249 0.026
## TreatmentOld 1 1724.303 1724.303 27.769 0.000
## Before.TreatmentOld 1 1.655 1.655 0.027 0.871
## Residuals 46 2856.382 62.095
##
## -- Test of Interaction
##
## Before:Treatment df: 1 df resid: 46 SS: 1.655 F: 0.027 p-value: 0.871
##
## -- Assume parallel lines, no interaction of Treatment with Before
##
## Level New: y^_After = 90.468 + -0.360(x_Before)
## Level Old: y^_After = 81.287 + -0.360(x_Before)
##
## -- Visualize Separately Computed Regression Lines
##
## Plot(Before, After, by=Treatment, fit="lm")
##
##
## K-FOLD CROSS-VALIDATION
##
##
## RELATIONS AMONG THE VARIABLES
##
## After Before TreatmentOld Before.TreatmentOld
## After 1.00 -0.16 -0.57 -0.60
## Before -0.16 1.00 -0.17 -0.04
## TreatmentOld -0.57 -0.17 1.00 0.98
## Before.TreatmentOld -0.60 -0.04 0.98 1.00
##
## Tolerance VIF
## Before 0.494 2.024
## TreatmentOld 0.017 57.821
## Before.TreatmentOld 0.018 56.198
##
## Before TreatmentOld Before.TreatmentOld R2adj X's
## 1 1 0 0.366 2
## 1 0 1 0.362 2
## 1 1 1 0.353 3
## 0 0 1 0.342 1
## 0 1 1 0.335 2
## 0 1 0 0.310 1
## 1 0 0 0.005 1
##
## [based on Thomas Lumley's leaps function from the leaps package]
##
##
## RESIDUALS AND INFLUENCE
##
## -- Data, Fitted, Residual, Studentized Residual, Dffits, Cook's Distance
## [sorted by Cook's Distance]
## [n_res_rows = 20, out of 50 rows of data, or do n_res_rows="all"]
## --------------------------------------------------------------------------------------
## Before TreatmentOld Before.TreatmentOld After fitted resid rstdnt dffits cooks
## 40 43 1 43 42 63.415 -21.415 -3.053 -0.800 0.136
## 19 64 0 0 77 67.437 9.563 1.381 0.718 0.126
## 50 60 1 60 46 56.349 -10.349 -1.466 -0.679 0.113
## 34 51 1 51 79 60.090 18.910 2.611 0.589 0.077
## 7 64 0 0 60 67.437 -7.437 -1.065 -0.554 0.076
## 32 44 1 44 79 62.999 16.001 2.172 0.527 0.064
## 1 41 0 0 66 75.714 -9.714 -1.325 -0.490 0.059
## 8 46 0 0 61 73.915 -12.915 -1.724 -0.425 0.043
## 26 51 1 51 74 60.090 13.910 1.857 0.419 0.042
## 46 47 1 47 49 61.752 -12.752 -1.685 -0.349 0.029
## 4 45 0 0 84 74.274 9.726 1.286 0.342 0.029
## 18 43 0 0 83 74.994 8.006 1.066 0.334 0.028
## 17 53 0 0 61 71.396 -10.396 -1.364 -0.302 0.022
## 16 43 0 0 82 74.994 7.006 0.930 0.292 0.021
## 10 47 0 0 83 73.555 9.445 1.237 0.284 0.020
## 3 50 0 0 62 72.475 -10.475 -1.370 -0.280 0.019
## 45 51 1 51 51 60.090 -9.090 -1.188 -0.268 0.018
## 30 42 1 42 70 63.830 6.170 0.811 0.231 0.013
## 36 50 1 50 53 60.505 -7.505 -0.973 -0.208 0.011
## 39 50 1 50 53 60.505 -7.505 -0.973 -0.208 0.011
##
##
## PREDICTION ERROR
##
## -- Data, Predicted, Standard Error of Prediction, 95% Prediction Intervals
## [sorted by lower bound of prediction interval]
## [to see all intervals add n_pred_rows="all"]
## ----------------------------------------------
##
## Before TreatmentOld Before.TreatmentOld After pred s_pred pi.lwr pi.upr width
## 50 60 1 60 46 56.349 8.549 39.142 73.557 34.415
## 35 59 1 59 59 56.765 8.469 39.718 73.811 34.093
## 47 58 1 58 60 57.180 8.395 40.282 74.078 33.796
## ...
## 48 49 1 49 62 60.921 8.040 44.738 77.104 32.365
## 41 48 1 48 60 61.337 8.036 45.161 77.512 32.352
## 27 47 1 47 65 61.752 8.040 45.568 77.936 32.368
## ...
## 44 36 1 36 67 66.324 8.555 49.103 83.545 34.442
## 7 64 0 0 60 67.437 8.678 49.970 84.905 34.935
## 19 64 0 0 77 67.437 8.678 49.970 84.905 34.935
##
## -------------------------------------------
## Plot 1: Distribution of Residuals
## Plot 2: Residuals vs Fitted Values
## Plot 3: Scatterplot and Least-Squares Lines
## -------------------------------------------
reg(After ~ Before + Treatment + Before*Treatment, data = df2)
##
## >>> Treatment is not numeric. Converted to indicator variables.
## >>> Suggestion
## # Create an R markdown file for interpretative output with Rmd = "file_name"
## reg(After ~ Before + Treatment + Before * Treatment, data=df2, Rmd="eg")
##
##
## BACKGROUND
##
## Data Frame: df2
##
## Response Variable: After
## Predictor Variable 1: Before
## Predictor Variable 2: TreatmentOld
## Predictor Variable 3: Before.TreatmentOld
##
## Number of cases (rows) of data: 50
## Number of cases retained for analysis: 50
##
##
## BASIC ANALYSIS
##
## Estimate Std Err t-value p-value Lower 95% Upper 95%
## (Intercept) 90.468 12.149 7.446 0.000 66.012 114.923
## Before -0.360 0.239 -1.503 0.140 -0.842 0.122
## TreatmentOld -9.181 16.948 -0.542 0.591 -43.295 24.933
## Before.TreatmentOld -0.056 0.342 -0.163 0.871 -0.744 0.632
##
## Standard deviation of After: 9.7945
##
## Standard deviation of residuals: 7.8801 for df=46
## 95% range of residuals: 31.7235 = 2 * (2.013 * 7.8801)
##
## R-squared: 0.392 Adjusted R-squared: 0.353 PRESS R-squared: NA
##
## Null hypothesis of all 0 population slope coefficients:
## F-statistic: 9.901 df: 3 and 46 p-value: 0.000
##
## -- Analysis of Variance from Type II Sums of Squares
##
## df Sum Sq Mean Sq F-value p-value
## Before 1 319.163 319.163 5.249 0.026
## TreatmentOld 1 1724.303 1724.303 27.769 0.000
## Before.TreatmentOld 1 1.655 1.655 0.027 0.871
## Residuals 46 2856.382 62.095
##
## -- Test of Interaction
##
## Before:Treatment df: 1 df resid: 46 SS: 1.655 F: 0.027 p-value: 0.871
##
## -- Assume parallel lines, no interaction of Treatment with Before
##
## Level New: y^_After = 90.468 + -0.360(x_Before)
## Level Old: y^_After = 81.287 + -0.360(x_Before)
##
## -- Visualize Separately Computed Regression Lines
##
## Plot(Before, After, by=Treatment, fit="lm")
##
##
## K-FOLD CROSS-VALIDATION
##
##
## RELATIONS AMONG THE VARIABLES
##
## After Before TreatmentOld Before.TreatmentOld
## After 1.00 -0.16 -0.57 -0.60
## Before -0.16 1.00 -0.17 -0.04
## TreatmentOld -0.57 -0.17 1.00 0.98
## Before.TreatmentOld -0.60 -0.04 0.98 1.00
##
## Tolerance VIF
## Before 0.494 2.024
## TreatmentOld 0.017 57.821
## Before.TreatmentOld 0.018 56.198
##
## Before TreatmentOld Before.TreatmentOld R2adj X's
## 1 1 0 0.366 2
## 1 0 1 0.362 2
## 1 1 1 0.353 3
## 0 0 1 0.342 1
## 0 1 1 0.335 2
## 0 1 0 0.310 1
## 1 0 0 0.005 1
##
## [based on Thomas Lumley's leaps function from the leaps package]
##
##
## RESIDUALS AND INFLUENCE
##
## -- Data, Fitted, Residual, Studentized Residual, Dffits, Cook's Distance
## [sorted by Cook's Distance]
## [n_res_rows = 20, out of 50 rows of data, or do n_res_rows="all"]
## --------------------------------------------------------------------------------------
## Before TreatmentOld Before.TreatmentOld After fitted resid rstdnt dffits cooks
## 40 43 1 43 42 63.415 -21.415 -3.053 -0.800 0.136
## 19 64 0 0 77 67.437 9.563 1.381 0.718 0.126
## 50 60 1 60 46 56.349 -10.349 -1.466 -0.679 0.113
## 34 51 1 51 79 60.090 18.910 2.611 0.589 0.077
## 7 64 0 0 60 67.437 -7.437 -1.065 -0.554 0.076
## 32 44 1 44 79 62.999 16.001 2.172 0.527 0.064
## 1 41 0 0 66 75.714 -9.714 -1.325 -0.490 0.059
## 8 46 0 0 61 73.915 -12.915 -1.724 -0.425 0.043
## 26 51 1 51 74 60.090 13.910 1.857 0.419 0.042
## 46 47 1 47 49 61.752 -12.752 -1.685 -0.349 0.029
## 4 45 0 0 84 74.274 9.726 1.286 0.342 0.029
## 18 43 0 0 83 74.994 8.006 1.066 0.334 0.028
## 17 53 0 0 61 71.396 -10.396 -1.364 -0.302 0.022
## 16 43 0 0 82 74.994 7.006 0.930 0.292 0.021
## 10 47 0 0 83 73.555 9.445 1.237 0.284 0.020
## 3 50 0 0 62 72.475 -10.475 -1.370 -0.280 0.019
## 45 51 1 51 51 60.090 -9.090 -1.188 -0.268 0.018
## 30 42 1 42 70 63.830 6.170 0.811 0.231 0.013
## 36 50 1 50 53 60.505 -7.505 -0.973 -0.208 0.011
## 39 50 1 50 53 60.505 -7.505 -0.973 -0.208 0.011
##
##
## PREDICTION ERROR
##
## -- Data, Predicted, Standard Error of Prediction, 95% Prediction Intervals
## [sorted by lower bound of prediction interval]
## [to see all intervals add n_pred_rows="all"]
## ----------------------------------------------
##
## Before TreatmentOld Before.TreatmentOld After pred s_pred pi.lwr pi.upr width
## 50 60 1 60 46 56.349 8.549 39.142 73.557 34.415
## 35 59 1 59 59 56.765 8.469 39.718 73.811 34.093
## 47 58 1 58 60 57.180 8.395 40.282 74.078 33.796
## ...
## 48 49 1 49 62 60.921 8.040 44.738 77.104 32.365
## 41 48 1 48 60 61.337 8.036 45.161 77.512 32.352
## 27 47 1 47 65 61.752 8.040 45.568 77.936 32.368
## ...
## 44 36 1 36 67 66.324 8.555 49.103 83.545 34.442
## 7 64 0 0 60 67.437 8.678 49.970 84.905 34.935
## 19 64 0 0 77 67.437 8.678 49.970 84.905 34.935
##
## -------------------------------------------
## Plot 1: Distribution of Residuals
## Plot 2: Residuals vs Fitted Values
## Plot 3: Scatterplot and Least-Squares Lines
## -------------------------------------------