Skip to content

Cross-Sectional Dependence Models

0packages depend
3.4Kdownloads / year
82.9%test coverage
13/13flavors OK

Overview

About

Provides estimators and utilities for large panel-data models with cross-sectional dependence, including mean group (MG), common correlated effects (CCE) and dynamic CCE (DCCE) estimators, and cross-sectionally augmented ARDL (CS-ARDL) specifications, plus related inference and diagnostics.

Changes in 2.0.0

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 = TRUE for 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.
Show all changes in 2.0.0Hide the rest of the changes in 2.0.0
  • 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(), and augment() methods with inference and row-alignment checks.
  • Document cross_sectional_avg() as a supported standalone data utility and distinguish it from averages configured by csdm_csa().
  • Retain evaluated subset, time-spacing, missing-value, and pdata.frame time 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 standard residuals() method.
  • Deprecate prepare_cd_input() because its transformations are not used by cd_test() and can change the hypothesis represented by the residuals.
  • Deprecate the exported cluster_vcov(), sandwich_vcov(), and pooled_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.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.6 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 2.0.0
READMEYes · 562 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 2.0.0Citation fileNoWebsiteYes · pkgdown
Help pages
24 (5 internal)
Examples that run
100%7 run in a plain check
Exported functions with examples
50%
Documented parameters
97%
Return-value docs
100%
Help pages citing references
8% with a bibliography file

Downloads

3.4K
CRAN downloads in the past year
Rank #8,671 · ~9/day · ~286/mo
Daily download trend is not available in this view yet.
42530 days
1.1K90 days
3.4K1 year
Compare downloads with other packages →
Also on67 r2u15 autocran

Repository

3Stars
0Forks
0Open issues
1Open PRs
3Releases
156Commits
2Commit identities
econometricseconomicspanel-datapanel-data-model
156 commits · Last activity 2026-10-07 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
not measured
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2026-03-07 · 12026-07-07 · 3
PracticesBeta

10 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/macosso/csdm on 2026-10-25.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux and Windows

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-03-23 · The repository has a site deploy workflow

Coverage (1)
Coverage reporting
Reproducibility and dev environment (1)
renv
Show all practicesHide 2 practices
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • GitHub Copilotfirst seen 2026-02-17
    Pull request: opened by its own account
    Commits: 9 by its own account
Review tools
  • Copilot code review
    Commits: at least 10 accepting its review suggestions
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
13 external dependencies (excludes base and recommended)

Installing csdm adds 13 packages (8 with compiled code, 5.5 MB of source tarballs). Heaviest: rbibutils 1.1 MB, vctrs 1.0 MB, rlang 766 KB.

Depends (1)
R >= 4.0.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 1.0.0 (2026)
Listed in earlier versions (1)
Macosso
no longer listed · 1.0.0 to 2.0.0
Releases (3)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 2.0.0Latest
    record
    2026-03-23 · current release · diff ↗
  • 1.0.1
    record
    2026-03-23 · diff ↗
  • 1.0.0
    record
    2026-02-20
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2026-02-20
Total releases
3 / 1 yrs
License
GPL-3 OSI
Minimum R
≥ 4.0.0
Bundled data
53 KB / 1 file
Download size
178 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("csdm")
Macosso, J. C. (2026). csdm: Cross-Sectional Dependence Models (Version 2.0.0) [Computer software]. https://doi.org/10.32614/CRAN.package.csdm

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for csdm version 2.0.0 [Data set]. HJJB, LLC. Data release v2026-10-26. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy