## 
## Attaching package: 'car'
## The following object is masked from 'package:psych':
## 
##     logit
##    IDBenhNhan time MI.0 BI.0  RLEP.0 RnaDna16s.0 RnaDna18k.0  PLG1.0
## 13         23    0   19    4  117000   0.8450410   0.9920986  197.90
## 18         33    0   11    4   15700   0.9662293   0.0000000  143.51
## 21         42    0   23    5  523000   1.0849456   0.1581956  867.63
## 22         44    0    4    4 1200000   0.4466960   0.2471131   53.92
## 24         49    0    6    3    7812   0.6879172   0.4470152  308.82
## 26         53    0   10    4   76500   0.8306925   0.0000000  236.70
## 28         57    0   10    4   10600   1.1924612   0.5743945  108.46
## 31         66    0   31    4   30700   0.4554677   0.0000000   12.08
## 38         77    0   22    4  656540   0.9802799   0.3822505  122.39
## 40         80    0   19    4   54321   0.9718857   0.0000000 1031.32
## 41         81    0   12    5  343112   0.8806832   0.0000000  514.50
## 43         83    0   11    3    4536   0.7664103   0.1028173  282.48
## 44         84    0    7    3    7651   0.7319645   0.0000000  187.94
## 45         86    0    7    3    6589   0.9740689   0.0000000  187.35
## 47         89    0    6    3    7896   0.6070761   0.0000000  186.19
## 48         90    0   12    4   99800   0.7138568   0.0000000  633.65
## 52         94    0   10    5   96800   0.6914069   0.0000000  205.96
##    NhomPUP    PLG1 nhompup
## 13       1  205.30       1
## 18       1  143.51       1
## 21       1  867.63       1
## 22       1   53.92       1
## 24       1  308.82       1
## 26       1  236.70       1
## 28       1  108.46       1
## 31       1   12.08       1
## 38       1  122.39       1
## 40       1 1031.32       1
## 41       1  514.50       1
## 43       1  282.48       1
## 44       1  187.94       1
## 45       1  187.35       1
## 47       1  186.19       1
## 48       1  633.65       1
## 52       1  205.96       1
##    IDBenhNhan time MI.0 BI.0  RLEP.0 RnaDna16s.0 RnaDna18k.0  PLG1.0
## 1           1    0   32    5 2910000   0.9463608  0.90383632  509.49
## 2           2    0   13    4  434000   1.2877231  1.33608791  901.54
## 3           3    0   27    4  365000   1.2008810  1.15679500  530.26
## 4           4    0   31    6  343000   1.2149860  0.94675320  488.71
## 5           5    0    8    4  243000   0.7207903  0.16003350   85.82
## 6           8    0   31    6 2420000   0.7413186  0.86599919  859.43
## 7           9    0   36    5  117000   1.3224555  0.60435625  315.04
## 8          11    0   11    3  122000   0.2144813  0.03108466  205.30
## 9          13    0   14    4  122000   0.7761954  0.95843729  266.34
## 10         17    0    2    2    3630   0.3899750  0.00000000  834.16
## 11         18    0    2    3    8760   0.5782708  0.46583947  266.34
## 12         21    0   22    5 2790000   1.0895081  0.67644022  397.66
## 14         24    0   32    5  332000   0.7656988  0.38643235   49.32
## 15         25    0   18    4  253000   0.8916757  0.65718192  599.88
## 16         28    0   29    6   22200   1.3473366  1.06415500  752.77
## 17         32    0    6    4  975000   0.9031621  0.46583084  821.76
## 19         37    0   24    6    2950   2.3403119  0.75991031  889.91
## 20         41    0    8    4   76210   0.8422851  0.90650274  719.53
## 23         45    0    4    4   30400   1.1049442  0.41418991   60.66
## 25         52    0   14    6  286000   0.9256852  0.52640451 1041.61
## 27         54    0   10    4    4520   2.3289805  0.77621261 1252.39
## 29         62    0   23    5  982000   0.7484571  0.41770246 1407.06
## 30         63    0   33    5 1570000   0.9170086  1.14646608 1179.37
## 32         67    0   29    5  146000   0.8733445  0.42442015 1595.72
## 33         70    0    4    3     135   0.6773753  0.59327370 1027.84
## 34         71    0   19    4  764302   0.6350542  1.28235895  579.47
## 35         74    0    2    3   45321   1.0400381  0.45852099  134.57
## 36         75    0   14    3   65408   0.7791702  0.48481911  172.27
## 37         76    0   19    5 7659800   0.8546990  0.98007216  327.73
## 39         79    0   12    5  546301   1.0000139  0.92336161  318.45
## 42         82    0   11    4   63420   0.7489405  1.02429868  390.95
## 46         87    0   12    4  764310   1.0945120  0.96075228  778.42
## 49         91    0   14    4  768000   0.7047716  0.49076718 1674.85
## 50         92    0   14    5  168000   1.1095624  0.38473507 1334.79
## 51         93    0   34    5 7540000   0.8601909  0.72301407  439.09
## 53         95    0   29    5   40300   0.9129531  0.00000000 1255.04
## 54         96    0   12    5   99400   1.2371603  0.74319855   51.71
## 55         97    0   11    4  272000   1.3446611  0.87202761 1260.30
## 56         99    0   23    4  317000   0.6878312  0.21496366  456.62
##    NhomPUP    PLG1 nhompup
## 1        4  509.49       4
## 2        3  901.54       3
## 3        3  530.26       3
## 4        4  488.71       4
## 5        2   85.82       2
## 6        2  859.43       2
## 7        2  315.04       2
## 8        4  397.66       4
## 9        2  197.90       2
## 10       2   49.32       2
## 11       2  599.88       2
## 12       4  752.77       4
## 14       2  266.34       2
## 15       2  834.16       2
## 16       2  266.34       2
## 17       2  821.76       2
## 19       2  889.91       2
## 20       2  719.53       2
## 23       6   60.66       6
## 25       2 1041.61       2
## 27       4 1252.39       4
## 29       4 1407.06       4
## 30       5 1179.37       5
## 32       3 1595.72       3
## 33       3 1027.84       3
## 34       5  579.47       5
## 35       5  134.57       5
## 36       5  172.27       5
## 37       3  327.73       3
## 39       4  318.45       4
## 42       5  390.95       5
## 46       4  778.42       4
## 49       4 1674.85       4
## 50       4 1334.79       4
## 51       4  439.09       4
## 53       6 1255.04       6
## 54       4   51.71       4
## 55       4 1260.30       4
## 56       4  456.62       4

