{
  "_id": "6ac9ee5ffe5cc25786e82ebe",
  "Package": "CausalState",
  "Type": "Package",
  "Title": "Causal Inference in a Longitudinal Transitioning State\nEnvironment",
  "Version": "0.10.2",
  "Authors@R": "person(given = \"Sebastiaan\",\nfamily = \"Blank\",\nrole = c(\"aut\", \"cre\", \"cph\"),\nemail = \"sebastiaan.blank@mail.com\",\ncomment = c(ORCID = \"0000-0001-9115-2138\"))",
  "Description": "Implements Sequential Doubly Robust (SDR) and\ninfinite-dimensional Targeted Maximum Likelihood (iTMLE)\nestimators for longitudinal modified treatment policies in\nsettings with transitioning states, such as ICU, ward, or\nemergency department care episodes. Treatment is permitted in\nactive states and becomes structurally inapplicable after a\nstate transition (e.g. discharge or death). Supports asymmetric\ng- and Q-model regularisation, k-fold cross-fitting, and\npluggable SuperLearner ensembles. Includes specialised\nSuperLearner wrappers (SL.tgt.* and SL.tmle_* families) for the\niTMLE targeting step, which pass the logit offset as a\ncovariate column to preserve correct subsetting during\nSuperLearner cross-validation. Methods based on Diaz et al.\n(2021) <doi:10.1080/01621459.2021.1955691> and Luedtke et al.\n(2017) <doi:10.48550/arXiv.1705.02459>.",
  "URL": "https://github.com/sebastiaan-blank/CausalState",
  "BugReports": "https://github.com/sebastiaan-blank/CausalState/issues",
  "License": "AGPL-3",
  "Encoding": "UTF-8",
  "Config/testthat/edition": "3",
  "VignetteBuilder": "knitr",
  "Roxygen": "list(markdown = TRUE, roclets = c(\"collate\", \"rd\"))",
  "Config/roxygen2/version": "8.0.0",
  "Config/pak/sysreqs": "make libicu-dev",
  "Repository": "https://sebastiaan-blank.r-universe.dev",
  "Date/Publication": "2026-10-05 05:41:49 UTC",
  "RemoteUrl": "https://github.com/sebastiaan-blank/causalstate",
  "RemoteRef": "HEAD",
  "RemoteSha": "45ab7facea83e319c8e7b95ecbf772939a0afa7d",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-10-10 07:37:14 UTC",
    "User": "root"
  },
  "Author": "Sebastiaan Blank [aut, cre, cph] (ORCID:\n<https://orcid.org/0000-0001-9115-2138>)",
  "Maintainer": "Sebastiaan Blank <sebastiaan.blank@mail.com>",
  "_user": "sebastiaan-blank",
  "_type": "src",
  "_file": "CausalState_0.10.2.tar.gz",
  "_fileid": "https://r2.ropensci.org/edecc60e37e088c62b2c93c95be00e0ddd5b89dcc5ee39c724ff8a72acb62d21",
  "_filesize": 477121,
  "_sha256": "edecc60e37e088c62b2c93c95be00e0ddd5b89dcc5ee39c724ff8a72acb62d21",
  "_expires": "2027-01-18T07:50:53.000Z",
  "_created": "2026-10-10T07:37:14.000Z",
  "_published": "2026-10-10T07:50:54.877Z",
  "_buildurl": "https://github.com/r-universe/sebastiaan-blank/actions/runs/38034854440",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_jobs": [
    {
      "job": 114163699752,
      "time": 140,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "11664215566"
    },
    {
      "job": 114163699761,
      "time": 161,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "WARNING",
      "artifact": "11664030825"
    },
    {
      "job": 114163699707,
      "time": 142,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "WARNING",
      "artifact": "11663911820"
    },
    {
      "job": 114163699686,
      "time": 190,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "WARNING",
      "artifact": "11663696001"
    },
    {
      "job": 114163099744,
      "time": 204,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11663830164"
    },
    {
      "job": 114163699755,
      "time": 101,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "11663960198"
    },
    {
      "job": 114163699741,
      "time": 129,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "11664255583"
    },
    {
      "job": 114163699723,
      "time": 112,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "WARNING",
      "artifact": "11663660908"
    },
    {
      "job": 114163699748,
      "time": 140,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "WARNING",
      "artifact": "11664255551"
    }
  ],
  "_upstream": "https://github.com/sebastiaan-blank/causalstate",
  "_commit": {
    "id": "45ab7facea83e319c8e7b95ecbf772939a0afa7d",
    "author": "Sebastiaan Blank <sebastiaan.blank@mail.com>",
    "committer": "Sebastiaan Blank <sebastiaan.blank@mail.com>",
    "message": "free SL fits eagerly in density_ratio; fix stale test API refs\n",
    "time": 1791178909
  },
  "_maintainer": {
    "name": "Sebastiaan Blank",
    "email": "sebastiaan.blank@mail.com",
    "login": "sebastiaan-blank",
    "description": "",
    "uuid": 119840759,
    "orcid": "0000-0001-9115-2138"
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "data.table",
      "version": ">= 1.14.0",
      "role": "Imports"
    },
    {
      "package": "SuperLearner",
      "role": "Imports"
    },
    {
      "package": "origami",
      "role": "Imports"
    },
    {
      "package": "glmnet",
      "role": "Imports"
    },
    {
      "package": "xgboost",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "tidyr",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "magrittr",
      "role": "Imports"
    },
    {
      "package": "parallel",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "scales",
      "role": "Suggests"
    },
    {
      "package": "stringr",
      "role": "Suggests"
    },
    {
      "package": "hal9001",
      "role": "Suggests"
    },
    {
      "package": "dbarts",
      "role": "Suggests"
    },
    {
      "package": "mgcv",
      "role": "Suggests"
    },
    {
      "package": "earth",
      "role": "Suggests"
    },
    {
      "package": "nnls",
      "role": "Suggests"
    },
    {
      "package": "nloptr",
      "role": "Suggests"
    }
  ],
  "_owner": "sebastiaan-blank",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-28",
      "n": 1
    },
    {
      "week": "2026-29",
      "n": 20
    },
    {
      "week": "2026-30",
      "n": 26
    },
    {
      "week": "2026-31",
      "n": 10
    },
    {
      "week": "2026-32",
      "n": 9
    },
    {
      "week": "2026-33",
      "n": 2
    },
    {
      "week": "2026-34",
      "n": 8
    },
    {
      "week": "2026-35",
      "n": 1
    },
    {
      "week": "2026-36",
      "n": 1
    },
    {
      "week": "2026-38",
      "n": 1
    },
    {
      "week": "2026-39",
      "n": 3
    },
    {
      "week": "2026-40",
      "n": 3
    },
    {
      "week": "2026-41",
      "n": 1
    }
  ],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "sebastiaan-blank",
      "count": 89,
      "uuid": 119840759
    }
  ],
  "_userbio": {
    "uuid": 119840759,
    "type": "user",
    "name": "sebastiaan-blank",
    "followers": 1
  },
  "_downloads": {
    "count": 359,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/CausalState"
  },
  "_devurl": "https://github.com/sebastiaan-blank/causalstate",
  "_searchresults": 0,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/CausalState.html",
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md"
  ],
  "_homeurl": "https://github.com/sebastiaan-blank/causalstate",
  "_realowner": "sebastiaan-blank",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.10.2",
      "date": "2026-08-24"
    }
  ],
  "_exports": [
    "absorb_rule",
    "branch_cal_summary",
    "contrast",
    "density_ratio",
    "itmle",
    "method.WB_dr",
    "qreg",
    "sdr",
    "sim_bin",
    "sim_cont",
    "sim_multi",
    "sl_tmle",
    "SL.tgt.empty",
    "SL.tgt.glm",
    "SL.tgt.glmnet",
    "SL.tgt.intercept",
    "SL.tgt.xgboost",
    "SL.tmle_empty",
    "SL.tmle_glm",
    "SL.tmle_glmnet_enet",
    "SL.tmle_glmnet_lasso",
    "SL.tmle_glmnet_ridge",
    "SL.tmle_intercept",
    "SL.tmle_xgb_d1",
    "SL.tmle_xgb_d3",
    "SL.tmle_xgb_d6",
    "weight_diagnostics"
  ],
  "_help": [
    {
      "page": "CausalState-package",
      "title": "CausalState: Causal Inference in a Longitudinal Transitioning State Environment",
      "topics": [
        "CausalState-package",
        "CausalState"
      ]
    },
    {
      "page": "absorb_rule",
      "title": "Define an absorbing-state override rule",
      "topics": [
        "absorb_rule"
      ]
    },
    {
      "page": "branch_cal_summary",
      "title": "Per-time, per-branch calibration summary from an SDR or iTMLE fit",
      "topics": [
        "branch_cal_summary"
      ]
    },
    {
      "page": "contrast",
      "title": "Compute contrasts between two fitted estimators",
      "topics": [
        "contrast"
      ]
    },
    {
      "page": "density_ratio",
      "title": "Estimate density ratios for a modified treatment policy",
      "topics": [
        "density_ratio"
      ]
    },
    {
      "page": "itmle",
      "title": "Infinite-dimensional TMLE (iTMLE) estimator for longitudinal MTPs",
      "topics": [
        "itmle"
      ]
    },
    {
      "page": "method.WB_dr",
      "title": "Wu-Benkeser log-density-ratio metalearner for SuperLearner",
      "topics": [
        "method.WB_dr"
      ]
    },
    {
      "page": "print_fits",
      "title": "Print methods for CausalState output objects",
      "topics": [
        "print.branch_cal_summary",
        "print.itmle_fit",
        "print.qreg_fit",
        "print.sdr_fit"
      ]
    },
    {
      "page": "qreg",
      "title": "Pure Q-recursion estimator - diagnostic use only",
      "topics": [
        "qreg"
      ]
    },
    {
      "page": "sdr",
      "title": "Sequential Doubly Robust (SDR) estimator for longitudinal MTPs",
      "topics": [
        "sdr"
      ]
    },
    {
      "page": "sim_bin",
      "title": "Simulated ICU panel with a single binary treatment",
      "topics": [
        "sim_bin"
      ]
    },
    {
      "page": "sim_cont",
      "title": "Simulated ICU panel with a single continuous treatment",
      "topics": [
        "sim_cont"
      ]
    },
    {
      "page": "sim_multi",
      "title": "Simulated ICU panel with multiple treatments (any mix of binary + continuous)",
      "topics": [
        "sim_multi"
      ]
    },
    {
      "page": "sl_itmle",
      "title": "Custom SuperLearner wrappers for the iTMLE targeting step",
      "topics": [
        "SL.tgt.empty",
        "SL.tgt.glm",
        "SL.tgt.glmnet",
        "SL.tgt.intercept",
        "SL.tgt.xgboost",
        "SL.tmle_empty",
        "SL.tmle_glm",
        "SL.tmle_glmnet_enet",
        "SL.tmle_glmnet_lasso",
        "SL.tmle_glmnet_ridge",
        "SL.tmle_intercept",
        "SL.tmle_xgb_d1",
        "SL.tmle_xgb_d3",
        "SL.tmle_xgb_d6",
        "sl_itmle"
      ]
    },
    {
      "page": "sl_tmle",
      "title": "Default SuperLearner library for the iTMLE targeting step",
      "topics": [
        "sl_tmle"
      ]
    },
    {
      "page": "weight_diagnostics",
      "title": "Per-time weight diagnostics for a density ratio object",
      "topics": [
        "weight_diagnostics"
      ]
    }
  ],
  "_readme": "https://github.com/sebastiaan-blank/causalstate/raw/HEAD/README.md",
  "_rundeps": [
    "abind",
    "assertthat",
    "bitops",
    "caTools",
    "cli",
    "codetools",
    "cpp11",
    "cvAUC",
    "data.table",
    "digest",
    "dplyr",
    "foreach",
    "future",
    "future.apply",
    "gam",
    "generics",
    "glmnet",
    "globals",
    "glue",
    "gplots",
    "gtools",
    "iterators",
    "jsonlite",
    "KernSmooth",
    "lattice",
    "lifecycle",
    "listenv",
    "magrittr",
    "Matrix",
    "nnls",
    "origami",
    "parallelly",
    "pillar",
    "pkgconfig",
    "purrr",
    "R6",
    "Rcpp",
    "RcppEigen",
    "rlang",
    "ROCR",
    "shape",
    "stringi",
    "stringr",
    "SuperLearner",
    "survival",
    "tibble",
    "tidyr",
    "tidyselect",
    "utf8",
    "vctrs",
    "withr",
    "xgboost"
  ],
  "_vignettes": [
    {
      "source": "diagnostics.Rmd",
      "filename": "diagnostics.html",
      "title": "Diagnostics workflow",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "1. Density ratios: is the intervention supportable?",
        "weight_diagnostics()",
        "policy_change_summary",
        "Picking a trim",
        "2. Q calibration: are the outcome models trustworthy?",
        "branch_cal_summary()",
        "Alternative: pure Q-view with qreg()",
        "Tuning the targeting library (itmle() only)",
        "3. Final estimation",
        "4. Post-estimation sanity checks",
        "diagnostics$recursion_diag",
        "diagnostics$target_cal (iTMLE only)",
        "diagnostics$sl_summary",
        "ic_df",
        "Workflow summary"
      ],
      "created": "2026-08-02 03:20:39",
      "modified": "2026-08-02 03:20:39",
      "commits": 1
    },
    {
      "source": "getting-started.Rmd",
      "filename": "getting-started.html",
      "title": "Getting started with CausalState",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "Data structure",
        "Simulated example data",
        "Step 1 — Define a policy",
        "Step 2 — Density ratios",
        "Weights, intervention windows, and trim",
        "Using dr_sl = TRUE (Wu-Benkeser metalearner)",
        "Step 3 — SDR estimator",
        "Step 4 — Infinite-dimensional TMLE (iTMLE)",
        "Step 5 — Q-recursion sensitivity check (qreg)",
        "Diagnostics",
        "SuperLearner weights — sl_summary",
        "Per-fold summaries — fold_diag",
        "Branch calibration — diagnostics$branch_cal (SDR / qreg)",
        "Targeting diagnostics — target_diag, targeting_gap (iTMLE only)",
        "Density-ratio ESS",
        "Parallelism",
        "References"
      ],
      "created": "2026-07-10 08:38:11",
      "modified": "2026-07-24 22:35:06",
      "commits": 3
    },
    {
      "source": "wb-metalearner.Rmd",
      "filename": "wb-metalearner.html",
      "title": "Wu-Benkeser density-ratio metalearner",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "Standard approach: classify then convert",
        "WB approach: combine in density-ratio space",
        "Clipping in the WB pathway",
        "Custom DR-returning wrappers (required)",
        "When to prefer WB over NNLS",
        "Full example",
        "References"
      ],
      "created": "2026-07-20 06:37:42",
      "modified": "2026-09-22 07:08:48",
      "commits": 3
    }
  ],
  "_score": 5.290034611362518,
  "_indexed": true,
  "_nocasepkg": "causalstate",
  "_universes": [
    "sebastiaan-blank"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.10.2",
      "date": "2026-10-10T07:39:20.000Z",
      "distro": "resolute",
      "commit": "45ab7facea83e319c8e7b95ecbf772939a0afa7d",
      "fileid": "https://r2.ropensci.org/c3bf85520b62ebe3f2190b992f9e4f2d5e3d04d43d638c955e60ab32a1466d0a",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/sebastiaan-blank/actions/runs/38034854440"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.10.2",
      "date": "2026-10-10T07:39:29.000Z",
      "distro": "resolute",
      "commit": "45ab7facea83e319c8e7b95ecbf772939a0afa7d",
      "fileid": "https://r2.ropensci.org/f21856bfe47c7d138e79ca76ccb7c182177967356c8af1bfb964471bd54fcd5a",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/sebastiaan-blank/actions/runs/38034854440"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.10.2",
      "date": "2026-10-10T07:49:25.000Z",
      "commit": "45ab7facea83e319c8e7b95ecbf772939a0afa7d",
      "fileid": "https://r2.ropensci.org/628c0fa132f209fc2cf5647a2ef9cfd11b3f6d8fdf7f27c418a856627c53f362",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/sebastiaan-blank/actions/runs/38034854440"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.10.2",
      "date": "2026-10-10T07:48:03.000Z",
      "commit": "45ab7facea83e319c8e7b95ecbf772939a0afa7d",
      "fileid": "https://r2.ropensci.org/38607dcf75364473e11a2b2896013650fa67adccc731a254299fdfc1479b0bd4",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/sebastiaan-blank/actions/runs/38034854440"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.10.2",
      "date": "2026-10-10T07:39:16.000Z",
      "commit": "45ab7facea83e319c8e7b95ecbf772939a0afa7d",
      "fileid": "https://r2.ropensci.org/7960275bdd851188015c8702534a929f38be8690a4d1f99033f1b58eb2898216",
      "status": "success",
      "buildurl": "https://github.com/r-universe/sebastiaan-blank/actions/runs/38034854440"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.10.2",
      "date": "2026-10-10T07:38:56.000Z",
      "commit": "45ab7facea83e319c8e7b95ecbf772939a0afa7d",
      "fileid": "https://r2.ropensci.org/b4da442f1755d8d18c37f9377bac511c1d3b55babf0edd04b1a3314c1d3b7f1f",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/sebastiaan-blank/actions/runs/38034854440"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.10.2",
      "date": "2026-10-10T07:38:30.000Z",
      "commit": "45ab7facea83e319c8e7b95ecbf772939a0afa7d",
      "fileid": "https://r2.ropensci.org/4b18f412d0b5f6268f556756f9582406d444d9cec02f40742e281884e20081af",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/sebastiaan-blank/actions/runs/38034854440"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.10.2",
      "date": "2026-10-10T07:38:38.000Z",
      "commit": "45ab7facea83e319c8e7b95ecbf772939a0afa7d",
      "fileid": "https://r2.ropensci.org/1c384d698f64b921f9ec398a97ab4131fa26acfe42efa55fdeddfed2a99c1c8a",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/sebastiaan-blank/actions/runs/38034854440"
    }
  ]
}