csdm (development version)
- Add
cd_test()methods fordata.frameandpdata.frameinputs. Select numeric panel variables explicitly using bare names, quoted names, or character vectors. Plain data frames require namedidandtimecolumns; indexed panels use their stored indexes. Return separate named results per variable and print a combined table with variable-specific sample dimensions. - Add
repsto CDw and CDw+, defaulting to 1. Repeated weighted statistics use the sum divided bysqrt(reps), following equation (33) of Juodis and Reese; CDw+ adds its screening term once. Seeded calls continue to preserve RNG state. - Record incomplete time periods removed by
drop.incomplete.timesinexcluded_times, alongside periods with no finite observations. - Correct fitted-model CD* input to retain the common-factor component after subtracting the economic and deterministic fitted terms, following Pesaran-Xie’s regression input construction. This changes fitted CD* results; CD, CDw, and CDw+ still use full fitted residuals. Preserve and document the standardized-PCA implementation variant for CD*.
- Clarify the CDw and CDw+ formulas against Juodis-Reese equations (30) and (32), document the complete CD* correction, and correct the Pesaran-Xie and Fan-Liao-Yao references.
csdm 2.0.0
CRAN release: 2026-09-22
Version 2.0.0 expands the package’s R model interfaces, adds new sample controls, and improves estimator and diagnostic behavior. It also includes bug fixes for edge cases involving irregular time indexes, missing observations, cross-sectional averages, covariance calculations, and dependence tests. For reproducibility, report the package version when comparing output across releases.
Estimation and inference
- Add
fullsample = TRUEfor CCE-based models. Cross-sectional averages are then calculated variable by variable from all finite observations in the selected sample before dynamic lag trimming. - Construct model and cross-sectional-average lags by explicit time-grid matching, preventing lags from crossing gaps in a panel.
- Evaluate formulas, transformed cross-sectional-average variables, subsets, and missing-value policies consistently.
- Correct missing-value and leave-one-out cross-sectional averages.
- Use one eligible unit sample for mean-group coefficients and covariance, and require at least two eligible units.
- Correct fixed-weight mean-group covariance scaling and HC0–HC3 sandwich covariance calculations.
- Check structural identification after cross-sectional-average projection and report excluded units.
- Align CS-ARDL parameter components and covariance, and expose unit-level AR stability and long-run-ratio eligibility.
- Validate panel keys, retain original observation identity when sorting, and preserve named cross-sectional-average lag specifications.
Dependence diagnostics
- Remove time periods containing no estimated residuals before assessing CD sample balance, while retaining the selected policy for partially observed periods.
- Implement the paper-defined pooled-variance CDw statistic and the correlation-scale screening term used by CDw+ for balanced samples.
- Correct CD-star unit-specific residual scales and validate PCA rank.
- Make randomized diagnostics opt-in, preserve seeded RNG state, and use pairwise samples for the classical CD statistic.
- Validate clustered covariance inputs and make residual transformations explicit.
R interfaces
- Add standard extraction and update methods, original-row fitted and residual outputs, and stored-data model updates.
- Add
tidy(),glance(), andaugment()methods with inference and row-alignment checks. - Document
cross_sectional_avg()as a supported standalone data utility and distinguish it from averages configured bycsdm_csa(). - Retain evaluated subset, time-spacing, missing-value, and
pdata.frametime information when models are updated. - Reject unsupported model, trend, cross-sectional-average, long-run, and covariance specifications instead of silently storing or ignoring them.
Deprecations
- Deprecate
csdm_pooled()because pooled restrictions are not implemented. - Deprecate
get_residuals()in favor of the standardresiduals()method. - Deprecate
prepare_cd_input()because its transformations are not used bycd_test()and can change the hypothesis represented by the residuals. - Deprecate the exported
cluster_vcov(),sandwich_vcov(), andpooled_vcov()utilities. Existing calls continue to work with a migration warning.
Documentation and maintenance
- Rewrite the README, introductory vignette, and pkgdown navigation around the implemented API. Correct the description of
log_ngd, update the CDw/CDw+ explanations, and make the introductory examples runnable. - Add reference fixtures, statistical validation scripts, platform checks, and Codecov reporting.
- Share unit-regression and sample-bookkeeping code across the MG, CCE, and DCCE engines, and remove obsolete internal helpers and imports.