{
  "_id": "6a650469d7a87e95b9707776",
  "Package": "ptetools",
  "Title": "Panel Treatment Effects Tools",
  "Version": "1.0.2",
  "Authors@R": "person(given = \"Brantly\",\nfamily = \"Callaway\",\nrole = c(\"aut\", \"cre\"),\nemail = \"brantly.callaway@uga.edu\")",
  "URL": "https://github.com/bcallaway11/ptetools",
  "BugReports": "https://github.com/bcallaway11/ptetools/issues",
  "Description": "Generic code for estimating treatment effects with panel\ndata.  The idea is to break into separate steps organizing the\ndata, looping over groups and time periods, computing\ngroup-time average treatment effects, and aggregating\ngroup-time average treatment effects.  Often, one is able to\nimplement a new identification/estimation procedure by simply\nreplacing the step on estimating group-time average treatment\neffects.  See several different examples of this approach in\nthe package documentation.",
  "License": "GPL-3",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "Roxygen": "list(markdown = TRUE)",
  "Config/testthat/edition": "3",
  "Config/roxygen2/version": "8.0.0",
  "Config/pak/sysreqs": "libicu-dev",
  "Repository": "https://bcallaway11.r-universe.dev",
  "Date/Publication": "2026-07-25 18:10:45 UTC",
  "RemoteUrl": "https://github.com/bcallaway11/ptetools",
  "RemoteRef": "HEAD",
  "RemoteSha": "480c3df941a9f57908ff3b9a8bcb4e6a3f03ebbe",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-07-25 18:38:51 UTC",
    "User": "root"
  },
  "Author": "Brantly Callaway [aut, cre]",
  "Maintainer": "Brantly Callaway <brantly.callaway@uga.edu>",
  "_user": "bcallaway11",
  "_type": "src",
  "_file": "ptetools_1.0.2.tar.gz",
  "_fileid": "https://r2.ropensci.org/41993498f1fb259b6a5cdd168195b3b1922247a27ab483fb643116b8c32088fe",
  "_filesize": 484881,
  "_sha256": "41993498f1fb259b6a5cdd168195b3b1922247a27ab483fb643116b8c32088fe",
  "_expires": "2026-11-02T18:45:59.000Z",
  "_created": "2026-07-25T18:38:51.000Z",
  "_published": "2026-07-25T18:46:01.563Z",
  "_jobs": [
    {
      "job": 89709552773,
      "time": 196,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "8622691424"
    },
    {
      "job": 89709552764,
      "time": 194,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8622691287"
    },
    {
      "job": 89709552800,
      "time": 131,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "8622682119"
    },
    {
      "job": 89709552795,
      "time": 122,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8622680774"
    },
    {
      "job": 89709187199,
      "time": 265,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8622662481"
    },
    {
      "job": 89709552784,
      "time": 130,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "8622681853"
    },
    {
      "job": 89709552777,
      "time": 375,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "8622715854"
    },
    {
      "job": 89709552805,
      "time": 334,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "8622710267"
    },
    {
      "job": 89709552802,
      "time": 317,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8622707954"
    }
  ],
  "_host": "GitHub-Actions",
  "_buildurl": "https://github.com/r-universe/bcallaway11/actions/runs/30169897877",
  "_status": "success",
  "_upstream": "https://github.com/bcallaway11/ptetools",
  "_commit": {
    "id": "480c3df941a9f57908ff3b9a8bcb4e6a3f03ebbe",
    "author": "Brantly Callaway <brantly.callaway@uga.edu>",
    "committer": "Brantly Callaway <brantly.callaway@uga.edu>",
    "message": "Fix autoplot.dose_obj() crash from attributed critical value\n\ncrit_val_checks() (added in a4e2899) attaches a \"cband\" attribute to the\ncritical value it returns. process_dose_gt() stored att.d_crit.val and\nacrt.d_crit.val with that attribute still attached, and a length-1 value\ncarrying an extra attribute does not recycle correctly in\ndata.frame()/cbind.data.frame() -- autoplot.dose_obj() combines it with the\nlength(dose) est/se columns, which is exactly what contdid's test suite\n(ggcont_did) hit: \"arguments imply differing number of rows: 90, 1\".\n\nFixed in both places: process_dose_gt() strips the attribute once it's\nbeen read (as.numeric()), and autoplot.dose_obj() also strips it\ndefensively before building the plot data frame, so the plotting code\nisn't fragile to attributes on its inputs regardless of producer. Verified\nagainst contdid 0.1.1's own test suite (was 1 fail, now 0) and added a\nregression test that reproduces the attributed-scalar scenario directly.\n\nCo-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>\n",
    "time": 1785003045
  },
  "_maintainer": {
    "name": "Brantly Callaway",
    "email": "brantly.callaway@uga.edu",
    "login": "bcallaway11",
    "description": "Brantly Callaway, Department of Economics, University of Georgia",
    "uuid": 148795
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "BMisc",
      "version": ">= 1.4.8",
      "role": "Imports"
    },
    {
      "package": "Matrix",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "DRDID",
      "role": "Imports"
    },
    {
      "package": "data.table",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "pbapply",
      "role": "Imports"
    },
    {
      "package": "splines2",
      "role": "Imports"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "did",
      "role": "Suggests"
    }
  ],
  "_owner": "bcallaway11",
  "_selfowned": true,
  "_usedby": 2,
  "_updates": [
    {
      "week": "2025-42",
      "n": 10
    },
    {
      "week": "2026-21",
      "n": 11
    },
    {
      "week": "2026-22",
      "n": 2
    },
    {
      "week": "2026-30",
      "n": 6
    }
  ],
  "_tags": [
    {
      "name": "v1.0.1",
      "date": "2026-07-20"
    }
  ],
  "_stars": 12,
  "_contributors": [
    {
      "user": "bcallaway11",
      "count": 134,
      "uuid": 148795
    },
    {
      "user": "hugosantanna",
      "count": 1,
      "uuid": 47804685
    }
  ],
  "_userbio": {
    "uuid": 148795,
    "type": "user",
    "name": "Brantly Callaway",
    "followers": 385,
    "description": "Brantly Callaway, Department of Economics, University of Georgia"
  },
  "_downloads": {
    "count": 470,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/ptetools"
  },
  "_devurl": "https://github.com/bcallaway11/ptetools",
  "_searchresults": 9,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/ptetools.html",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/bcallaway11/ptetools",
  "_realowner": "bcallaway11",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.0",
      "date": "2025-02-13"
    },
    {
      "version": "1.0.1",
      "date": "2026-07-20"
    }
  ],
  "_exports": [
    "aggte_obj",
    "attgt_if",
    "attgt_noif",
    "attgt_pte_aggregations",
    "compute.pte",
    "covid_attgt",
    "crit_val_checks",
    "did_attgt",
    "did_rcs_attgt",
    "dose_obj",
    "ggpte",
    "ggpte_cont",
    "group_time_att",
    "gt_data_frame",
    "keep_all_pretreatment_subset",
    "keep_all_untreated_subset",
    "mboot2",
    "overall_weights",
    "panel_empirical_bootstrap",
    "process_att_gt",
    "process_dose_gt",
    "pte",
    "pte_aggte",
    "pte_attgt",
    "pte_default",
    "pte_dose_results",
    "pte_emp_boot",
    "pte_params",
    "pte_qtt",
    "pte_results",
    "qott_pte_aggregations",
    "qtt_empirical_bootstrap",
    "qtt_pte_aggregations",
    "setup_pte",
    "setup_pte_basic",
    "two_by_two_rcs_subset",
    "two_by_two_subset"
  ],
  "_datasets": [
    {
      "name": "covid_data",
      "title": "State-level Covid-19 Data",
      "object": "covid_data",
      "class": [
        "grouped_df",
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "positive",
        "time.period",
        "group",
        "state",
        "totalTestResults",
        "state_id",
        "region",
        "retail_and_recreation_percent_change_from_baseline",
        "current"
      ],
      "rows": 1656,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "aggte_obj",
      "title": "Aggregated Treatment Effects Class",
      "topics": [
        "aggte_obj"
      ]
    },
    {
      "page": "attgt_if",
      "title": "Class for (g,t)-Specific Results with Influence Function",
      "topics": [
        "attgt_if"
      ]
    },
    {
      "page": "attgt_noif",
      "title": "Class for (g,t)-Specific Results without Influence Function",
      "topics": [
        "attgt_noif"
      ]
    },
    {
      "page": "attgt_pte_aggregations",
      "title": "Aggregate Group-Time Average Treatment Effects",
      "topics": [
        "attgt_pte_aggregations"
      ]
    },
    {
      "page": "autoplot.dose_obj",
      "title": "autoplot.dose_obj",
      "topics": [
        "autoplot.dose_obj"
      ]
    },
    {
      "page": "autoplot.pte_emp_boot",
      "title": "autoplot.pte_emp_boot",
      "topics": [
        "autoplot.pte_emp_boot"
      ]
    },
    {
      "page": "autoplot.pte_qtt",
      "title": "autoplot.pte_qtt",
      "topics": [
        "autoplot.pte_qtt"
      ]
    },
    {
      "page": "autoplot.pte_results",
      "title": "autoplot.pte_results",
      "topics": [
        "autoplot.pte_results"
      ]
    },
    {
      "page": "compute.pte",
      "title": "Heavy-Lifting for pte Function",
      "topics": [
        "compute.pte"
      ]
    },
    {
      "page": "covid_attgt",
      "title": "Covid ATT(g,t) Estimator",
      "topics": [
        "covid_attgt"
      ]
    },
    {
      "page": "covid_data",
      "title": "State-level Covid-19 Data",
      "topics": [
        "covid_data"
      ]
    },
    {
      "page": "did_attgt",
      "title": "Difference-in-differences for ATT(g,t)",
      "topics": [
        "did_attgt"
      ]
    },
    {
      "page": "did_rcs_attgt",
      "title": "Repeated Cross Sections Difference-in-Differences for ATT(g,t)",
      "topics": [
        "did_rcs_attgt"
      ]
    },
    {
      "page": "dose_obj",
      "title": "Class for Continuous Treatments",
      "topics": [
        "dose_obj"
      ]
    },
    {
      "page": "ggpte",
      "title": "ggpte",
      "topics": [
        "ggpte"
      ]
    },
    {
      "page": "ggpte_cont",
      "title": "ggpte_cont",
      "topics": [
        "ggpte_cont"
      ]
    },
    {
      "page": "group_time_att",
      "title": "Class for Estimates across Groups and Time",
      "topics": [
        "group_time_att"
      ]
    },
    {
      "page": "gt_data_frame",
      "title": "Convert Data to Usable Format",
      "topics": [
        "gt_data_frame"
      ]
    },
    {
      "page": "keep_all_pretreatment_subset",
      "title": "Keep All Pre-Treatment Subset",
      "topics": [
        "keep_all_pretreatment_subset"
      ]
    },
    {
      "page": "keep_all_untreated_subset",
      "title": "Keep All Untreated Subset",
      "topics": [
        "keep_all_untreated_subset"
      ]
    },
    {
      "page": "mboot2",
      "title": "Multiplier Bootstrap",
      "topics": [
        "mboot2"
      ]
    },
    {
      "page": "overall_weights",
      "title": "Weights for Overall Aggregation",
      "topics": [
        "overall_weights"
      ]
    },
    {
      "page": "panel_empirical_bootstrap",
      "title": "Panel Empirical Bootstrap",
      "topics": [
        "panel_empirical_bootstrap"
      ]
    },
    {
      "page": "plot.dose_obj",
      "title": "plot.dose_obj",
      "topics": [
        "plot.dose_obj"
      ]
    },
    {
      "page": "plot.pte_emp_boot",
      "title": "plot.pte_emp_boot",
      "topics": [
        "plot.pte_emp_boot"
      ]
    },
    {
      "page": "plot.pte_qtt",
      "title": "plot.pte_qtt",
      "topics": [
        "plot.pte_qtt"
      ]
    },
    {
      "page": "plot.pte_results",
      "title": "plot.pte_results",
      "topics": [
        "plot.pte_results"
      ]
    },
    {
      "page": "process_att_gt",
      "title": "Process ATT(g,t) Results",
      "topics": [
        "process_att_gt"
      ]
    },
    {
      "page": "process_dose_gt",
      "title": "Process Results with a Continuous Treatment",
      "topics": [
        "process_dose_gt"
      ]
    },
    {
      "page": "pte",
      "title": "Panel Treatment Effects",
      "topics": [
        "ptetools-package",
        "pte",
        "ptetools"
      ]
    },
    {
      "page": "pte_aggte",
      "title": "Aggregates (g,t)-Specific Results",
      "topics": [
        "pte_aggte"
      ]
    },
    {
      "page": "pte_attgt",
      "title": "General ATT(g,t)",
      "topics": [
        "pte_attgt"
      ]
    },
    {
      "page": "pte_default",
      "title": "Default, General Function for Computing Treatment Effects with Panel Data",
      "topics": [
        "pte_default"
      ]
    },
    {
      "page": "pte_dose_results",
      "title": "Class for Continuous Treatment Results",
      "topics": [
        "pte_dose_results"
      ]
    },
    {
      "page": "pte_emp_boot",
      "title": "Class for Empirical Bootstrap Results",
      "topics": [
        "pte_emp_boot"
      ]
    },
    {
      "page": "pte_params",
      "title": "PTE Parameters Class",
      "topics": [
        "pte_params"
      ]
    },
    {
      "page": "pte_qtt",
      "title": "Class for QTT Curve Results",
      "topics": [
        "pte_qtt"
      ]
    },
    {
      "page": "pte_results",
      "title": "Class for PTE Results",
      "topics": [
        "pte_results"
      ]
    },
    {
      "page": "qott_pte_aggregations",
      "title": "Aggregate Group-Time Quantile of the Treatment Effect",
      "topics": [
        "qott_pte_aggregations"
      ]
    },
    {
      "page": "qtt_empirical_bootstrap",
      "title": "Empirical Bootstrap for QTT Curves",
      "topics": [
        "qtt_empirical_bootstrap"
      ]
    },
    {
      "page": "qtt_pte_aggregations",
      "title": "Aggregate Group-Time Quantile Treatment Effects",
      "topics": [
        "qtt_pte_aggregations"
      ]
    },
    {
      "page": "setup_pte",
      "title": "Generic Setup Function",
      "topics": [
        "setup_pte"
      ]
    },
    {
      "page": "setup_pte_basic",
      "title": "Basic Setup Function",
      "topics": [
        "setup_pte_basic"
      ]
    },
    {
      "page": "two_by_two_rcs_subset",
      "title": "Two Period Two Group Repeated Cross Sections Subset",
      "topics": [
        "two_by_two_rcs_subset"
      ]
    },
    {
      "page": "two_by_two_subset",
      "title": "Two Period Two Group Subset",
      "topics": [
        "two_by_two_subset"
      ]
    }
  ],
  "_pkglogo": "https://github.com/bcallaway11/ptetools/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/bcallaway11/ptetools/raw/HEAD/README.md",
  "_rundeps": [
    "BH",
    "bigmemory",
    "bigmemory.sri",
    "BMisc",
    "cli",
    "cpp11",
    "data.table",
    "dplyr",
    "DRDID",
    "farver",
    "fastglm",
    "Formula",
    "generics",
    "ggplot2",
    "glue",
    "gtable",
    "isoband",
    "labeling",
    "lattice",
    "lifecycle",
    "magrittr",
    "Matrix",
    "pbapply",
    "pillar",
    "pkgconfig",
    "purrr",
    "R6",
    "RColorBrewer",
    "Rcpp",
    "RcppArmadillo",
    "RcppEigen",
    "rlang",
    "S7",
    "scales",
    "splines2",
    "stringi",
    "stringr",
    "tibble",
    "tidyr",
    "tidyselect",
    "trust",
    "utf8",
    "uuid",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_score": 5.15836249209525,
  "_indexed": true,
  "_nocasepkg": "ptetools",
  "_universes": [
    "bcallaway11"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.0.2",
      "date": "2026-07-25T18:41:31.000Z",
      "distro": "resolute",
      "commit": "480c3df941a9f57908ff3b9a8bcb4e6a3f03ebbe",
      "fileid": "https://r2.ropensci.org/53413a1518ec852018b9c233556e690f6cb63c5914d9947aedf1a63b6eacee05",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bcallaway11/actions/runs/30169897877"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "1.0.2",
      "date": "2026-07-25T18:41:30.000Z",
      "distro": "resolute",
      "commit": "480c3df941a9f57908ff3b9a8bcb4e6a3f03ebbe",
      "fileid": "https://r2.ropensci.org/87fe13efdddf658170185047f6367dfdb42d10ea940221bc48d4c138564687cf",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bcallaway11/actions/runs/30169897877"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.0.2",
      "date": "2026-07-25T18:40:45.000Z",
      "commit": "480c3df941a9f57908ff3b9a8bcb4e6a3f03ebbe",
      "fileid": "https://r2.ropensci.org/5b5219f246d831ad9c5d197bf48203600840aaab4856859f5b2d595a1f339f49",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bcallaway11/actions/runs/30169897877"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "1.0.2",
      "date": "2026-07-25T18:40:35.000Z",
      "commit": "480c3df941a9f57908ff3b9a8bcb4e6a3f03ebbe",
      "fileid": "https://r2.ropensci.org/affc9a8600000b9e0aa74dc96813f0a43af61a351d193f9a16ed2c68acdd837b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bcallaway11/actions/runs/30169897877"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.0.2",
      "date": "2026-07-25T18:41:25.000Z",
      "commit": "480c3df941a9f57908ff3b9a8bcb4e6a3f03ebbe",
      "fileid": "https://r2.ropensci.org/37f219b026a7df5ef163c7f5b92426038b0c7fb999833a92363f6268fbe7c5c5",
      "status": "success",
      "buildurl": "https://github.com/r-universe/bcallaway11/actions/runs/30169897877"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.0.2",
      "date": "2026-07-25T18:44:11.000Z",
      "commit": "480c3df941a9f57908ff3b9a8bcb4e6a3f03ebbe",
      "fileid": "https://r2.ropensci.org/bba2ac9ef5ffad61dd7a8f531cc5e87f05faf9c857730a9c3ea0642d17a45d42",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bcallaway11/actions/runs/30169897877"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.0.2",
      "date": "2026-07-25T18:43:39.000Z",
      "commit": "480c3df941a9f57908ff3b9a8bcb4e6a3f03ebbe",
      "fileid": "https://r2.ropensci.org/87288e66a84e0a11a465052e572bbbc46bcc931f9d2b7b14bc20119adfa8276a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bcallaway11/actions/runs/30169897877"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "1.0.2",
      "date": "2026-07-25T18:43:20.000Z",
      "commit": "480c3df941a9f57908ff3b9a8bcb4e6a3f03ebbe",
      "fileid": "https://r2.ropensci.org/a9793ed5298bcf48dc1dcde860a07aafe4f1aa80089bd932b9a2d088adbacb50",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bcallaway11/actions/runs/30169897877"
    }
  ]
}