Biều đồ tương quan nhóm 1 (R-)

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

##   IDBenhNhan time MI.0 BI.0  RLEP.0 RnaDna16s.0 RnaDna18k.0 PLG1.0 NhomPUP
## 2          2    0   13    4  434000   1.2877231   1.3360879 901.54       3
## 3          3    0   27    4  365000   1.2008810   1.1567950 530.26       3
## 5          5    0    8    4  243000   0.7207903   0.1600335  85.82       2
## 6          8    0   31    6 2420000   0.7413186   0.8659992 859.43       2
## 7          9    0   36    5  117000   1.3224555   0.6043562 315.04       2
## 9         13    0   14    4  122000   0.7761954   0.9584373 266.34       2
##     PLG1 nhompup
## 2 901.54       3
## 3 530.26       3
## 5  85.82       2
## 6 859.43       2
## 7 315.04       2
## 9 197.90       2
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero

phân tích thêm sự tương quan của PGL1

NhomTong0$PLG1 = NhomTong0$PLG1.0/1000
scatterplot(NhomTong0$PLG1 ~ NhomTong0$time, pch = 20, smooth = T, col = "blue", lwd = 2,smoother=loessLine)

NhomTong0.time0.0 = subset( NhomTong0, NhomTong0$time==0)
NhomTong0.time1 = subset( NhomTong0, NhomTong0$time==1)
NhomTong0.time6 = subset( NhomTong0, NhomTong0$time==6)
NhomTong0.time12 = subset( NhomTong0, NhomTong0$time==12)
m1=lm(NhomTong0$PLG1 ~ NhomTong0$time)
m1 = lm(NhomTong0$PLG1 ~ NhomTong0$time)
summary(m1)
## 
## Call:
## lm(formula = NhomTong0$PLG1 ~ NhomTong0$time)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.51220 -0.25794 -0.07103  0.14181  1.19973 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.524276   0.035718  14.678  < 2e-16 ***
## NhomTong0$time -0.033361   0.005403  -6.174 3.64e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3594 on 200 degrees of freedom
##   (22 observations deleted due to missingness)
## Multiple R-squared:  0.1601, Adjusted R-squared:  0.1559 
## F-statistic: 38.12 on 1 and 200 DF,  p-value: 3.641e-09
nhompup = rep(c(4,3,3,4,2,2,2,4,2,2,2,4,1,2,2,2,2,1,2,2,1,1,6,1,2,1,4,1,4,5,1,3,3,5,5,5,3,1,4,1,1,5,1,1,1,4,1,1,4,4,4,1,6,4,4,4),4)
NhomTong0$nhompup = nhompup

