R Under development (unstable) (2026-03-23 r89685 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(panelecon) > > test_check("panelecon") ------------------------------------------------------------------------ xtmispanel -- Missing Data Diagnostics for Panel Data v1.0.0 ------------------------------------------------------------------------ Panel id: id | Time id: time Panels: 4 | Time periods: 8 | Rows: 32 ------------------------------------------------------------------------ ------------------------------------------------------------------------ TABLE 1: Missing Data Summary by Variable ------------------------------------------------------------------------ Variable N_Total N_Miss %Miss Mean SD Status ------------------------------------------------------------------------ y 32 4 12.5% 0.093 0.927 Moderate x1 32 0 0.0% 0.181 0.846 Complete ------------------------------------------------------------------------ Overall 64 4 6.2% ------------------------------------------------------------------------ ------------------------------------------------------------------------ TABLE 2: Missing Data by Panel ------------------------------------------------------------------------ Panel N_Obs N_Miss %Miss Status ------------------------------------------------------------------------ 1 16 1 6.2% Low 2 16 1 6.2% Low 3 16 1 6.2% Low 4 16 1 6.2% Low ------------------------------------------------------------------------ ------------------------------------------------------------------------ xtmispanel -- Missing Data Diagnostics for Panel Data v1.0.0 ------------------------------------------------------------------------ Panel id: id | Time id: time Panels: 4 | Time periods: 8 | Rows: 32 ------------------------------------------------------------------------ ------------------------------------------------------------------------ Imputation Results: method = mean ------------------------------------------------------------------------ Missing before : 4 Values filled : 4 Still missing : 0 Stat Original Imputed Delta% Mean 0.0934 0.0934 0.00% SD 0.9274 0.8676 Correlation (obs pairs): 1.0000 ------------------------------------------------------------------------ ------------------------------------------------------------------------ xtmispanel -- Missing Data Diagnostics for Panel Data v1.0.0 ------------------------------------------------------------------------ Panel id: id | Time id: time Panels: 4 | Time periods: 8 | Rows: 32 ------------------------------------------------------------------------ ------------------------------------------------------------------------ Imputation Results: method = locf ------------------------------------------------------------------------ Missing before : 4 Values filled : 4 Still missing : 0 Stat Original Imputed Delta% Mean 0.0934 0.1018 9.02% SD 0.9274 0.8788 Correlation (obs pairs): 1.0000 ------------------------------------------------------------------------ ------------------------------------------------------------------------ xtmispanel -- Missing Data Diagnostics for Panel Data v1.0.0 ------------------------------------------------------------------------ Panel id: id | Time id: time Panels: 4 | Time periods: 8 | Rows: 32 ------------------------------------------------------------------------ ------------------------------------------------------------------------ Imputation Results: method = linear ------------------------------------------------------------------------ Missing before : 4 Values filled : 4 Still missing : 0 Stat Original Imputed Delta% Mean 0.0934 0.1142 22.24% SD 0.9274 0.9013 Correlation (obs pairs): 1.0000 ------------------------------------------------------------------------ ------------------------------------------------------------------------ xtmispanel -- Missing Data Diagnostics for Panel Data v1.0.0 ------------------------------------------------------------------------ Panel id: id | Time id: time Panels: 4 | Time periods: 8 | Rows: 32 ------------------------------------------------------------------------ ------------------------------------------------------------------------ Imputation Results: method = mean ------------------------------------------------------------------------ Missing before : 4 Values filled : 4 Still missing : 0 Stat Original Imputed Delta% Mean 0.0934 0.0934 0.00% SD 0.9274 0.8676 Correlation (obs pairs): 1.0000 ------------------------------------------------------------------------ ------------------------------------------------------------------------ xtmispanel -- Missing Data Diagnostics for Panel Data v1.0.0 ------------------------------------------------------------------------ Panel id: id | Time id: time Panels: 4 | Time periods: 8 | Rows: 32 ------------------------------------------------------------------------ ------------------------------------------------------------------------ MODULE 4: Sensitivity Analysis -- Comparing Imputation Methods ------------------------------------------------------------------------ Method Mean SD Min Max Delta Mean% ------------------------------------------------------------------------ mean 0.0934 0.8676 -2.2147 1.5953 0.00% median 0.1133 0.8758 -2.2147 1.5953 21.31% locf 0.1018 0.8788 -2.2147 1.5953 9.02% nocb 0.1265 0.9615 -2.2147 1.5953 35.45% linear 0.1142 0.9013 -2.2147 1.5953 22.24% spline 0.1109 0.9255 -2.2147 1.5953 18.77% pmm 0.0912 0.8673 -2.2147 1.5953 -2.36% hotdeck 0.0852 0.9235 -2.2147 1.5953 -8.82% knn 0.1073 0.8776 -2.2147 1.5953 14.89% rf 0.0864 0.8686 -2.2147 1.5953 -7.52% em 0.0934 0.8676 -2.2147 1.5953 0.00% ------------------------------------------------------------------------ Best method (lowest distribution distortion): mean Mean change: 0% ------------------------------------------------------------------------ ----------------------------------------------------------------- Panel Causality Test: PFTY H0: mvalue does NOT Granger-cause invest N = 5 panels, T = 20 periods, nboot = 99 ----------------------------------------------------------------- Fisher stat: 5.0086 df: 10 p-value: 0.8906 W-bar: 0.7563 Z-bar: -0.3853 p-value: 0.7000 Individual results: Panel Lag Freq Wald Boot p-val 1 1 1 2.5029 0.2929 2 1 1 0.0145 0.9697 3 1 1 0.1074 0.7980 4 1 1 1.1423 0.3838 5 1 1 0.0145 0.9394 ----------------------------------------------------------------- *** p<0.01, ** p<0.05, * p<0.10 ----------------------------------------------------------------- Panel Causality Test: PQC H0: mvalue does NOT Granger-cause invest N = 5 panels, T = 20 periods, nboot = 99 ----------------------------------------------------------------- Sup-Wald (mvalue => invest): 0.4392 Sup-Wald (invest => mvalue): 5.4955 Optimal lag: 1 Tau Wald(mvalue=>invest) p-val Wald(invest=>mvalue) p-val 0.25 0.4392 0.0100* 0.2188 0.0100* 0.75 0.0150 0.0100* 5.4955 0.0100* ----------------------------------------------------------------- *** p<0.01, ** p<0.05, * p<0.10 ----------------------------------------------------------------- Panel Cointegrating Polynomial Regression: Group-Mean FM-OLS (Wagner & Reichold 2023) Dep: invest | Poly: mvalue (degree 2) | N=5, T=20 ----------------------------------------------------------------- Variable Estimate Std. Err t-stat p-value ----------------------------------------------------------------- mvalue 0.7154 0.5885 1.2156 0.2241 mvalue^2 0.0017 0.0008 2.0782 0.0377** ----------------------------------------------------------------- Turning point x*: -214.1322 [95% CI: -736.5063, 308.2418] (U-shaped) Swamy S = 8.0000, df = 8, p = 0.4335 [Homogeneous] *** p<0.01, ** p<0.05, * p<0.10 ----------------------------------------------------------------- Panel Cointegrating Polynomial Regression: Group-Mean FM-OLS (Wagner & Reichold 2023) Dep: invest | Poly: mvalue (degree 2) | N=5, T=20 ----------------------------------------------------------------- Variable Estimate Std. Err t-stat p-value ----------------------------------------------------------------- mvalue 0.7154 0.5885 1.2156 0.2241 mvalue^2 0.0017 0.0008 2.0782 0.0377** ----------------------------------------------------------------- Turning point x*: -214.1322 [95% CI: -736.5063, 308.2418] (U-shaped) Swamy S = 8.0000, df = 8, p = 0.4335 [Homogeneous] *** p<0.01, ** p<0.05, * p<0.10 Individual FM-OLS Estimates (first 5 panels): Panel 1: 4.3875 -0.0009 Panel 2: -0.7292 0.0027 Panel 3: 1.7583 -0.0005 Panel 4: -1.1102 0.0044 Panel 5: -0.7292 0.0027 ----------------------------------------------------------------- CIPS(tau) Panel Quantile Unit Root Test Yang, Wei & Cai (2022, Economics Letters) Variable: invest | N = 5, T = 20 | Model: intercept ----------------------------------------------------------------- CIPS (OLS): -5.4869 p-value: 0.6200 Tau CIPS(tau) p-value Decision -------------------------------------------------- 0.25 -4.5200 0.0000 *** Reject H0 0.75 -6.1900 1.0000 Fail to reject ----------------------------------------------------------------- H0: All panels contain a unit root H1: Some panels are stationary *** p<0.01, ** p<0.05, * p<0.10 ------------------------------------------------------------------------ xtpretest -- Comprehensive Panel Data Pre-Testing Suite v1.0.0 ------------------------------------------------------------------------ Dependent : y Regressors : x1 Panel id : id | Time id: time N panels : 5 | Avg T: 10 | Obs: 50 ------------------------------------------------------------------------ ------------------------------------------------------------------------ MODULE: Hsiao (2014) Homogeneity Tests ------------------------------------------------------------------------ RSS Unrestricted (S1): 29.3365 RSS FE (S2): 32.8823 RSS Pooled (S3): 33.8178 ------------------------------------------------------------------------ F1: Overall homogeneity F= 0.7638 df=(8,40) p=0.6361 [accept] F2: Slope homogeneity F= 1.2087 df=(4,40) p=0.3222 [accept] F3: Intercept homogeneity F= 0.3130 df=(4,44) p=0.8678 [accept] ------------------------------------------------------------------------ ------------------------------------------------------------------------ OVERALL PRE-TEST SUMMARY ------------------------------------------------------------------------ Hsiao F1 (overall) : p=0.636 Hsiao F2 (slopes) : p=0.322 Hsiao F3 (intercepts): p=0.868 >>> Recommended estimator: Pooled OLS ------------------------------------------------------------------------ ------------------------------------------------------------------------ xtpretest -- Comprehensive Panel Data Pre-Testing Suite v1.0.0 ------------------------------------------------------------------------ Dependent : y Regressors : x1, x2 Panel id : id | Time id: time N panels : 5 | Avg T: 10 | Obs: 50 ------------------------------------------------------------------------ ------------------------------------------------------------------------ MODULE: Cross-Sectional Dependence (Pesaran 2004) ------------------------------------------------------------------------ CD statistic = 0.1712 p-value = 0.8640 Avg |rho_ij| = 0.2325 -> No significant cross-sectional dependence. ------------------------------------------------------------------------ ------------------------------------------------------------------------ OVERALL PRE-TEST SUMMARY ------------------------------------------------------------------------ CSD (Pesaran) : p=0.864 >>> Recommended estimator: Pooled OLS ------------------------------------------------------------------------ ------------------------------------------------------------------------ xtpretest -- Comprehensive Panel Data Pre-Testing Suite v1.0.0 ------------------------------------------------------------------------ Dependent : y Regressors : x1 Panel id : id | Time id: time N panels : 5 | Avg T: 10 | Obs: 50 ------------------------------------------------------------------------ ------------------------------------------------------------------------ MODULE: Hsiao (2014) Homogeneity Tests ------------------------------------------------------------------------ RSS Unrestricted (S1): 29.3365 RSS FE (S2): 32.8823 RSS Pooled (S3): 33.8178 ------------------------------------------------------------------------ F1: Overall homogeneity F= 0.7638 df=(8,40) p=0.6361 [accept] F2: Slope homogeneity F= 1.2087 df=(4,40) p=0.3222 [accept] F3: Intercept homogeneity F= 0.3130 df=(4,44) p=0.8678 [accept] ------------------------------------------------------------------------ ------------------------------------------------------------------------ MODULE: Cross-Sectional Dependence (Pesaran 2004) ------------------------------------------------------------------------ CD statistic = -0.8000 p-value = 0.4237 Avg |rho_ij| = 0.3668 -> No significant cross-sectional dependence. ------------------------------------------------------------------------ ------------------------------------------------------------------------ OVERALL PRE-TEST SUMMARY ------------------------------------------------------------------------ Hsiao F1 (overall) : p=0.636 Hsiao F2 (slopes) : p=0.322 Hsiao F3 (intercepts): p=0.868 CSD (Pesaran) : p=0.424 >>> Recommended estimator: Pooled OLS ------------------------------------------------------------------------ ------------------------------------------------------------------------ xtpretest -- Comprehensive Panel Data Pre-Testing Suite v1.0.0 ------------------------------------------------------------------------ Dependent : y Regressors : x1 Panel id : id | Time id: time N panels : 5 | Avg T: 10 | Obs: 50 ------------------------------------------------------------------------ ------------------------------------------------------------------------ MODULE: Panel Summary Statistics ------------------------------------------------------------------------ Variable Overall SD Between SD Within SD Min Max ------------------------------------------------------------------------ y 0.8314 0.1409 0.8216 -2.2147 1.5953 x1 0.9688 0.2478 0.9426 -1.8050 2.4016 ------------------------------------------------------------------------ ------------------------------------------------------------------------ OVERALL PRE-TEST SUMMARY ------------------------------------------------------------------------ >>> Recommended estimator: Pooled OLS ------------------------------------------------------------------------ [ FAIL 0 | WARN 84 | SKIP 1 | PASS 116 ] ══ Skipped tests (1) ═══════════════════════════════════════════════════════════ • {xtmispanel} is not installed. (1): 'test-xtmispanel.R:67:3' [ FAIL 0 | WARN 84 | SKIP 1 | PASS 116 ] > > proc.time() user system elapsed 10.12 0.71 10.82