{
  "_id": "6a2914ca732311cd875988fe",
  "Package": "did2s",
  "Title": "Two-Stage Difference-in-Differences Following Gardner (2021)",
  "Version": "1.2.0",
  "Authors@R": "c(person(given = \"Kyle\",\nfamily = \"Butts\",\nrole = c(\"aut\",\"cre\"),\nemail = \"buttskyle96@gmail.com\",\ncomment = c(ORCID = \"0000-0002-9048-8059\")),\nperson(given = \"John\",\nfamily = \"Gardner\",\nrole = \"aut\",\nemail = \"jrgardne@olemiss.edu\",\ncomment = c(ORCID = \"0000-0002-4028-6862\")),\nperson(given = \"Grant\",\nfamily = \"McDermott\",\nrole = \"ctb\",\nemail = \"grantmcd@uoregon.edu\",\ncomment = c(ORCID = \"0000-0001-7883-8573\")),\nperson(given = \"Laurent\",\nfamily = \"Berge\",\nrole = \"ctb\",\nemail = \"laurent.berge@u-bordeaux.fr\"))",
  "Description": "Estimates Two-way Fixed Effects\ndifference-in-differences/event-study models using the approach\nproposed by Gardner (2021) <doi:10.48550/arXiv.2207.05943>. To\navoid the problems caused by OLS estimation of the Two-way\nFixed Effects model, this function first estimates the fixed\neffects and covariates using untreated observations and then in\na second stage, estimates the treatment effects.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.2",
  "URL": "https://kylebutts.github.io/did2s/",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "Config/pak/sysreqs": "cmake libglpk-dev libgmp3-dev make libicu-dev\npkg-config libclang-dev",
  "Repository": "https://kylebutts.r-universe.dev",
  "Date/Publication": "2026-03-12 21:44:37 UTC",
  "RemoteUrl": "https://github.com/kylebutts/did2s",
  "RemoteRef": "HEAD",
  "RemoteSha": "8228c158ef39201cf7c6617201efdec2582f210f",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-06-10 07:27:36 UTC",
    "User": "root"
  },
  "Author": "Kyle Butts [aut, cre] (ORCID: <https://orcid.org/0000-0002-9048-8059>),\nJohn Gardner [aut] (ORCID: <https://orcid.org/0000-0002-4028-6862>),\nGrant McDermott [ctb] (ORCID: <https://orcid.org/0000-0001-7883-8573>),\nLaurent Berge [ctb]",
  "Maintainer": "Kyle Butts <buttskyle96@gmail.com>",
  "MD5sum": "cb9407f6b9e54afd976ffde2a2e8d525",
  "_user": "kylebutts",
  "_type": "src",
  "_file": "did2s_1.2.0.tar.gz",
  "_fileid": "67e97cbc2e4b1ec6bb53cc3b5ad9829cc504f7d4bda79da6a57effedb2f07901",
  "_filesize": 3807659,
  "_sha256": "67e97cbc2e4b1ec6bb53cc3b5ad9829cc504f7d4bda79da6a57effedb2f07901",
  "_created": "2026-06-10T07:27:36.000Z",
  "_published": "2026-06-10T07:39:54.575Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 80504507866,
      "time": 220,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7529233627"
    },
    {
      "job": 80504507868,
      "time": 214,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7529231739"
    },
    {
      "job": 80504507930,
      "time": 163,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7529389620"
    },
    {
      "job": 80504507894,
      "time": 179,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7529368971"
    },
    {
      "job": 80503742754,
      "time": 286,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7529159484"
    },
    {
      "job": 80504507885,
      "time": 183,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7529220588"
    },
    {
      "job": 80504507871,
      "time": 152,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7529210993"
    },
    {
      "job": 80504507902,
      "time": 133,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7529204537"
    },
    {
      "job": 80504507954,
      "time": 131,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7529204153"
    }
  ],
  "_buildurl": "https://github.com/r-universe/kylebutts/actions/runs/27260168099",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/kylebutts/did2s",
  "_commit": {
    "id": "8228c158ef39201cf7c6617201efdec2582f210f",
    "author": "Kyle F Butts <buttskyle96@gmail.com>",
    "committer": "GitHub <noreply@github.com>",
    "message": "Merge pull request #43 from Ph-ADD/main\n\nFix Simple Harmless Typos ",
    "time": 1773351877
  },
  "_maintainer": {
    "name": "Kyle Butts",
    "email": "buttskyle96@gmail.com",
    "login": "kylebutts",
    "twitter": "@kylefbutts",
    "description": "Assistant Professor of Economics\nUniversity of Arkansas",
    "uuid": 19961439,
    "orcid": "0000-0002-9048-8059"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "fixest",
      "version": ">= 0.13.2",
      "role": "Depends"
    },
    {
      "package": "boot",
      "role": "Imports"
    },
    {
      "package": "broom",
      "role": "Imports"
    },
    {
      "package": "data.table",
      "role": "Imports"
    },
    {
      "package": "did",
      "role": "Imports"
    },
    {
      "package": "didimputation",
      "role": "Imports"
    },
    {
      "package": "dreamerr",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "HonestDiD",
      "role": "Imports"
    },
    {
      "package": "Matrix",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "staggered",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "haven",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    }
  ],
  "_owner": "kylebutts",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-35",
      "n": 2
    },
    {
      "week": "2025-38",
      "n": 3
    },
    {
      "week": "2025-50",
      "n": 1
    },
    {
      "week": "2026-11",
      "n": 1
    }
  ],
  "_tags": [],
  "_stars": 111,
  "_contributors": [
    {
      "user": "kylebutts",
      "count": 127,
      "uuid": 19961439
    },
    {
      "user": "grantmcdermott",
      "count": 7,
      "uuid": 10285037
    },
    {
      "user": "sebkrantz",
      "count": 3,
      "uuid": 48053842
    },
    {
      "user": "ph-add",
      "count": 2,
      "uuid": 122570531
    },
    {
      "user": "vnery5",
      "count": 2,
      "uuid": 63151005
    },
    {
      "user": "etiennebacher",
      "count": 1,
      "uuid": 52219252
    }
  ],
  "_userbio": {
    "uuid": 19961439,
    "type": "user",
    "name": "Kyle F Butts",
    "description": "Assistant Professor of Economics\r\nUniversity of Arkansas"
  },
  "_downloads": {
    "count": 1865,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/did2s"
  },
  "_devurl": "https://github.com/kylebutts/did2s",
  "_pkgdown": "https://kylebutts.github.io/did2s/",
  "_searchresults": 284,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/did2s.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/kylebutts/did2s",
  "_realowner": "kylebutts",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.4.0",
      "date": "2021-09-27"
    },
    {
      "version": "0.6.0",
      "date": "2022-04-07"
    },
    {
      "version": "0.7.0",
      "date": "2022-07-21"
    },
    {
      "version": "1.0.0",
      "date": "2023-03-11"
    },
    {
      "version": "1.0.1",
      "date": "2023-03-28"
    },
    {
      "version": "1.0.2",
      "date": "2023-04-07"
    },
    {
      "version": "1.2.0",
      "date": "2025-09-19"
    },
    {
      "version": "1.2.1",
      "date": "2026-03-05"
    }
  ],
  "_exports": [
    "did2s",
    "event_study",
    "gen_data",
    "get_honestdid_obj_did2s",
    "honest_did_did2s",
    "plot_event_study"
  ],
  "_datasets": [
    {
      "name": "castle",
      "title": "Data from Cheng and Hoekstra (2013)",
      "object": "castle",
      "class": [
        "data.frame"
      ],
      "fields": [
        "year",
        "sid",
        "l_homicide",
        "post",
        "effyear",
        "time_til"
      ],
      "rows": 550,
      "table": true,
      "tojson": true
    },
    {
      "name": "df_het",
      "title": "Simulated data with two treatment groups and heterogenous effects",
      "object": "df_het",
      "class": [
        "data.frame"
      ],
      "fields": [
        "unit",
        "state",
        "group",
        "unit_fe",
        "g",
        "year",
        "year_fe",
        "treat",
        "rel_year",
        "rel_year_binned",
        "error",
        "te",
        "te_dynamic",
        "dep_var"
      ],
      "rows": 46500,
      "table": true,
      "tojson": true
    },
    {
      "name": "df_hom",
      "title": "Simulated data with two treatment groups and homogenous effects",
      "object": "df_hom",
      "class": [
        "data.frame"
      ],
      "fields": [
        "unit",
        "state",
        "group",
        "unit_fe",
        "g",
        "year",
        "year_fe",
        "treat",
        "rel_year",
        "rel_year_binned",
        "error",
        "te",
        "te_dynamic",
        "dep_var",
        "weight"
      ],
      "rows": 46500,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "castle",
      "title": "Data from Cheng and Hoekstra (2013)",
      "topics": [
        "castle"
      ]
    },
    {
      "page": "df_het",
      "title": "Simulated data with two treatment groups and heterogenous effects",
      "topics": [
        "df_het"
      ]
    },
    {
      "page": "df_hom",
      "title": "Simulated data with two treatment groups and homogenous effects",
      "topics": [
        "df_hom"
      ]
    },
    {
      "page": "did2s",
      "title": "Calculate two-stage difference-in-differences following Gardner (2021)",
      "topics": [
        "did2s"
      ]
    },
    {
      "page": "event_study",
      "title": "Estimate event-study coefficients using TWFE and 5 proposed improvements.",
      "topics": [
        "event_study",
        "plot_event_study"
      ]
    },
    {
      "page": "gen_data",
      "title": "Generate TWFE data",
      "topics": [
        "gen_data"
      ]
    },
    {
      "page": "get_honestdid_obj_did2s",
      "title": "get_honestdid_obj_did2s",
      "topics": [
        "get_honestdid_obj_did2s"
      ]
    },
    {
      "page": "honest_did_did2s",
      "title": "honest_did_did2s",
      "topics": [
        "honest_did_did2s"
      ]
    },
    {
      "page": "robust_solve_XtX",
      "title": "Robust solve for X'X beta = X'Y using QR decomposition",
      "topics": [
        "robust_solve_XtX"
      ]
    }
  ],
  "_readme": "https://github.com/kylebutts/did2s/raw/HEAD/README.md",
  "_rundeps": [
    "alabama",
    "backports",
    "BH",
    "bigmemory",
    "bigmemory.sri",
    "BMisc",
    "boot",
    "broom",
    "caret",
    "checkmate",
    "clarabel",
    "class",
    "cli",
    "clock",
    "codetools",
    "cpp11",
    "CVXR",
    "data.table",
    "diagram",
    "did",
    "didimputation",
    "digest",
    "dplyr",
    "DRDID",
    "dreamerr",
    "e1071",
    "ECOSolveR",
    "farver",
    "fastglm",
    "fixest",
    "foreach",
    "Formula",
    "future",
    "future.apply",
    "generics",
    "ggplot2",
    "globals",
    "glue",
    "gmp",
    "gower",
    "gtable",
    "hardhat",
    "highs",
    "HonestDiD",
    "ipred",
    "isoband",
    "iterators",
    "KernSmooth",
    "labeling",
    "latex2exp",
    "lattice",
    "lava",
    "lifecycle",
    "listenv",
    "lpSolveAPI",
    "lubridate",
    "magrittr",
    "MASS",
    "Matrix",
    "matrixStats",
    "ModelMetrics",
    "mvtnorm",
    "nleqslv",
    "nlme",
    "nnet",
    "numDeriv",
    "osqp",
    "parallelly",
    "pbapply",
    "pillar",
    "pkgconfig",
    "plyr",
    "pracma",
    "pROC",
    "prodlim",
    "progressr",
    "proxy",
    "purrr",
    "qrng",
    "R6",
    "RColorBrewer",
    "Rcpp",
    "RcppArmadillo",
    "RcppEigen",
    "recipes",
    "reshape2",
    "Rglpk",
    "rlang",
    "rpart",
    "S7",
    "sandwich",
    "scales",
    "scs",
    "shape",
    "slam",
    "spacefillr",
    "sparsevctrs",
    "SQUAREM",
    "staggered",
    "stringi",
    "stringmagic",
    "stringr",
    "survival",
    "tibble",
    "tidyr",
    "tidyselect",
    "timechange",
    "timeDate",
    "TruncatedNormal",
    "trust",
    "tzdb",
    "utf8",
    "uuid",
    "vctrs",
    "viridisLite",
    "withr",
    "zoo"
  ],
  "_vignettes": [
    {
      "source": "Two-Stage-Difference-in-Differences.Rmd",
      "filename": "Two-Stage-Difference-in-Differences.html",
      "title": "Two-Stage Difference-in-Differences",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Two-stage Difference-in-differences, Gardner (2021)",
        "Standard Errors",
        "Anticipation",
        "Covariates",
        "did2s R Package",
        "Example",
        "Estimate Two-stage Difference-in-Differences",
        "Comparison to TWFE",
        "Citation",
        "References"
      ],
      "created": "2021-06-02 05:00:53",
      "modified": "2026-03-12 21:44:37",
      "commits": 12
    }
  ],
  "_score": 8.769320154978402,
  "_indexed": true,
  "_nocasepkg": "did2s",
  "_universes": [
    "kylebutts"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.2.0",
      "date": "2026-06-10T07:30:52.000Z",
      "distro": "noble",
      "commit": "8228c158ef39201cf7c6617201efdec2582f210f",
      "fileid": "5d05e16c16f6e65901f2fb33633b27b12b2e11a2529f3a59282dc2ad6f319f08",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kylebutts/actions/runs/27260168099"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.2.0",
      "date": "2026-06-10T07:30:49.000Z",
      "distro": "noble",
      "commit": "8228c158ef39201cf7c6617201efdec2582f210f",
      "fileid": "015c0080f222e0274a4a86150a6ca216d40c059aee0072558f174d9cc77d984c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kylebutts/actions/runs/27260168099"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.2.0",
      "date": "2026-06-10T07:38:52.000Z",
      "commit": "8228c158ef39201cf7c6617201efdec2582f210f",
      "fileid": "314ca95ec0180956a58fd11fd0c89de1f02652be6d5cca27910f327d7889f5db",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kylebutts/actions/runs/27260168099"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.2.0",
      "date": "2026-06-10T07:37:38.000Z",
      "commit": "8228c158ef39201cf7c6617201efdec2582f210f",
      "fileid": "1171c467b5665e5928560098e5db6d376a721cd4fec20f2277903544209f0d2f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kylebutts/actions/runs/27260168099"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.2.0",
      "date": "2026-06-10T07:30:58.000Z",
      "commit": "8228c158ef39201cf7c6617201efdec2582f210f",
      "fileid": "b913e3b307494e7c5a436c213f2ed6ff6f363274f5d6b0c0cc0267773735d471",
      "status": "success",
      "buildurl": "https://github.com/r-universe/kylebutts/actions/runs/27260168099"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.2.0",
      "date": "2026-06-10T07:29:50.000Z",
      "commit": "8228c158ef39201cf7c6617201efdec2582f210f",
      "fileid": "a6eb997594ed10d1308d6e6b1a3381ca75c33c668e114a649f9c2c17e0f6e5d0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kylebutts/actions/runs/27260168099"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.2.0",
      "date": "2026-06-10T07:29:26.000Z",
      "commit": "8228c158ef39201cf7c6617201efdec2582f210f",
      "fileid": "3a9b09e0cd23454063bd63437bc53e4458b11d9c8d0eb60cf43a074d0497222f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kylebutts/actions/runs/27260168099"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.2.0",
      "date": "2026-06-10T07:29:22.000Z",
      "commit": "8228c158ef39201cf7c6617201efdec2582f210f",
      "fileid": "722c3f5de86f91f1fc0a824c7759bbf58266d6a2a2c208086490b924490ef913",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kylebutts/actions/runs/27260168099"
    }
  ]
}