NhomTong0.Nhompup1 = subset(NhomTong0, NhomTong0$nhompup==1)
NhomTong0.Nhompup236 = subset(NhomTong0,NhomTong0$nhompup==2|NhomTong0$nhompup==3|NhomTong0$nhompup==6)
NhomTong0.Nhompup45 = subset(NhomTong0,NhomTong0$nhompup==4|NhomTong0$nhompup==5)

par(mfrow= c(2,2))

lm(NhomTong0$PLG1 ~ NhomTong0$time)
## 
## Call:
## lm(formula = NhomTong0$PLG1 ~ NhomTong0$time)
## 
## Coefficients:
##    (Intercept)  NhomTong0$time  
##        0.52428        -0.03336
summary(lm(NhomTong0$PLG1 ~ NhomTong0$time))
## 
## Call:
## lm(formula = NhomTong0$PLG1 ~ NhomTong0$time)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.51220 -0.25794 -0.07103  0.14181  1.19973 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.524276   0.035718  14.678  < 2e-16 ***
## NhomTong0$time -0.033361   0.005403  -6.174 3.64e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3594 on 200 degrees of freedom
##   (22 observations deleted due to missingness)
## Multiple R-squared:  0.1601, Adjusted R-squared:  0.1559 
## F-statistic: 38.12 on 1 and 200 DF,  p-value: 3.641e-09
scatterplot(NhomTong0$PLG1 ~ NhomTong0$time, pch = 20, smooth = T, col = "blue", lwd = 2,smoother=loessLine)

## 
## Call:
## lm(formula = NhomTong0.Nhompup1$PLG1 ~ NhomTong0.Nhompup1$time)
## 
## Coefficients:
##             (Intercept)  NhomTong0.Nhompup1$time  
##                 0.29840                 -0.01827
## 
## Call:
## lm(formula = NhomTong0.Nhompup1$PLG1 ~ NhomTong0.Nhompup1$time)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.28632 -0.12832 -0.06185  0.07881  0.73292 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              0.298396   0.040107   7.440 6.49e-10 ***
## NhomTong0.Nhompup1$time -0.018269   0.005792  -3.154  0.00259 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2105 on 56 degrees of freedom
##   (10 observations deleted due to missingness)
## Multiple R-squared:  0.1508, Adjusted R-squared:  0.1357 
## F-statistic: 9.948 on 1 and 56 DF,  p-value: 0.002589

## 
## Call:
## lm(formula = NhomTong0.Nhompup236$PLG1 ~ NhomTong0.Nhompup236$time)
## 
## Coefficients:
##               (Intercept)  NhomTong0.Nhompup236$time  
##                   0.55954                   -0.04013
## 
## Call:
## lm(formula = NhomTong0.Nhompup236$PLG1 ~ NhomTong0.Nhompup236$time)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.51022 -0.23264 -0.01478  0.17198  1.03618 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                0.559538   0.048302  11.584  < 2e-16 ***
## NhomTong0.Nhompup236$time -0.040133   0.007237  -5.546 4.07e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3026 on 76 degrees of freedom
##   (2 observations deleted due to missingness)
## Multiple R-squared:  0.2881, Adjusted R-squared:  0.2787 
## F-statistic: 30.76 on 1 and 76 DF,  p-value: 4.069e-07

