{
  "_id": "6af41274b90b31e79afd3374",
  "Package": "dbreg",
  "Type": "Package",
  "Title": "Fast Regressions on Database Backends",
  "Version": "0.0.3.99",
  "Date": "2026-03-16",
  "Authors@R": "c(\nperson(\ngiven = \"Grant\",\nfamily = \"McDermott\",\nrole = c(\"aut\", \"cre\"),\nemail = \"contact@grantmcdermott.com\",\ncomment = c(ORCID = \"0000-0001-7883-8573\")\n),\nperson(\ngiven = \"James\",\nfamil = \"Brand\",\nemail = \"jamesbrandecon@gmail.com\",\nrole = c(\"aut\"),\ncomment = c(ORCID = \"0000-0002-1663-5583\")\n),\nperson(\ngiven = \"Apoorva\",\nfamil = \"Lal\",\nemail = \"lal.apoorva@gmail.com\",\nrole = c(\"ctb\"),\ncomment = c(ORCID = \"0000-0002-3697-614X\")\n),\nperson(\ngiven = \"Laurent\",\nfamil = \"Berge\",\nemail = \"laurent.berge@u-bordeaux.fr\",\nrole = c(\"ctb\")\n),\nperson(\ngiven = \"Wojtek\",\nfamil = \"Klimowicz\",\nemail = \"wojtekklimowicz96@gmail.com\",\nrole = c(\"ctb\")\n)\n)",
  "Description": "Leverages database backends to run regressions on very\nlarge datasets, which may not fit into R's memory. Various\nacceleration strategies---e.g., Wong et al. (2021)\n<doi:10.48550/arXiv.2102.11297> and Arkhangelsky & Imbens\n(2024) <https://doi.org/10.1093/restud/rdad089>---allow for\nhighly efficient computation, while robust standard errors are\ncomputed from sufficient statistics.",
  "Config/Needs/website": "etiennebacher/altdoc",
  "Encoding": "UTF-8",
  "License": "MIT + file LICENSE",
  "URL": "https://grantmcdermott.com/dbreg/",
  "BugReports": "https://github.com/grantmcdermott/dbreg/issues",
  "VignetteBuilder": "quarto",
  "Config/roxygen2/version": "8.1.0",
  "Repository": "https://grantmcdermott.r-universe.dev",
  "Date/Publication": "2026-11-11 05:21:44 UTC",
  "RemoteUrl": "https://github.com/grantmcdermott/dbreg",
  "RemoteRef": "HEAD",
  "RemoteSha": "ef061a3cc18744c1756bb89ff55a51042893a611",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-11-11 06:27:04 UTC",
    "User": "root"
  },
  "Author": "Grant McDermott [aut, cre] (ORCID:\n<https://orcid.org/0000-0001-7883-8573>),\nJames Brand [aut] (ORCID: <https://orcid.org/0000-0002-1663-5583>),\nApoorva Lal [ctb] (ORCID: <https://orcid.org/0000-0002-3697-614X>),\nLaurent Berge [ctb],\nWojtek Klimowicz [ctb]",
  "Maintainer": "Grant McDermott <contact@grantmcdermott.com>",
  "_user": "grantmcdermott",
  "_type": "src",
  "_file": "dbreg_0.0.3.99.tar.gz",
  "_fileid": "https://r2.ropensci.org/3782cf97576c4994e81ba1d3e9b72cd2c461a03bdd19942d37acd6d562de9699",
  "_filesize": 440865,
  "_sha256": "3782cf97576c4994e81ba1d3e9b72cd2c461a03bdd19942d37acd6d562de9699",
  "_expires": "2027-02-19T07:00:02.000Z",
  "_created": "2026-11-11T06:27:04.000Z",
  "_published": "2026-11-11T07:00:04.603Z",
  "_upstream": "https://github.com/grantmcdermott/dbreg",
  "_status": "success",
  "_maintainer": {
    "name": "Grant McDermott",
    "email": "contact@grantmcdermott.com",
    "orcid": "0000-0001-7883-8573"
  },
  "_jobs": [
    {
      "job": 130364169857,
      "time": 218,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "13834311193"
    },
    {
      "job": 130364169881,
      "time": 165,
      "config": "linux-release-x86_64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13834136821"
    },
    {
      "job": 130364169853,
      "time": 1938,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "13836165108"
    },
    {
      "job": 130364169816,
      "time": 144,
      "config": "macos-release-arm64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13834326080"
    },
    {
      "job": 130362966713,
      "time": 191,
      "config": "source",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13833782301"
    },
    {
      "job": 130364169781,
      "time": 100,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "13834625186"
    },
    {
      "job": 130364169932,
      "time": 164,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "13833967214"
    },
    {
      "job": 130364169976,
      "time": 141,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "13833947265"
    },
    {
      "job": 130364169868,
      "time": 106,
      "config": "windows-release-x86_64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13834246452"
    }
  ],
  "_buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/42972146289",
  "_commit": {
    "id": "ef061a3cc18744c1756bb89ff55a51042893a611",
    "author": "Grant McDermott <gmcd@amazon.com>",
    "committer": "GitHub <noreply@github.com>",
    "message": "Run unconstrained dbbinsreg() in the database (#86)\n\n* Run unconstrained dbbinsreg() in the database\n\nUnconstrained binscatters (smooth = 0) used to fetch every row into R and\ncompute bin geometry, the polynomial basis and the fit there. They now\nstay in the database: bin assignment is a subquery, geometry is one\nGROUP BY, the basis columns are SQL CASE expressions, and the fit is\ndbreg(table = <subquery>, conn = conn), so compress reduces the data\nbefore anything returns to R.\n\nThis also fixes dbbinsreg() on non-DuckDB backends (Spark, SQLite),\nwhich errored because the in-memory binned data was passed to dbreg()\ntogether with the user's connection.\n\nResults are unchanged (checked on 15 DuckDB configurations and the NYC\ntaxi data). NYC taxi, 178M rows, DuckDB, 32 threads: README example\n76s -> 21s; degree-1 fit with a control 714s -> 3s.\n\n* dbbinsreg(): fix review issues and use moments when compression is poor\n\nAddresses the Copilot review on #86:\n\n- Return x as a double from the binned subquery, so geometry and basis\n  arithmetic don't use integer division (SQLite, Postgres, SQL Server)\n  or overflow on integer columns.\n- Look up per-bin slope coefficients by bin id rather than factor code.\n  Slopes were matched to the wrong bins when a bin was empty or dropped\n  (also wrong before #86 for empty bins).\n- Use u = 0 for single-valued bins in the prediction and SE closures, so\n  they return the bin mean instead of NaN.\n- Backend-aware integer cast for bin labels (MySQL needs SIGNED).\n- Without FE, pass strategy = \"auto\" through to dbreg(), which picks\n  moments when the binned data don't compress well (e.g. continuous x\n  with p > 0), instead of always compressing. Results are identical.\n  With FE, keep compress (demean drops the FE reference level).\n\nAdds test_dbbinsreg_backends.R (RSQLite added to Suggests).\n\n* dbbinsreg(): materialize NTILE bins once; clear error with no estimable bins\n\nFrom the second Copilot review on #86:\n\n- Quantile (NTILE) bins depend on row",
    "time": 1794374504
  },
  "_distro": "resolute",
  "_host": "GitHub-Actions",
  "_registered": true,
  "_dependencies": [
    {
      "package": "DBI",
      "role": "Imports"
    },
    {
      "package": "duckdb",
      "role": "Imports"
    },
    {
      "package": "Formula",
      "role": "Imports"
    },
    {
      "package": "generics",
      "role": "Imports"
    },
    {
      "package": "glue",
      "role": "Imports"
    },
    {
      "package": "MASS",
      "role": "Imports"
    },
    {
      "package": "Matrix",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "tinyplot",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "binsreg",
      "role": "Suggests"
    },
    {
      "package": "here",
      "role": "Suggests"
    },
    {
      "package": "fixest",
      "version": ">= 0.13.0",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "quarto",
      "role": "Suggests"
    },
    {
      "package": "RSQLite",
      "role": "Suggests"
    },
    {
      "package": "tinytest",
      "role": "Suggests"
    },
    {
      "package": "dbplyr",
      "role": "Enhances"
    }
  ],
  "_owner": "grantmcdermott",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-50",
      "n": 1
    },
    {
      "week": "2025-51",
      "n": 4
    },
    {
      "week": "2025-52",
      "n": 3
    },
    {
      "week": "2026-01",
      "n": 3
    },
    {
      "week": "2026-02",
      "n": 6
    },
    {
      "week": "2026-03",
      "n": 2
    },
    {
      "week": "2026-04",
      "n": 3
    },
    {
      "week": "2026-05",
      "n": 2
    },
    {
      "week": "2026-11",
      "n": 1
    },
    {
      "week": "2026-12",
      "n": 1
    },
    {
      "week": "2026-21",
      "n": 4
    },
    {
      "week": "2026-42",
      "n": 9
    },
    {
      "week": "2026-43",
      "n": 3
    },
    {
      "week": "2026-44",
      "n": 1
    },
    {
      "week": "2026-46",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "v0.0.3",
      "date": "2026-01-24"
    }
  ],
  "_stars": 82,
  "_contributors": [
    {
      "user": "grantmcdermott",
      "count": 120,
      "uuid": 10285037
    },
    {
      "user": "jamesbrandecon",
      "count": 12,
      "uuid": 62019331
    },
    {
      "user": "wklimowicz",
      "count": 4,
      "uuid": 62679873
    },
    {
      "user": "etiennebacher",
      "count": 2,
      "uuid": 52219252
    }
  ],
  "_userbio": {
    "uuid": 10285037,
    "type": "user",
    "name": "Grant McDermott",
    "followers": 923,
    "description": "Principal Economist at Amazon. Mix of economics, data science, and open source."
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/dbreg"
  },
  "_devurl": "https://github.com/grantmcdermott/dbreg",
  "_pkgdown": "https://grantmcdermott.com/dbreg/",
  "_searchresults": 30,
  "_rbuild": "4.6.2",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/dbreg.html",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE"
  ],
  "_cranurl": false,
  "_exports": [
    "dbbinsreg",
    "dbivreg",
    "dbreg",
    "glance",
    "gof",
    "sql_model_matrix",
    "tidy"
  ],
  "_help": [
    {
      "page": "coef.dbreg",
      "title": "Extract coefficients from dbreg objects",
      "topics": [
        "coef.dbreg"
      ]
    },
    {
      "page": "confint.dbreg",
      "title": "Confidence intervals for dbreg objects",
      "topics": [
        "confint.dbreg"
      ]
    },
    {
      "page": "dbbinsreg",
      "title": "Run a binscatter regression on a database backend and plot the result",
      "topics": [
        "dbbinsreg"
      ]
    },
    {
      "page": "dbivreg",
      "title": "Instrumental-variables regression on a database backend",
      "topics": [
        "dbivreg"
      ]
    },
    {
      "page": "dbreg",
      "title": "Run a regression on a database backend",
      "topics": [
        "dbreg"
      ]
    },
    {
      "page": "dbreg-options",
      "title": "Global options",
      "topics": [
        "dbreg-options"
      ]
    },
    {
      "page": "gof",
      "title": "Calculate goodness-of-fit metrics for dbreg objects",
      "topics": [
        "gof"
      ]
    },
    {
      "page": "plot.dbbinsreg",
      "title": "Plot method for dbbinsreg objects",
      "topics": [
        "plot.dbbinsreg",
        "tinyplot.dbbinsreg"
      ]
    },
    {
      "page": "predict.dbreg",
      "title": "Predict method for dbreg objects",
      "topics": [
        "predict.dbreg"
      ]
    },
    {
      "page": "print.dbbinsreg",
      "title": "Print method for dbbinsreg objects (binsreg-compatible format)",
      "topics": [
        "print.dbbinsreg"
      ]
    },
    {
      "page": "print.dbivreg",
      "title": "Print method for 'dbivreg' objects",
      "topics": [
        "print.dbivreg"
      ]
    },
    {
      "page": "print.dbreg",
      "title": "Print method for dbreg objects",
      "topics": [
        "print.dbreg"
      ]
    },
    {
      "page": "sql_model_matrix",
      "title": "Construct SQL expressions for a design matrix",
      "topics": [
        "sql_model_matrix"
      ]
    },
    {
      "page": "tidiers",
      "title": "Tidiers for `dbreg` objects",
      "topics": [
        "glance.dbreg",
        "tidiers",
        "tidy.dbreg"
      ]
    },
    {
      "page": "vcov.dbreg",
      "title": "Variance-covariance matrix for dbreg objects",
      "topics": [
        "vcov.dbreg"
      ]
    }
  ],
  "_readme": "https://github.com/grantmcdermott/dbreg/raw/HEAD/README.md",
  "_rundeps": [
    "DBI",
    "duckdb",
    "Formula",
    "generics",
    "glue",
    "lattice",
    "MASS",
    "Matrix",
    "tinyplot"
  ],
  "_score": 5.743117625214742,
  "_indexed": true,
  "_nocasepkg": "dbreg",
  "_universes": [
    "grantmcdermott"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.0.3.99",
      "date": "2026-11-11T06:29:42.000Z",
      "distro": "resolute",
      "commit": "ef061a3cc18744c1756bb89ff55a51042893a611",
      "fileid": "https://r2.ropensci.org/bf79a1a2491fc937569ea1491bea4e7de04026997ed0f92923e1299a1b19a735",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/42972146289"
    },
    {
      "r": "4.6.2",
      "os": "linux",
      "version": "0.0.3.99",
      "date": "2026-11-11T06:29:08.000Z",
      "distro": "resolute",
      "commit": "ef061a3cc18744c1756bb89ff55a51042893a611",
      "fileid": "https://r2.ropensci.org/eb8391ff9adf8940096a4a901f446cabd991bbb31905ad61137ce163dd4f401c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/42972146289"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.0.3.99",
      "date": "2026-11-11T06:58:37.000Z",
      "commit": "ef061a3cc18744c1756bb89ff55a51042893a611",
      "fileid": "https://r2.ropensci.org/c366a67cd04d286b85a7e590af1e75179ee2ef4c4f9043f3155452de54e53ab9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/42972146289"
    },
    {
      "r": "4.6.2",
      "os": "mac",
      "version": "0.0.3.99",
      "date": "2026-11-11T06:28:49.000Z",
      "commit": "ef061a3cc18744c1756bb89ff55a51042893a611",
      "fileid": "https://r2.ropensci.org/acf929b76745fbf76c66a639ca92d95ba125bd3c58a207902d0ddbf1531a3457",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/42972146289"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.0.3.99",
      "date": "2026-11-11T06:29:07.000Z",
      "commit": "ef061a3cc18744c1756bb89ff55a51042893a611",
      "fileid": "https://r2.ropensci.org/d1653631ea1d0249afdcf1bd7e237874c6fd81843e5255b16897d6ce84807a21",
      "status": "success",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/42972146289"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.0.3.99",
      "date": "2026-11-11T06:28:43.000Z",
      "commit": "ef061a3cc18744c1756bb89ff55a51042893a611",
      "fileid": "https://r2.ropensci.org/ba47525893849b206e8247697781af12d8d40e863b11a7d9fd4c8fc6dc9cbd0a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/42972146289"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.0.3.99",
      "date": "2026-11-11T06:28:22.000Z",
      "commit": "ef061a3cc18744c1756bb89ff55a51042893a611",
      "fileid": "https://r2.ropensci.org/b88523792c2b4845cf958f0b5839e626a395749edd8b6011665a56574dca8b36",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/42972146289"
    },
    {
      "r": "4.6.2",
      "os": "win",
      "version": "0.0.3.99",
      "date": "2026-11-11T06:28:13.000Z",
      "commit": "ef061a3cc18744c1756bb89ff55a51042893a611",
      "fileid": "https://r2.ropensci.org/50401727bbc9375f6c423d5276583ec4cae810258783e3e4017038442bbf97bd",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/42972146289"
    }
  ]
}