Tạo dữ liệu
library(readxl)
setwd("d:/DATA2020/PaerScopus/Von_Quy_GDP")
dulieu <-read_excel("data.cutoff.2000.xlsx")
dulieu <-data.frame(dulieu)
head(dulieu)
## YEAR QUY Time GDP LnGDP TI LnTI IG LnIG IP
## 1 2000 Q1 2000q1 224744 12.32272 48119.6 10.78144 12415.2 9.426677 4636.6
## 2 2000 Q2 2000q2 289321 12.57529 61946.0 11.03402 15982.6 9.679256 5968.8
## 3 2000 Q3 2000q3 270389 12.50762 57892.5 10.96634 14936.8 9.611583 5578.3
## 4 2000 Q4 2000q4 330885 12.70953 70845.2 11.16825 18278.6 9.813486 6826.3
## 5 2001 Q1 2001q1 241948 12.39648 54482.6 10.90564 14573.9 9.586988 5197.9
## 6 2001 Q2 2001q2 305601 12.63004 68816.1 11.13919 18408.1 9.820546 6565.5
## LnIP IF LnIF CPI OILP LCU LAB LnOILP LnLCU
## 1 8.441737 31067.8 10.34393 0.9 26.85 73.529 38361.71 3.290266 4.297680
## 2 8.694301 39994.6 10.59650 -0.9 29.00 69.959 38563.64 3.367296 4.247909
## 3 8.626639 37377.4 10.52882 -1.6 33.00 67.351 38924.97 3.496508 4.209918
## 4 8.828538 45740.3 10.73074 -0.5 33.76 35.419 38545.38 3.519277 3.567248
## 5 8.556010 34710.8 10.45481 0.0 27.41 34.478 39421.17 3.310908 3.540321
## 6 8.789584 43842.5 10.68836 -0.7 28.48 34.753 39629.60 3.349202 3.548266
## LnLAB
## 1 10.55482
## 2 10.56007
## 3 10.56939
## 4 10.55959
## 5 10.58206
## 6 10.58733
Unit Root Test
library(fUnitRoots)
## Loading required package: timeDate
## Loading required package: timeSeries
## Loading required package: fBasics
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:timeSeries':
##
## filter, lag
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
adfTest(dulieu$LnGDP,4)
## Warning in adfTest(dulieu$LnGDP, 4): p-value greater than printed p-value
##
## Title:
## Augmented Dickey-Fuller Test
##
## Test Results:
## PARAMETER:
## Lag Order: 4
## STATISTIC:
## Dickey-Fuller: 3.402
## P VALUE:
## 0.99
##
## Description:
## Fri Jul 10 17:30:18 2020 by user: Admin
unitrootTest(dulieu$LnGDP,4)
##
## Title:
## Augmented Dickey-Fuller Test
##
## Test Results:
## PARAMETER:
## Lag Order: 4
## STATISTIC:
## DF: 3.402
## P VALUE:
## t: 0.9998
## n: 0.9993
##
## Description:
## Fri Jul 10 17:30:18 2020 by user: Admin
unit Root test gói khác
library(tseries)
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
adf.test(dulieu$LnGDP)
##
## Augmented Dickey-Fuller Test
##
## data: dulieu$LnGDP
## Dickey-Fuller = -1.7261, Lag order = 4, p-value = 0.6878
## alternative hypothesis: stationary
kpss.test(dulieu$LnGDP)
## Warning in kpss.test(dulieu$LnGDP): p-value smaller than printed p-value
##
## KPSS Test for Level Stationarity
##
## data: dulieu$LnGDP
## KPSS Level = 2.1104, Truncation lag parameter = 3, p-value = 0.01
pp.test(dulieu$LnGDP)
## Warning in pp.test(dulieu$LnGDP): p-value smaller than printed p-value
##
## Phillips-Perron Unit Root Test
##
## data: dulieu$LnGDP
## Dickey-Fuller Z(alpha) = -86.91, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
adf.test(diff(dulieu$LnGDP))
##
## Augmented Dickey-Fuller Test
##
## data: diff(dulieu$LnGDP)
## Dickey-Fuller = -2.651, Lag order = 4, p-value = 0.3094
## alternative hypothesis: stationary
kpss.test(diff(dulieu$LnGDP))
## Warning in kpss.test(diff(dulieu$LnGDP)): p-value greater than printed p-value
##
## KPSS Test for Level Stationarity
##
## data: diff(dulieu$LnGDP)
## KPSS Level = 0.27903, Truncation lag parameter = 3, p-value = 0.1
pp.test(diff(dulieu$LnGDP))
## Warning in pp.test(diff(dulieu$LnGDP)): p-value smaller than printed p-value
##
## Phillips-Perron Unit Root Test
##
## data: diff(dulieu$LnGDP)
## Dickey-Fuller Z(alpha) = -105.9, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
pp.test(dulieu[,1])
## Warning in pp.test(dulieu[, 1]): p-value smaller than printed p-value
##
## Phillips-Perron Unit Root Test
##
## data: dulieu[, 1]
## Dickey-Fuller Z(alpha) = -56.216, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
head(dulieu[,1])
## [1] 2000 2000 2000 2000 2001 2001
Unit Root Test for data
dim(dulieu)
## [1] 80 20
chon <-c(5,9,11,13,14, 18,19,20)
for ( i in chon){
print(i)
print( pp.test(dulieu[,i]))
print( pp.test(diff(dulieu[,i])))
print("==========================================")
}
## [1] 5
##
## Phillips-Perron Unit Root Test
##
## data: dulieu[, i]
## Dickey-Fuller Z(alpha) = -86.91, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
##
##
## Phillips-Perron Unit Root Test
##
## data: diff(dulieu[, i])
## Dickey-Fuller Z(alpha) = -105.9, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
##
## [1] "=========================================="
## [1] 9
##
## Phillips-Perron Unit Root Test
##
## data: dulieu[, i]
## Dickey-Fuller Z(alpha) = -38.443, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
##
##
## Phillips-Perron Unit Root Test
##
## data: diff(dulieu[, i])
## Dickey-Fuller Z(alpha) = -105.7, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
##
## [1] "=========================================="
## [1] 11
##
## Phillips-Perron Unit Root Test
##
## data: dulieu[, i]
## Dickey-Fuller Z(alpha) = -23.16, Truncation lag parameter = 3, p-value
## = 0.02473
## alternative hypothesis: stationary
##
##
## Phillips-Perron Unit Root Test
##
## data: diff(dulieu[, i])
## Dickey-Fuller Z(alpha) = -105.13, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
##
## [1] "=========================================="
## [1] 13
##
## Phillips-Perron Unit Root Test
##
## data: dulieu[, i]
## Dickey-Fuller Z(alpha) = -18.383, Truncation lag parameter = 3, p-value
## = 0.08111
## alternative hypothesis: stationary
##
##
## Phillips-Perron Unit Root Test
##
## data: diff(dulieu[, i])
## Dickey-Fuller Z(alpha) = -103.34, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
##
## [1] "=========================================="
## [1] 14
##
## Phillips-Perron Unit Root Test
##
## data: dulieu[, i]
## Dickey-Fuller Z(alpha) = -14.522, Truncation lag parameter = 3, p-value
## = 0.2593
## alternative hypothesis: stationary
##
##
## Phillips-Perron Unit Root Test
##
## data: diff(dulieu[, i])
## Dickey-Fuller Z(alpha) = -60.867, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
##
## [1] "=========================================="
## [1] 18
##
## Phillips-Perron Unit Root Test
##
## data: dulieu[, i]
## Dickey-Fuller Z(alpha) = -7.2786, Truncation lag parameter = 3, p-value
## = 0.6892
## alternative hypothesis: stationary
##
##
## Phillips-Perron Unit Root Test
##
## data: diff(dulieu[, i])
## Dickey-Fuller Z(alpha) = -70.804, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
##
## [1] "=========================================="
## [1] 19
##
## Phillips-Perron Unit Root Test
##
## data: dulieu[, i]
## Dickey-Fuller Z(alpha) = -48.742, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
##
##
## Phillips-Perron Unit Root Test
##
## data: diff(dulieu[, i])
## Dickey-Fuller Z(alpha) = -88.581, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
##
## [1] "=========================================="
## [1] 20
##
## Phillips-Perron Unit Root Test
##
## data: dulieu[, i]
## Dickey-Fuller Z(alpha) = -2.3121, Truncation lag parameter = 3, p-value
## = 0.9582
## alternative hypothesis: stationary
##
##
## Phillips-Perron Unit Root Test
##
## data: diff(dulieu[, i])
## Dickey-Fuller Z(alpha) = -90.39, Truncation lag parameter = 3, p-value
## = 0.01
## alternative hypothesis: stationary
##
## [1] "=========================================="
Chạy ARDL
library(ARDL)
## To cite ARDL in publications use:
##
## Kleanthis Natsiopoulos and Nickolaos Tzeremes (2020). ARDL: ARDL, ECM and Bounds-Test for Cointegration. R package version 0.1.0. University of Thessaly, Department of Economics. https://github.com/Natsiopoulos/ARDL.
congthuc1 <-LnGDP~ CPI + LnIG + LnIP + LnIF + LnLCU + LnLAB
congthuc2 <-CPI~ LnGDP + LnIG + LnIP + LnIF + LnLCU + LnLAB
nhieumodels <-auto_ardl(congthuc1, data=dulieu,max_order = 3)
nhieumodels
## $best_model
##
## Time series regression with "ts" data:
## Start = 3, End = 80
##
## Call:
## dynlm::dynlm(formula = full_formula, data = data, start = start,
## end = end)
##
## Coefficients:
## (Intercept) L(LnGDP, 1) L(LnGDP, 2) CPI L(CPI, 1) LnIG
## -1.859179 0.812249 0.220474 0.006563 -0.005649 0.451064
## L(LnIG, 1) LnIP L(LnIP, 1) L(LnIP, 2) LnIF L(LnIF, 1)
## -0.392381 0.038740 0.065637 -0.158867 0.462531 -0.403662
## L(LnIF, 2) LnLCU L(LnLCU, 1) LnLAB L(LnLAB, 1) L(LnLAB, 2)
## -0.066281 0.020045 -0.024492 -0.462715 1.213567 -0.615989
##
##
## $best_order
## [1] 2 1 1 2 2 1 2
##
## $top_orders
## LnGDP CPI LnIG LnIP LnIF LnLCU LnLAB AIC
## 1 2 1 1 2 2 1 2 -332.8700
## 2 2 1 1 2 2 1 1 -331.6097
## 3 2 1 1 2 2 2 2 -330.9760
## 4 2 1 1 2 1 1 2 -330.9391
## 5 2 2 1 2 2 1 2 -330.9366
## 6 2 1 2 2 2 1 2 -330.8900
## 7 2 1 2 2 2 2 2 -329.0064
## 8 2 1 1 2 1 2 2 -328.9625
## 9 2 1 1 3 2 1 2 -327.9577
## 10 2 2 2 2 2 2 2 -327.1070
## 11 2 1 1 3 2 2 2 -326.4064
## 12 1 1 1 0 1 1 2 -322.7270
## 13 1 1 1 0 1 1 1 -322.3274
## 14 1 1 1 0 2 1 2 -321.7530
## 15 1 2 1 0 1 1 2 -321.4645
## 16 1 1 1 1 1 1 1 -321.2375
## 17 1 1 2 0 1 1 2 -320.7935
## 18 1 1 1 0 1 2 2 -320.7315
## 19 1 1 1 0 1 0 1 -319.0068
## 20 1 1 1 0 2 1 1 -317.2323
modelchon1 <- nhieumodels$best_model
modelchon1
##
## Time series regression with "ts" data:
## Start = 3, End = 80
##
## Call:
## dynlm::dynlm(formula = full_formula, data = data, start = start,
## end = end)
##
## Coefficients:
## (Intercept) L(LnGDP, 1) L(LnGDP, 2) CPI L(CPI, 1) LnIG
## -1.859179 0.812249 0.220474 0.006563 -0.005649 0.451064
## L(LnIG, 1) LnIP L(LnIP, 1) L(LnIP, 2) LnIF L(LnIF, 1)
## -0.392381 0.038740 0.065637 -0.158867 0.462531 -0.403662
## L(LnIF, 2) LnLCU L(LnLCU, 1) LnLAB L(LnLAB, 1) L(LnLAB, 2)
## -0.066281 0.020045 -0.024492 -0.462715 1.213567 -0.615989
summary(modelchon1)
##
## Time series regression with "ts" data:
## Start = 3, End = 80
##
## Call:
## dynlm::dynlm(formula = full_formula, data = data, start = start,
## end = end)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.094292 -0.012258 -0.001959 0.012030 0.070673
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.859179 2.180853 -0.853 0.397326
## L(LnGDP, 1) 0.812249 0.080300 10.115 1.38e-14 ***
## L(LnGDP, 2) 0.220474 0.070175 3.142 0.002608 **
## CPI 0.006563 0.001326 4.950 6.35e-06 ***
## L(CPI, 1) -0.005649 0.001259 -4.485 3.35e-05 ***
## LnIG 0.451064 0.040926 11.021 4.73e-16 ***
## L(LnIG, 1) -0.392381 0.041227 -9.518 1.34e-13 ***
## LnIP 0.038740 0.044665 0.867 0.389207
## L(LnIP, 1) 0.065637 0.053957 1.216 0.228575
## L(LnIP, 2) -0.158867 0.042571 -3.732 0.000424 ***
## LnIF 0.462531 0.022717 20.361 < 2e-16 ***
## L(LnIF, 1) -0.403662 0.042851 -9.420 1.95e-13 ***
## L(LnIF, 2) -0.066281 0.037637 -1.761 0.083328 .
## LnLCU 0.020045 0.009796 2.046 0.045128 *
## L(LnLCU, 1) -0.024492 0.009583 -2.556 0.013142 *
## LnLAB -0.462715 0.311036 -1.488 0.142078
## L(LnLAB, 1) 1.213567 0.426254 2.847 0.006033 **
## L(LnLAB, 2) -0.615989 0.384913 -1.600 0.114778
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0256 on 60 degrees of freedom
## Multiple R-squared: 0.9965, Adjusted R-squared: 0.9956
## F-statistic: 1018 on 17 and 60 DF, p-value: < 2.2e-16
bestmodel <-ardl(congthuc1,data=dulieu, order=c(4,4,1,1,4,2,4))
summary(bestmodel)
##
## Time series regression with "ts" data:
## Start = 5, End = 80
##
## Call:
## dynlm::dynlm(formula = full_formula, data = data, start = start,
## end = end)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.0092300 -0.0024729 -0.0001102 0.0023951 0.0076504
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.627e-01 5.014e-01 1.322 0.19244
## L(LnGDP, 1) 4.440e-02 2.366e-02 1.876 0.06658 .
## L(LnGDP, 2) -3.288e-02 1.076e-02 -3.056 0.00362 **
## L(LnGDP, 3) -1.132e-02 1.029e-02 -1.101 0.27637
## L(LnGDP, 4) 9.714e-01 2.380e-02 40.815 < 2e-16 ***
## CPI 4.400e-04 3.121e-04 1.410 0.16485
## L(CPI, 1) -9.196e-04 3.741e-04 -2.458 0.01754 *
## L(CPI, 2) -1.116e-05 3.191e-04 -0.035 0.97225
## L(CPI, 3) -6.201e-04 3.163e-04 -1.961 0.05562 .
## L(CPI, 4) 3.734e-04 2.546e-04 1.467 0.14888
## LnIG 1.364e-03 1.355e-02 0.101 0.92022
## L(LnIG, 1) -3.474e-02 1.119e-02 -3.105 0.00316 **
## LnIP 8.452e-03 8.612e-03 0.981 0.33118
## L(LnIP, 1) 2.612e-02 9.132e-03 2.860 0.00620 **
## LnIF 1.911e-02 1.065e-02 1.794 0.07896 .
## L(LnIF, 1) -3.697e-02 1.159e-02 -3.190 0.00248 **
## L(LnIF, 2) -2.187e-05 7.060e-03 -0.003 0.99754
## L(LnIF, 3) 3.643e-03 6.958e-03 0.524 0.60295
## L(LnIF, 4) 8.430e-03 5.233e-03 1.611 0.11365
## LnLCU -4.623e-05 1.947e-03 -0.024 0.98116
## L(LnLCU, 1) -2.651e-03 2.099e-03 -1.263 0.21259
## L(LnLCU, 2) 4.175e-03 2.043e-03 2.043 0.04641 *
## LnLAB 5.110e-02 8.636e-02 0.592 0.55676
## L(LnLAB, 1) 1.138e-01 8.440e-02 1.349 0.18360
## L(LnLAB, 2) 3.386e-02 8.606e-02 0.393 0.69573
## L(LnLAB, 3) -1.435e-02 8.031e-02 -0.179 0.85888
## L(LnLAB, 4) -2.000e-01 8.611e-02 -2.323 0.02439 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.004502 on 49 degrees of freedom
## Multiple R-squared: 0.9999, Adjusted R-squared: 0.9999
## F-statistic: 2.037e+04 on 26 and 49 DF, p-value: < 2.2e-16
Ước lượng Dài hạn, ngắn hạn
lienket<-coint_eq(modelchon1,case=2)
lienket
## Time Series:
## Start = 1
## End = 80
## Frequency = 1
## [1] 13.36960 13.41629 13.38559 13.32778 13.10744 13.12933 13.06043 13.07099
## [9] 13.16546 13.13817 13.07436 13.09664 13.50570 13.55481 13.54030 13.59693
## [17] 13.69841 13.61842 13.54386 13.58289 13.40572 13.37282 13.29115 13.30918
## [25] 13.43011 13.39028 13.29967 13.32455 13.75343 13.71192 13.63765 13.56908
## [33] 13.30319 13.02651 12.88210 12.98606 12.88160 12.91469 12.85178 12.80412
## [41] 13.50149 13.46624 13.48279 13.46815 13.19666 12.96001 12.74084 12.85129
## [49] 12.82026 12.99759 13.15321 13.25773 12.97174 13.10303 13.09170 13.27930
## [57] 13.35931 13.52249 13.61301 13.72445 13.47903 13.59096 13.57348 13.70566
## [65] 13.85794 13.86667 13.86877 13.92489 13.30949 13.17048 13.42025 13.40770
## [73] 13.50142 13.43375 13.56945 13.55240 13.63890 13.56991 13.80182 13.82779
shortrun <-uecm(modelchon1, case=2)
summary(shortrun)
##
## Time series regression with "ts" data:
## Start = 3, End = 80
##
## Call:
## dynlm::dynlm(formula = full_formula, data = data, start = start,
## end = end)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.094292 -0.012258 -0.001959 0.012030 0.070673
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.8591790 2.1808525 -0.853 0.397326
## L(LnGDP, 1) 0.0327223 0.0727945 0.450 0.654679
## L(CPI, 1) 0.0009137 0.0007278 1.256 0.214149
## L(LnIG, 1) 0.0586827 0.0322004 1.822 0.073375 .
## L(LnIP, 1) -0.0544899 0.0300335 -1.814 0.074632 .
## L(LnIF, 1) -0.0074117 0.0326342 -0.227 0.821108
## L(LnLCU, 1) -0.0044471 0.0105109 -0.423 0.673742
## L(LnLAB, 1) 0.1348633 0.2352470 0.573 0.568595
## d(L(LnGDP, 1)) -0.2204736 0.0701749 -3.142 0.002608 **
## d(CPI) 0.0065626 0.0013258 4.950 6.35e-06 ***
## d(LnIG) 0.4510638 0.0409259 11.021 4.73e-16 ***
## d(LnIP) 0.0387402 0.0446650 0.867 0.389207
## d(L(LnIP, 1)) 0.1588669 0.0425711 3.732 0.000424 ***
## d(LnIF) 0.4625312 0.0227167 20.361 < 2e-16 ***
## d(L(LnIF, 1)) 0.0662807 0.0376374 1.761 0.083328 .
## d(LnLCU) 0.0200450 0.0097963 2.046 0.045128 *
## d(LnLAB) -0.4627149 0.3110361 -1.488 0.142078
## d(L(LnLAB, 1)) 0.6159887 0.3849128 1.600 0.114778
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0256 on 60 degrees of freedom
## Multiple R-squared: 0.9927, Adjusted R-squared: 0.9906
## F-statistic: 478.1 on 17 and 60 DF, p-value: < 2.2e-16
bounds_f_test(modelchon1, case=3)
##
## Bounds F-test (Wald) for no cointegration
##
## data: d(LnGDP) ~ L(LnGDP, 1) + L(CPI, 1) + L(LnIG, 1) + L(LnIP, 1) + L(LnIF, 1) + L(LnLCU, 1) + L(LnLAB, 1) + d(L(LnGDP, 1)) + d(CPI) + d(LnIG) + d(LnIP) + d(L(LnIP, 1)) + d(LnIF) + d(L(LnIF, 1)) + d(LnLCU) + d(LnLAB) + d(L(LnLAB, 1))
## F = 2.0947, p-value = 0.4809
## alternative hypothesis: Possible cointegration
## null values:
## k T
## 6 1000
bounds_t_test(modelchon1, case=3)
##
## Bounds t-test for no cointegration
##
## data: d(LnGDP) ~ L(LnGDP, 1) + L(CPI, 1) + L(LnIG, 1) + L(LnIP, 1) + L(LnIF, 1) + L(LnLCU, 1) + L(LnLAB, 1) + d(L(LnGDP, 1)) + d(CPI) + d(LnIG) + d(LnIP) + d(L(LnIP, 1)) + d(LnIF) + d(L(LnIF, 1)) + d(LnLCU) + d(LnLAB) + d(L(LnLAB, 1))
## t = 0.44952, p-value = 0.9936
## alternative hypothesis: Possible cointegration
## null values:
## k T
## 6 1000
Chạy hết
ketqua1 <-multipliers(modelchon1, type = "lr")
ketqua1
## term estimate std.error t.statistic p.value
## 1 (Intercept) 56.81687311 120.16204397 0.4728354 0.6380462
## 2 CPI -0.02792359 0.05844355 -0.4777874 0.6345376
## 3 LnIG -1.79335368 4.29457604 -0.4175857 0.6777406
## 4 LnIP 1.66522076 3.20983971 0.5187863 0.6058180
## 5 LnIF 0.22650181 0.85410479 0.2651921 0.7917705
## 6 LnLCU 0.13590318 0.53490825 0.2540682 0.8003116
## 7 LnLAB -4.12144731 11.07047979 -0.3722917 0.7109875
ketqua2 <-multipliers(bestmodel)
ketqua2
## term estimate std.error t.statistic p.value
## 1 (Intercept) 23.30131743 32.55221229 0.7158136 0.4775039
## 2 CPI -0.02593033 0.02114944 -1.2260529 0.2260385
## 3 LnIG -1.17374772 1.24244457 -0.9447083 0.3494430
## 4 LnIP 1.21568977 1.08911281 1.1162202 0.2697719
## 5 LnIF -0.20454539 0.32866569 -0.6223509 0.5365966
## 6 LnLCU 0.05195888 0.13727640 0.3784983 0.7066955
## 7 LnLAB -0.54758204 2.77607222 -0.1972506 0.8444473
all.equal(ketqua1, ketqua2)
## [1] "Component \"estimate\": Mean relative difference: 0.5969625"
## [2] "Component \"std.error\": Mean relative difference: 0.7278803"
## [3] "Component \"t.statistic\": Mean relative difference: 1.188684"
## [4] "Component \"p.value\": Mean relative difference: 0.3530686"