## 
## Call:
## lm(formula = NhomTong0.Nhompup45$PLG1 ~ NhomTong0.Nhompup45$time)
## 
## Coefficients:
##              (Intercept)  NhomTong0.Nhompup45$time  
##                  0.65902                  -0.03494
## 
## Call:
## lm(formula = NhomTong0.Nhompup45$PLG1 ~ NhomTong0.Nhompup45$time)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.6073 -0.3329 -0.1698  0.4160  1.0839 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)               0.65902    0.07866   8.379 6.94e-12 ***
## NhomTong0.Nhompup45$time -0.03494    0.01260  -2.772  0.00728 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4614 on 64 degrees of freedom
##   (10 observations deleted due to missingness)
## Multiple R-squared:  0.1072, Adjusted R-squared:  0.09326 
## F-statistic: 7.685 on 1 and 64 DF,  p-value: 0.007283

cho 4 biểu đồ vào 1 ô

par(mfrow= c(2,2))
plot(NhomTong0$PLG1~NhomTong0$time, xlab = "Time", ylab = "PLG1", main = "Tất cả bệnh nhân")
abline(lm(NhomTong0$PLG1 ~ NhomTong0$time))
plot(NhomTong0.Nhompup1$PLG1 ~ NhomTong0.Nhompup1$time, xlab = "Time", ylab = "PLG1", main = "Nhóm không xảy ra PUP trong MDT")
abline(lm(NhomTong0.Nhompup1$PLG1 ~ NhomTong0.Nhompup1$time))
plot(NhomTong0.Nhompup236$PLG1 ~ NhomTong0.Nhompup236$time, xlab = "Time", ylab = "PLG1", main = "Nhóm PUP xảy ra trong MDT")
abline(lm(NhomTong0.Nhompup236$PLG1 ~ NhomTong0.Nhompup236$time))
plot(NhomTong0.Nhompup45$PLG1 ~ NhomTong0.Nhompup45$time, xlab = "Time", ylab = "PLG1", main = "Nhóm PUP xảy ra trước MDT")
abline(lm(NhomTong0.Nhompup45$PLG1 ~ NhomTong0.Nhompup45$time))

par(mfrow=c(1,1))

par(mfrow= c(2,2))
scatterplot(NhomTong0$PLG1 ~ NhomTong0$time|NhomTong0$nhompup, smooth = F, lwd = 2,smoother=loessLine)

#Biểu đồ tương quan PLG1-Time của nhóm 1 - không xảy ra phản ứng phong
scatterplot(NhomTong0.Nhompup1$PLG1 ~ NhomTong0.Nhompup1$time, pch = 20, smooth = T, col = "blue", lwd = 2,smoother=loessLine, xlab = "Time", ylab = "PLG1", main = "Nhóm không xảy ra phản ứng phong trong suốt MDT")

#Biểu đồ tương quan PLG1-Time của nhóm 2 - Phản ứng phong xảy ra khi có MDT
scatterplot(NhomTong0.Nhompup236$PLG1 ~ NhomTong0.Nhompup236$time, pch = 20, smooth = T, col = "blue", lwd = 2,smoother=loessLine, xlab = "Time", ylab = "PLG1", main = "Nhóm Phản ứng phong xảy ra khi có MDT")

#Biểu đồ tương quan PLG1-Time của nhóm 3 - Phản ứng phong có trước khi MDT
scatterplot(NhomTong0.Nhompup45$PLG1 ~ NhomTong0.Nhompup45$time, pch = c(20), smooth = T, col = c("blue"), lwd = 2, xlab = "Time", ylab = "PLG1", main = "Nhóm PUP xảy ra trước MDT")

#Kết hợp 3 biểu đồ
NhomTong0$nhompupR1[NhomTong0$nhompup==1] <- "Khong co PUP Trong suot MDT"
NhomTong0$nhompupR1[NhomTong0$nhompup==2|NhomTong0$nhompup==3|NhomTong0$nhompup==6] <- "PUP xay ra khi co MDT"
NhomTong0$nhompupR1[NhomTong0$nhompup==4|NhomTong0$nhompup==5] <- "PUP co truoc MDT"

scatterplot(NhomTong0$PLG1 ~ NhomTong0$time|NhomTong0$nhompupR1, data=NhomTong0, xlab = "Time", ylab = "Anti-PGL1",main = "Biểu đồ tương quan của các nhóm PUP",   pch = c(20,16,17), smooth = T, col = c("blue","red","black"),reg.line=T,las =1,lwd =4,lty=2,legend.title="Nhóm đối tượng phản ứng phong")