can I recreate output of uecm of the best auto_ardl model using dynlm

Can you guys please help me find the reasoning whether I can use dynlm package to recreate a uecm model extracted from ARDL package? and if I could, why the summary produced is very different. Can I use dynlm to model several variables that are not stationary as what ECM is able to do?

I create a model using auto_ardl and extract uecm of the best model from auto_ardl with this code:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>library(ARDL)
ardl_test <- auto_ardl(logKINBU ~ SBIV+logGCSM+logDKTOT, data = KINBU_tn, max_order = c(3,3,3,3))
ard11 <- ardl_test$best_model
ue.ardl1 <- uecm(ard11)
summary(ue.ardl1)
</code>
<code>library(ARDL) ardl_test <- auto_ardl(logKINBU ~ SBIV+logGCSM+logDKTOT, data = KINBU_tn, max_order = c(3,3,3,3)) ard11 <- ardl_test$best_model ue.ardl1 <- uecm(ard11) summary(ue.ardl1) </code>
library(ARDL)
ardl_test <- auto_ardl(logKINBU ~ SBIV+logGCSM+logDKTOT, data = KINBU_tn, max_order = c(3,3,3,3))
ard11 <- ardl_test$best_model
ue.ardl1 <- uecm(ard11)
summary(ue.ardl1)

The result of the summary is as follow:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Time series regression with "ts" data:
Start = 2011(2), End = 2022(4)
Call:
dynlm::dynlm(formula = full_formula, data = data, start = start,
end = end)
Residuals:
Min 1Q Median 3Q Max
-0.032620 -0.009780 -0.002166 0.007290 0.092606
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.633134 0.797861 -2.047 0.04696 *
L(logKINBU, 1) -0.141840 0.048997 -2.895 0.00599 **
SBIV 0.003054 0.005654 0.540 0.59193
logGCSM 0.195276 0.083378 2.342 0.02399 *
logDKTOT 0.052885 0.086300 0.613 0.54331
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.02167 on 42 degrees of freedom
Multiple R-squared: 0.5268, Adjusted R-squared: 0.4817
F-statistic: 11.69 on 4 and 42 DF, p-value: 1.811e-06
</code>
<code>Time series regression with "ts" data: Start = 2011(2), End = 2022(4) Call: dynlm::dynlm(formula = full_formula, data = data, start = start, end = end) Residuals: Min 1Q Median 3Q Max -0.032620 -0.009780 -0.002166 0.007290 0.092606 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.633134 0.797861 -2.047 0.04696 * L(logKINBU, 1) -0.141840 0.048997 -2.895 0.00599 ** SBIV 0.003054 0.005654 0.540 0.59193 logGCSM 0.195276 0.083378 2.342 0.02399 * logDKTOT 0.052885 0.086300 0.613 0.54331 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.02167 on 42 degrees of freedom Multiple R-squared: 0.5268, Adjusted R-squared: 0.4817 F-statistic: 11.69 on 4 and 42 DF, p-value: 1.811e-06 </code>
Time series regression with "ts" data:
Start = 2011(2), End = 2022(4)

Call:
dynlm::dynlm(formula = full_formula, data = data, start = start, 
    end = end)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.032620 -0.009780 -0.002166  0.007290  0.092606 

Coefficients:
                Estimate Std. Error t value Pr(>|t|)   
(Intercept)    -1.633134   0.797861  -2.047  0.04696 * 
L(logKINBU, 1) -0.141840   0.048997  -2.895  0.00599 **
SBIV            0.003054   0.005654   0.540  0.59193   
logGCSM         0.195276   0.083378   2.342  0.02399 * 
logDKTOT        0.052885   0.086300   0.613  0.54331   
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.02167 on 42 degrees of freedom
Multiple R-squared:  0.5268,    Adjusted R-squared:  0.4817 
F-statistic: 11.69 on 4 and 42 DF,  p-value: 1.811e-06

And then, when I tried using dynlm to recreate the uecm version of the model with this code:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>ardl_model = dynlm::dynlm(formula = logKINBU ~ L(logKINBU, 1)+SBIV+logGCSM+logDKTOT, data = KINBU_tn)
summary(ardl_model)
</code>
<code>ardl_model = dynlm::dynlm(formula = logKINBU ~ L(logKINBU, 1)+SBIV+logGCSM+logDKTOT, data = KINBU_tn) summary(ardl_model) </code>
ardl_model = dynlm::dynlm(formula = logKINBU ~ L(logKINBU, 1)+SBIV+logGCSM+logDKTOT, data = KINBU_tn)
summary(ardl_model)

the summary result is very different with R-squared that is very high:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Time series regression with "ts" data:
Start = 2011(2), End = 2022(4)
Call:
dynlm::dynlm(formula = logKINBU ~ L(logKINBU, 1) + SBIV + logGCSM +
logDKTOT, data = KINBU_tn)
Residuals:
Min 1Q Median 3Q Max
-0.032620 -0.009780 -0.002166 0.007290 0.092606
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.633134 0.797861 -2.047 0.047 *
L(logKINBU, 1) 0.858160 0.048997 17.515 <2e-16 ***
SBIV 0.003054 0.005654 0.540 0.592
logGCSM 0.195276 0.083378 2.342 0.024 *
logDKTOT 0.052885 0.086300 0.613 0.543
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.02167 on 42 degrees of freedom
Multiple R-squared: 0.9973, Adjusted R-squared: 0.997
F-statistic: 3871 on 4 and 42 DF, p-value: < 2.2e-16
</code>
<code>Time series regression with "ts" data: Start = 2011(2), End = 2022(4) Call: dynlm::dynlm(formula = logKINBU ~ L(logKINBU, 1) + SBIV + logGCSM + logDKTOT, data = KINBU_tn) Residuals: Min 1Q Median 3Q Max -0.032620 -0.009780 -0.002166 0.007290 0.092606 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.633134 0.797861 -2.047 0.047 * L(logKINBU, 1) 0.858160 0.048997 17.515 <2e-16 *** SBIV 0.003054 0.005654 0.540 0.592 logGCSM 0.195276 0.083378 2.342 0.024 * logDKTOT 0.052885 0.086300 0.613 0.543 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.02167 on 42 degrees of freedom Multiple R-squared: 0.9973, Adjusted R-squared: 0.997 F-statistic: 3871 on 4 and 42 DF, p-value: < 2.2e-16 </code>
Time series regression with "ts" data:
Start = 2011(2), End = 2022(4)

Call:
dynlm::dynlm(formula = logKINBU ~ L(logKINBU, 1) + SBIV + logGCSM + 
    logDKTOT, data = KINBU_tn)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.032620 -0.009780 -0.002166  0.007290  0.092606 

Coefficients:
                Estimate Std. Error t value Pr(>|t|)    
(Intercept)    -1.633134   0.797861  -2.047    0.047 *  
L(logKINBU, 1)  0.858160   0.048997  17.515   <2e-16 ***
SBIV            0.003054   0.005654   0.540    0.592    
logGCSM         0.195276   0.083378   2.342    0.024 *  
logDKTOT        0.052885   0.086300   0.613    0.543    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.02167 on 42 degrees of freedom
Multiple R-squared:  0.9973,    Adjusted R-squared:  0.997 
F-statistic:  3871 on 4 and 42 DF,  p-value: < 2.2e-16

Could you please educate me, what’s wrong with the implementation of my code? Can UECM be recreated with dynlm? If both turned out okay, will the spurious regression be issue in the dynlm version of my model?

Your help is really appreciated.

New contributor

user25375480 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật