Skip to content
CRAN requires the check problems on this package to be fixed before Nov 13 or it will be archived. See the check details

contdid

0.1.1Package record

Difference-in-Differences with a Continuous Treatment

0packages depend
5.1Kdownloads / year
–test coverage
9/13flavors OK

Overview

About

Provides methods for difference-in-differences with a continuous treatment and staggered treatment adoption. Includes estimation of treatment effects and causal responses as a function of the dose, event studies indexed by length of exposure to the treatment, and aggregation into overall average effects. Uniform inference procedures are included, along with both parametric and nonparametric models for treatment effects. The methods are based on Callaway, Goodman-Bacon, and Sant'Anna (2025) doi:10.48550/arXiv.2107.02637.

Changes in 0.1.1
  • Resubmission to CRAN following archival on 2026-07-16 (contdid was archived because its dependency ptetools had been archived; ptetools has since been restored to CRAN as version 1.0.1).
  • Require ptetools (>= 1.0.1) in Imports to prevent recurrence.
  • Update ggcont_did() to use ptetools's autoplot() methods in place of the now-deprecated ggpte()/ggpte_cont().

From NEWS.md in the release

Install

Health

CRAN checks
4ERROR9OK
Check messages
ERRORtestsr-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-release-linux-x86_64

r-devel-linux-x86_64-debian-gcc

Running ‘testthat.R’ [18s/20s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(contdid)
  > 
  > test_check("contdid")
  Saving _problems/test-cont_did-54.R
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 3 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-cont_did.R:37:3'): test basic functionality ────────────────────
  Error: D must contain only 0 (comparison) and 1 (treated).
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-cont_did.R:37:3
   2. │ └─base::withCallingHandlers(...)
   3. └─contdid::cont_did(...)
   4.   └─ptetools::pte(...)
   5.     └─ptetools::compute.pte(...)
   6.       └─ptetools (local) attgt_fun(gt_data = gt_data, ...)
   7.         └─DRDID::drdid_panel(...)
   8.           └─DRDID:::validate_treatment_indicator(D)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 3 ]
  Error:
  ! Test failures.
  Execution halted

r-devel-linux-x86_64-fedora-clang

Running ‘testthat.R’ [20s/42s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(contdid)
  > 
  > test_check("contdid")
  Saving _problems/test-cont_did-54.R
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 3 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-cont_did.R:37:3'): test basic functionality ────────────────────
  Error: D must contain only 0 (comparison) and 1 (treated).
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-cont_did.R:37:3
   2. │ └─base::withCallingHandlers(...)
   3. └─contdid::cont_did(...)
   4.   └─ptetools::pte(...)
   5.     └─ptetools::compute.pte(...)
   6.       └─ptetools (local) attgt_fun(gt_data = gt_data, ...)
   7.         └─DRDID::drdid_panel(...)
   8.           └─DRDID:::validate_treatment_indicator(D)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 3 ]
  Error:
  ! Test failures.
  Execution halted

r-devel-linux-x86_64-fedora-gcc

Running ‘testthat.R’ [19s/57s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(contdid)
  > 
  > test_check("contdid")
  Saving _problems/test-cont_did-54.R
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 3 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-cont_did.R:37:3'): test basic functionality ────────────────────
  Error: D must contain only 0 (comparison) and 1 (treated).
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-cont_did.R:37:3
   2. │ └─base::withCallingHandlers(...)
   3. └─contdid::cont_did(...)
   4.   └─ptetools::pte(...)
   5.     └─ptetools::compute.pte(...)
   6.       └─ptetools (local) attgt_fun(gt_data = gt_data, ...)
   7.         └─DRDID::drdid_panel(...)
   8.           └─DRDID:::validate_treatment_indicator(D)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 3 ]
  Error:
  ! Test failures.
  Execution halted

r-release-linux-x86_64

Running ‘testthat.R’ [28s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(contdid)
  > 
  > test_check("contdid")
  Saving _problems/test-cont_did-54.R
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 3 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-cont_did.R:37:3'): test basic functionality ────────────────────
  Error: D must contain only 0 (comparison) and 1 (treated).
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-cont_did.R:37:3
   2. │ └─base::withCallingHandlers(...)
   3. └─contdid::cont_did(...)
   4.   └─ptetools::pte(...)
   5.     └─ptetools::compute.pte(...)
   6.       └─ptetools (local) attgt_fun(gt_data = gt_data, ...)
   7.         └─DRDID::drdid_panel(...)
   8.           └─DRDID:::validate_treatment_indicator(D)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 3 ]
  Error:
  ! Test failures.
  Execution halted

CRAN check page ↗

Slowest check: 3.1 min · r-oldrel-macos-x86_64
Status changes
  • ERROR9 OK, 4 ERRORNow
  • ERROR11 OK, 2 ERROR2026-10-23
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
Show 3 earlier changesHide 3 earlier changes
  • OK13 OK2026-05-02
  • ERROR11 OK, 1 ERROR2026-04-25
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.1.1
READMEYes · 1,134 wordsVignettesNoNEWSYes · 100% structured · mentions 0.1.1Citation fileYes · software entry onlyWebsiteYes · pkgdown
Help pages
9 (1 internal)includes a package overview page
Examples that run
50%1 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
25%
Documented parameters
98%
Return-value docs
100%
Help pages citing references
0%

Downloads

5.1K
CRAN downloads in the past year
Rank #4,740 · ~14/day · ~424/mo
Daily download trend is not available in this view yet.
66330 days
1.8K90 days
5.1K1 year
Compare downloads with other packages →
Also on73 r2u17 autocran

Repository

79Stars
11Forks
7Open issues
0Open PRs
0Releases
66Commits
2Commit identities
66 commits · Last activity 2026-07-21 · +2.6% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
2
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2026-01-29 · 462026-10-21 · 79
PracticesBeta

7 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/bcallaway11/contdid on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
README.qmdpkgdown

GitHub Pages site last deployed 2026-07-21

CRAN release process (1)
cran-comments.md
Research and citation (1)
CITATION.cff
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen on or before 2026-07-20
    Named in .Rbuildignore: .claude
    Commits: at least 4 crediting it in the message
Models named in its commits
  • Claude Sonnet 54 commits · Jul 2026
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
9 external dependencies (excludes base and recommended)

Installing contdid adds 50 packages (26 with compiled code, 46 MB of source tarballs). Heaviest: BH 14 MB, ggplot2 6.0 MB, data.table 5.7 MB.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (3)
Author, Maintainer since 0.1.0 (2025)
Releases (2)

Pick two releases to compare their code metrics.

  • unarchivedReturned to CRAN
    2026-07-21
  • 0.1.1Latest
    record
    2026-07-21 · current release · diff ↗
  • archivedRemoved from CRAN
    2026-07-16
    requires archived package 'ptetools'
  • R
    R 4.6.0 released · 2026-04-24
  • 0.1.0
    record
    2025-07-03
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2025-07-03
Total releases
2 / 1 yrs
License
GPL-3 OSI
Minimum R
≥ 4.1.0
Download size
179 KB

Cite

Cite this package

Run in R for the authors' entry:

citation("contdid")

The package provides a citation file, so citation() returns the authors' own entry.

The repository also keeps a CITATION.cff.

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 contdid version 0.1.1 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, 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