{
  "_id": "6a3662213efcd9bda4406183",
  "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)\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.0.0",
  "Config/pak/sysreqs": "xz-utils",
  "Repository": "https://grantmcdermott.r-universe.dev",
  "Date/Publication": "2026-05-21 19:39:46 UTC",
  "RemoteUrl": "https://github.com/grantmcdermott/dbreg",
  "RemoteRef": "HEAD",
  "RemoteSha": "26ab3226aebb324a9f9d6943fafb6366d21e2042",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-06-20 09:00:38 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]",
  "Maintainer": "Grant McDermott <contact@grantmcdermott.com>",
  "MD5sum": "4dabaa062a836b5c3f6d257ed235f1a0",
  "_user": "grantmcdermott",
  "_type": "src",
  "_file": "dbreg_0.0.3.99.tar.gz",
  "_fileid": "dbd0d1d3ca0f0a012a4c87a42c13b34be4024ef0f969d2f932de75a4444521b9",
  "_filesize": 383579,
  "_sha256": "dbd0d1d3ca0f0a012a4c87a42c13b34be4024ef0f969d2f932de75a4444521b9",
  "_created": "2026-06-20T09:00:38.000Z",
  "_published": "2026-06-20T09:49:21.492Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 82471039203,
      "time": 181,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7763924369"
    },
    {
      "job": 82471039192,
      "time": 178,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7763923967"
    },
    {
      "job": 82471039202,
      "time": 102,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7763917896"
    },
    {
      "job": 82471039220,
      "time": 118,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7763922433"
    },
    {
      "job": 82470850952,
      "time": 184,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7763902622"
    },
    {
      "job": 82471039186,
      "time": 114,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7763916930"
    },
    {
      "job": 82471039233,
      "time": 2887,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7764250865"
    },
    {
      "job": 82471039201,
      "time": 2831,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7764244479"
    },
    {
      "job": 82471039245,
      "time": 110,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7763916582"
    }
  ],
  "_buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/27866299831",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/grantmcdermott/dbreg",
  "_commit": {
    "id": "26ab3226aebb324a9f9d6943fafb6366d21e2042",
    "author": "Grant McDermott <grant.mcdermott@gmail.com>",
    "committer": "GitHub <noreply@github.com>",
    "message": "Refactor: inputs environment + code modularization (#65)\n\n* refactor: convert inputs from list to environment\n\nUse list2env() in process_dbreg_inputs() so that downstream functions\n(choose_strategy, execute_*_strategy) can mutate shared state in place.\nThis fixes a latent bug where choose_strategy() mutations (is_balanced,\ncompression_ratio_est) were silently lost due to R's copy-on-modify\nlist semantics.\n\nAlso adds env2env() helper (from tinyplot) for explicit read/write\ncontracts between functions and environments.\n\n* refactor: replace inputs$ access with inputs[[\"\"]]\n\nAvoid partial matching and align with tinyplot's convention of using\n[[ for element access on environments and lists. Also extracts yvar\nas a local variable in execute_demean_strategy to avoid quoting\nconflicts inside glue() interpolation.\n\n* refactor: replace $ with [[ access, convert dbbinsreg inputs to env\n\n- Replace all inputs$ with inputs[[\"\"]] in both dbreg.R and dbbinsreg.R\n  to avoid partial matching (aligns with tinyplot convention)\n- Convert dbbinsreg inputs from list to environment for consistency\n- Document the inputs environment pattern in CLAUDE.md and\n  process_dbreg_inputs() roxygen\n\n* refactor: extract vcov/meat functions to R/vcov.R\n\nMove compute_vcov(), compute_meat_sql(), compute_meat_cluster_sql(),\nand compute_meat_cluster_compress() from dbreg.R to a dedicated\nvcov.R file. These are shared across all strategies and have a\nwell-defined interface, making them a natural extraction target.\n\nAlso converts dbbinsreg inputs to environment and documents the\ninputs environment pattern in CLAUDE.md.\n\n* refactor: extract strategies to R/strategies.R, move gen_xvar_pairs to utils\n\nMove execute_moments_strategy(), execute_demean_strategy(),\nexecute_mundlak_strategy(), execute_compress_strategy(), and\ncount_nested_fe_levels() to R/strategies.R. Move gen_xvar_pairs()\nto R/utils.R (shared by strategies and SQL helpers).\n\ndbreg.R is now ~1040 lines (down from ~2600): public API, input\nprocessin",
    "time": 1779392386
  },
  "_maintainer": {
    "name": "Grant McDermott",
    "email": "contact@grantmcdermott.com",
    "orcid": "0000-0001-7883-8573"
  },
  "_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": "binsreg",
      "role": "Suggests"
    },
    {
      "package": "here",
      "role": "Suggests"
    },
    {
      "package": "fixest",
      "version": ">= 0.13.0",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "quarto",
      "role": "Suggests"
    },
    {
      "package": "tinytest",
      "role": "Suggests"
    },
    {
      "package": "dbplyr",
      "role": "Enhances"
    }
  ],
  "_owner": "grantmcdermott",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-34",
      "n": 6
    },
    {
      "week": "2025-35",
      "n": 11
    },
    {
      "week": "2025-42",
      "n": 1
    },
    {
      "week": "2025-44",
      "n": 1
    },
    {
      "week": "2025-45",
      "n": 1
    },
    {
      "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
    }
  ],
  "_tags": [
    {
      "name": "v0.0.3",
      "date": "2026-01-24"
    }
  ],
  "_stars": 79,
  "_contributors": [
    {
      "user": "grantmcdermott",
      "count": 109,
      "uuid": 10285037
    },
    {
      "user": "jamesbrandecon",
      "count": 11,
      "uuid": 62019331
    },
    {
      "user": "etiennebacher",
      "count": 2,
      "uuid": 52219252
    }
  ],
  "_userbio": {
    "uuid": 10285037,
    "type": "user",
    "name": "Grant McDermott",
    "followers": 904,
    "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": 20,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/dbreg.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE",
    "manual.pdf"
  ],
  "_cranurl": false,
  "_exports": [
    "dbbinsreg",
    "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": "dbreg",
      "title": "Run a regression on a database backend",
      "topics": [
        "dbreg"
      ]
    },
    {
      "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.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.402777069610347,
  "_indexed": true,
  "_nocasepkg": "dbreg",
  "_universes": [
    "grantmcdermott"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.0.3.99",
      "date": "2026-06-20T09:03:07.000Z",
      "distro": "noble",
      "commit": "26ab3226aebb324a9f9d6943fafb6366d21e2042",
      "fileid": "f5d4ff06fe4e5c3001dfb9995768793a182febb8bfd0ff23bcdb4340e0b1d95f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/27866299831"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.0.3.99",
      "date": "2026-06-20T09:03:05.000Z",
      "distro": "noble",
      "commit": "26ab3226aebb324a9f9d6943fafb6366d21e2042",
      "fileid": "d66195438133fc21ebd89382fa0b7fac1e9bc22d7b93797eb54b9182d936f254",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/27866299831"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.0.3.99",
      "date": "2026-06-20T09:02:32.000Z",
      "commit": "26ab3226aebb324a9f9d6943fafb6366d21e2042",
      "fileid": "efe2b89fa52aca9ba059d7bce361e243c4f7675e151e3f8d160179543195e8ff",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/27866299831"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.0.3.99",
      "date": "2026-06-20T09:03:07.000Z",
      "commit": "26ab3226aebb324a9f9d6943fafb6366d21e2042",
      "fileid": "2e3ac3e4b2efdeb476c97fec4360d41bf1332d1f9fed80365ac25b59ba35c936",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/27866299831"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.0.3.99",
      "date": "2026-06-20T09:02:51.000Z",
      "commit": "26ab3226aebb324a9f9d6943fafb6366d21e2042",
      "fileid": "218160235a57377cd8b705266eb90a84fae3a691c4998b5992a53a46ef462cfd",
      "status": "success",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/27866299831"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.0.3.99",
      "date": "2026-06-20T09:48:12.000Z",
      "commit": "26ab3226aebb324a9f9d6943fafb6366d21e2042",
      "fileid": "af5df7e4f8125ce0425be34dfdbbd39b4ab73dc4c40d47aaec297cf1a824119b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/27866299831"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.0.3.99",
      "date": "2026-06-20T09:47:16.000Z",
      "commit": "26ab3226aebb324a9f9d6943fafb6366d21e2042",
      "fileid": "5f764eabfc7426aef855d937098cbd709e63607f26e7e1ffc69950bcfd0c5fe8",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/27866299831"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.0.3.99",
      "date": "2026-06-20T09:01:53.000Z",
      "commit": "26ab3226aebb324a9f9d6943fafb6366d21e2042",
      "fileid": "d0be97c05f3191e46cd8fcc777bf69da3f5d562452b4e9cea1495837a726de9a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/grantmcdermott/actions/runs/27866299831"
    }
  ]
}