{
  "_id": "6a1f0aa4b401979e7341c5b6",
  "Package": "PStrata",
  "Type": "Package",
  "Title": "Principal Stratification Analysis in R",
  "Version": "1.0.2",
  "Date": "2026-05-17",
  "Encoding": "UTF-8",
  "Authors@R": "c(\nperson(given = \"Bo\", family = \"Liu\", role = c(\"aut\", \"cre\"), email = \"bo.liu1997@gmail.com\"),\nperson(given = \"Fan\", family = \"Li\", role = \"ctb\", email = \"fl35@duke.edu\"))",
  "Author": "Bo Liu [aut, cre], Fan Li [ctb]",
  "Maintainer": "Bo Liu <bo.liu1997@gmail.com>",
  "Description": "Estimating causal effects in the presence of\npost-treatment confounding using principal stratification.\n'PStrata' allows for customized monotonicity assumptions and\nexclusion restriction assumptions, with automatic full Bayesian\ninference supported by 'Stan'. The main workflow is\nPStrataModel() to specify the model, fit() to run MCMC\nsampling, estimate() to extract potential outcomes, and\ncontrast() to compute causal effects. Visualization tools are\nprovided for diagnosis and interpretation. See Liu and Li\n(2023) <doi:10.48550/arXiv.2304.02740> for details.",
  "URL": "https://github.com/LauBok/PStrata",
  "BugReports": "https://github.com/LauBok/PStrata/issues",
  "Collate": "PStrata-package.R utils.R survival.R prior.R make_stancode.R\nsim_data_normal.R sim_data_Cox.R PStrataModel.R fit.R\nestimate.R contrast.R",
  "License": "GPL (>= 2)",
  "LazyData": "true",
  "RoxygenNote": "7.3.3",
  "Config/pak/sysreqs": "cmake make libicu-dev",
  "Repository": "https://laubok.r-universe.dev",
  "Date/Publication": "2026-05-17 17:32:37 UTC",
  "RemoteUrl": "https://github.com/laubok/pstrata",
  "RemoteRef": "HEAD",
  "RemoteSha": "902dc3b61e31c506e9f9866cf68a5262f2cd08c0",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-17 18:18:29 UTC",
    "User": "root"
  },
  "MD5sum": "44109b2769cfcea3e11c949793e0aa11",
  "_user": "laubok",
  "_type": "src",
  "_file": "PStrata_1.0.2.tar.gz",
  "_fileid": "fb10863f785e2611304bfb5e82f6ccce434e171e8160fd783b8852768fe17623",
  "_filesize": 235722,
  "_sha256": "fb10863f785e2611304bfb5e82f6ccce434e171e8160fd783b8852768fe17623",
  "_created": "2026-05-17T18:18:29.000Z",
  "_published": "2026-06-02T16:53:56.694Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79125373377,
      "time": 145,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7044870275"
    },
    {
      "job": 79125373464,
      "time": 190,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7044875635"
    },
    {
      "job": 79125373366,
      "time": 160,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7044869478"
    },
    {
      "job": 79125373059,
      "time": 191,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7044871823"
    },
    {
      "job": 79125372656,
      "time": 198,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7044852232"
    },
    {
      "job": 79125372391,
      "time": 138,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7364331644"
    },
    {
      "job": 79125373307,
      "time": 104,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7044865453"
    },
    {
      "job": 79125373515,
      "time": 92,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7044863593"
    },
    {
      "job": 79125373151,
      "time": 101,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7044864651"
    }
  ],
  "_buildurl": "https://github.com/r-universe/laubok/actions/runs/25998811832",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/laubok/pstrata",
  "_commit": {
    "id": "902dc3b61e31c506e9f9866cf68a5262f2cd08c0",
    "author": "Bo Liu <bo.liu1997@gmail.com>",
    "committer": "Bo Liu <bo.liu1997@gmail.com>",
    "message": "v1.0.2: new PStrataModel/fit/estimate/contrast API + modernized diagnostics\n\nReplace the PStrata()/PSOutcome()/PSContrast() design with the\nPStrataModel() -> fit() -> estimate() -> contrast() pipeline. Drop the\nold PSFormula/PSObject/PSSample/PStrataInfo/make_standata internals.\n\n- diagnostics(): rank-normalized split-Rhat + Bulk/Tail ESS via\n  rstan::monitor, convergence threshold 1.01 (Vehtari et al. 2021)\n- poisson(\"sqrt\") link added to the family registry\n- ER specified via the ER= argument (asterisk-in-strata-string removed)\n- dependencies: add reformulas, drop dplyr/abind; Imports refreshed\n- regenerate roxygen man pages and NAMESPACE; bump to 1.0.2 (2026-05-17)\n",
    "time": 1779039157
  },
  "_maintainer": {
    "name": "Bo Liu",
    "email": "bo.liu1997@gmail.com",
    "login": "boliu1997",
    "description": "",
    "uuid": 259412667
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "rstan",
      "role": "Imports"
    },
    {
      "package": "lme4",
      "role": "Imports"
    },
    {
      "package": "reformulas",
      "role": "Imports"
    },
    {
      "package": "purrr",
      "role": "Imports"
    },
    {
      "package": "stringr",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "R.rsp",
      "role": "Suggests"
    }
  ],
  "_owner": "laubok",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-42",
      "n": 1
    },
    {
      "week": "2026-10",
      "n": 3
    },
    {
      "week": "2026-20",
      "n": 1
    }
  ],
  "_tags": [],
  "_stars": 7,
  "_contributors": [
    {
      "user": "laubok",
      "count": 73,
      "uuid": 45272723
    },
    {
      "user": "boliu1997",
      "count": 5,
      "uuid": 259412667
    }
  ],
  "_userbio": {
    "uuid": 45272723,
    "type": "user",
    "name": "Bo Liu"
  },
  "_downloads": {
    "count": 628,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/PStrata"
  },
  "_devurl": "https://github.com/laubok/pstrata",
  "_searchresults": 4,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/PStrata.html",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/laubok/pstrata",
  "_realowner": "laubok",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.0.1",
      "date": "2023-05-08"
    },
    {
      "version": "0.0.2",
      "date": "2023-07-17"
    },
    {
      "version": "0.0.3",
      "date": "2023-10-18"
    },
    {
      "version": "0.0.4",
      "date": "2023-11-16"
    },
    {
      "version": "0.0.5",
      "date": "2023-12-03"
    },
    {
      "version": "0.1.0",
      "date": "2026-03-08"
    },
    {
      "version": "1.0.0",
      "date": "2026-05-14"
    },
    {
      "version": "1.0.1",
      "date": "2026-05-15"
    }
  ],
  "_exports": [
    "contrast",
    "diagnostics",
    "estimate",
    "fit",
    "make_stancode",
    "prior_cauchy",
    "prior_chisq",
    "prior_exponential",
    "prior_flat",
    "prior_gamma",
    "prior_inv_chisq",
    "prior_inv_gamma",
    "prior_lasso",
    "prior_logistic",
    "prior_normal",
    "prior_t",
    "prior_weibull",
    "PStrataModel",
    "stancode.PStrataFit",
    "survival"
  ],
  "_datasets": [
    {
      "name": "sim_data_Cox",
      "title": "Simulated Dataset for Survival Outcome (Cox Model)",
      "object": "sim_data_Cox",
      "class": [
        "data.frame"
      ],
      "fields": [
        "S",
        "Z",
        "D",
        "T",
        "C",
        "Y",
        "delta"
      ],
      "rows": 2000,
      "table": true,
      "tojson": true
    },
    {
      "name": "sim_data_normal",
      "title": "Simulated Dataset for Normal Outcome",
      "object": "sim_data_normal",
      "class": [
        "data.frame"
      ],
      "fields": [
        "S",
        "Z",
        "D",
        "Y"
      ],
      "rows": 1000,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "contrast",
      "title": "Contrast Potential Outcomes",
      "topics": [
        "contrast",
        "contrast.PSEstimate",
        "contrast.PStrataFit"
      ]
    },
    {
      "page": "diagnostics",
      "title": "MCMC Convergence Diagnostics",
      "topics": [
        "diagnostics",
        "diagnostics.PStrataFit"
      ]
    },
    {
      "page": "estimate",
      "title": "Extract Posterior Potential Outcomes",
      "topics": [
        "estimate",
        "estimate.PStrataFit"
      ]
    },
    {
      "page": "fit",
      "title": "Fit a Principal Stratification Model",
      "topics": [
        "fit",
        "fit.PStrataModel"
      ]
    },
    {
      "page": "make_stancode",
      "title": "Stan Code for PStrata Models",
      "topics": [
        "make_stancode"
      ]
    },
    {
      "page": "plot.PStrataFit",
      "title": "Plot PStrataFit Objects",
      "topics": [
        "plot.PStrataFit"
      ]
    },
    {
      "page": "prior",
      "title": "Prior Distribution Functions",
      "topics": [
        "prior",
        "prior_cauchy",
        "prior_chisq",
        "prior_exponential",
        "prior_flat",
        "prior_gamma",
        "prior_inv_chisq",
        "prior_inv_gamma",
        "prior_lasso",
        "prior_logistic",
        "prior_normal",
        "prior_t",
        "prior_weibull"
      ]
    },
    {
      "page": "PStrata_PACKAGE",
      "title": "PStrata: Principal STRATification Analysis for Data with Post-Randomization Confounding",
      "topics": [
        "PStrata_PACKAGE"
      ]
    },
    {
      "page": "PStrataModel",
      "title": "Define a Principal Stratification Model",
      "topics": [
        "PStrataModel"
      ]
    },
    {
      "page": "sim_data_Cox",
      "title": "Simulated Dataset for Survival Outcome (Cox Model)",
      "topics": [
        "sim_data_Cox"
      ]
    },
    {
      "page": "sim_data_normal",
      "title": "Simulated Dataset for Normal Outcome",
      "topics": [
        "sim_data_normal"
      ]
    },
    {
      "page": "stancode.PStrataFit",
      "title": "Extract the Generated Stan Code",
      "topics": [
        "stancode.PStrataFit"
      ]
    },
    {
      "page": "survival",
      "title": "Family Function for Survival Data",
      "topics": [
        "survival"
      ]
    }
  ],
  "_readme": "https://github.com/laubok/pstrata/raw/HEAD/README.md",
  "_rundeps": [
    "abind",
    "backports",
    "BH",
    "boot",
    "callr",
    "checkmate",
    "cli",
    "cpp11",
    "desc",
    "distributional",
    "farver",
    "generics",
    "ggplot2",
    "glue",
    "gridExtra",
    "gtable",
    "inline",
    "isoband",
    "labeling",
    "lattice",
    "lifecycle",
    "lme4",
    "loo",
    "magrittr",
    "MASS",
    "Matrix",
    "matrixStats",
    "minqa",
    "nlme",
    "nloptr",
    "numDeriv",
    "pillar",
    "pkgbuild",
    "pkgconfig",
    "posterior",
    "processx",
    "ps",
    "purrr",
    "QuickJSR",
    "R6",
    "rbibutils",
    "RColorBrewer",
    "Rcpp",
    "RcppEigen",
    "RcppParallel",
    "Rdpack",
    "reformulas",
    "rlang",
    "rstan",
    "S7",
    "scales",
    "StanHeaders",
    "stringi",
    "stringr",
    "tensorA",
    "tibble",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_score": 4.021189299069938,
  "_indexed": true,
  "_nocasepkg": "pstrata",
  "_universes": [
    "laubok",
    "boliu1997"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.0.2",
      "date": "2026-05-17T18:20:52.000Z",
      "distro": "noble",
      "commit": "902dc3b61e31c506e9f9866cf68a5262f2cd08c0",
      "fileid": "5d650604b4340023c8d5f7587d22dd6032534a2e1cef2af673183852c8281aab",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/laubok/actions/runs/25998811832"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.0.2",
      "date": "2026-05-17T18:21:35.000Z",
      "distro": "noble",
      "commit": "902dc3b61e31c506e9f9866cf68a5262f2cd08c0",
      "fileid": "3c4d51b1b3d5b2ba4cc9cf4cd33395e3d83163a990c97b23f5dda3528a1329f7",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/laubok/actions/runs/25998811832"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.0.2",
      "date": "2026-05-17T18:20:52.000Z",
      "commit": "902dc3b61e31c506e9f9866cf68a5262f2cd08c0",
      "fileid": "e7e8fc0439b845564b661e9fdc6d6f956d04e6f9fd028f3ed51dd358772a693d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/laubok/actions/runs/25998811832"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.0.2",
      "date": "2026-05-17T18:21:06.000Z",
      "commit": "902dc3b61e31c506e9f9866cf68a5262f2cd08c0",
      "fileid": "33a0341fe2fcba559b9e0f9be2bbf6bb21ebc0186f6541cdc76e4ae2cd371108",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/laubok/actions/runs/25998811832"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.0.2",
      "date": "2026-05-17T18:20:06.000Z",
      "commit": "902dc3b61e31c506e9f9866cf68a5262f2cd08c0",
      "fileid": "3f99ab406cabff87214848517e18ca64d9f4f9ab8d50a6114854c2267e35159a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/laubok/actions/runs/25998811832"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.0.2",
      "date": "2026-05-17T18:19:54.000Z",
      "commit": "902dc3b61e31c506e9f9866cf68a5262f2cd08c0",
      "fileid": "f2beb296559de5fdff275464a32e2cd50b052102f8892581a42cca9fe3094d06",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/laubok/actions/runs/25998811832"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.0.2",
      "date": "2026-05-17T18:20:02.000Z",
      "commit": "902dc3b61e31c506e9f9866cf68a5262f2cd08c0",
      "fileid": "6ece77908e5e9d22ecdd9cfd2d49d61449e72f8ecd0e18fff516694d3a9c6a46",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/laubok/actions/runs/25998811832"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.0.2",
      "date": "2026-06-02T16:53:37.000Z",
      "commit": "902dc3b61e31c506e9f9866cf68a5262f2cd08c0",
      "fileid": "0c5e7f61c791424ce1a6dbbbf023db8bec6fb4f9c48addd6b8c5876408c71c15",
      "status": "success",
      "buildurl": "https://github.com/r-universe/laubok/actions/runs/25998811832"
    }
  ]
}