{
  "_id": "6a1f3366b401979e73428181",
  "Type": "Package",
  "Package": "bayesmsm",
  "Title": "Fitting Bayesian Marginal Structural Models for Longitudinal\nObservational Data",
  "Version": "1.0.0",
  "Authors@R": "c(\nperson(\"Kuan\", \"Liu\", , \"kuan.liu@utoronto.ca\", role = c(\"aut\", \"cre\",\"cph\"),\ncomment = c(ORCID = \"0000-0002-5017-1276\")),\nperson(\"Xiao\", \"Yan\", , \"Clarence.YXA@gmail.com\", role = \"aut\",\ncomment = c(ORCID = \"0000-0001-9712-1199\")),\nperson(\"Martin\", \"Urner\", , \"martin.urner@uhn.ca\", role = \"aut\",\ncomment = c(ORCID = \"0000-0003-1133-4885\"))\n)",
  "Maintainer": "Kuan Liu <kuan.liu@utoronto.ca>",
  "Description": "Implements Bayesian marginal structural models for causal\neffect estimation with time-varying treatment and confounding.\nIt includes an extension to handle informative right censoring.\nThe Bayesian importance sampling weights are estimated using\nJAGS. See Saarela (2015) <doi:10.1111/biom.12269> for\nmethodological details.",
  "License": "MIT + file LICENSE",
  "URL": "https://github.com/Kuan-Liu-Lab/bayesmsm",
  "BugReports": "https://github.com/Kuan-Liu-Lab/bayesmsm/issues",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "Encoding": "UTF-8",
  "NeedsCompilation": "no",
  "RoxygenNote": "7.3.2",
  "Config/pak/sysreqs": "jags libicu-dev",
  "Repository": "https://kuan-liu-lab.r-universe.dev",
  "Date/Publication": "2025-06-19 21:27:56 UTC",
  "RemoteUrl": "https://github.com/kuan-liu-lab/bayesmsm",
  "RemoteRef": "HEAD",
  "RemoteSha": "69f5b11a8a0d74c58fae59eb318db2d329de53da",
  "Packaged": {
    "Date": "2026-05-15 09:29:34 UTC",
    "User": "root"
  },
  "Author": "Kuan Liu [aut, cre, cph] (ORCID:\n<https://orcid.org/0000-0002-5017-1276>),\nXiao Yan [aut] (ORCID: <https://orcid.org/0000-0001-9712-1199>),\nMartin Urner [aut] (ORCID: <https://orcid.org/0000-0003-1133-4885>)",
  "MD5sum": "040580af81861b744b1b084be3eb2bd5",
  "_user": "kuan-liu-lab",
  "_type": "src",
  "_file": "bayesmsm_1.0.0.tar.gz",
  "_fileid": "ed933145e1b69758467395ca1b111a367d2fd66bdae7ff6675d57aab9613e426",
  "_filesize": 929716,
  "_sha256": "ed933145e1b69758467395ca1b111a367d2fd66bdae7ff6675d57aab9613e426",
  "_created": "2026-05-15T09:29:34.000Z",
  "_published": "2026-06-02T19:47:50.859Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79154088716,
      "time": 207,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7014136640"
    },
    {
      "job": 79154088983,
      "time": 183,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7014130244"
    },
    {
      "job": 79154088867,
      "time": 273,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7014142585"
    },
    {
      "job": 79154088913,
      "time": 267,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7014132207"
    },
    {
      "job": 79154088059,
      "time": 236,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7014075990"
    },
    {
      "job": 79154088089,
      "time": 1428,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "FAIL",
      "artifact": ""
    },
    {
      "job": 79154088576,
      "time": 157,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7014122869"
    },
    {
      "job": 79154089109,
      "time": 133,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7014115483"
    },
    {
      "job": 79154088835,
      "time": 137,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7014116584"
    }
  ],
  "_buildurl": "https://github.com/r-universe/kuan-liu-lab/actions/runs/25910487444",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/kuan-liu-lab/bayesmsm",
  "_commit": {
    "id": "69f5b11a8a0d74c58fae59eb318db2d329de53da",
    "author": "Kuan Liu <kuan.liu@mail.utoronto.ca>",
    "committer": "Kuan Liu <kuan.liu@mail.utoronto.ca>",
    "message": "update\n",
    "time": 1750368476
  },
  "_maintainer": {
    "name": "Kuan Liu",
    "email": "kuan.liu@utoronto.ca",
    "login": "kuan-liu",
    "uuid": 45974798,
    "orcid": "0000-0002-5017-1276"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.2.0",
      "role": "Depends"
    },
    {
      "package": "coda",
      "version": ">= 0.19-4",
      "role": "Imports"
    },
    {
      "package": "doParallel",
      "role": "Imports"
    },
    {
      "package": "foreach",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "MCMCpack",
      "role": "Imports"
    },
    {
      "package": "parallel",
      "role": "Imports"
    },
    {
      "package": "R2jags",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "devtools",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    }
  ],
  "_owner": "kuan-liu-lab",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-23",
      "n": 2
    },
    {
      "week": "2025-24",
      "n": 3
    },
    {
      "week": "2025-25",
      "n": 1
    }
  ],
  "_tags": [],
  "_topics": [
    "bayesian-methods",
    "causal-inference",
    "marginal-structural-models",
    "jags",
    "cpp"
  ],
  "_stars": 3,
  "_contributors": [
    {
      "user": "kuan-liu",
      "count": 49,
      "uuid": 45974798
    },
    {
      "user": "xiaoyan-clarence",
      "count": 38,
      "uuid": 145512190
    }
  ],
  "_userbio": {
    "uuid": 144490989,
    "type": "organization",
    "name": "Kuan-Liu-Lab"
  },
  "_downloads": {
    "count": 202,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/bayesmsm"
  },
  "_devurl": "https://github.com/kuan-liu-lab/bayesmsm",
  "_searchresults": 13,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/bayesmsm.html",
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/kuan-liu-lab/bayesmsm",
  "_realowner": "kuan-liu-lab",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.0",
      "date": "2025-06-17"
    }
  ],
  "_exports": [
    "bayesmsm",
    "bayesweight",
    "bayesweight_cen",
    "plot_APO",
    "plot_ATE",
    "plot_est_box",
    "simData",
    "summary_bayesmsm"
  ],
  "_help": [
    {
      "page": "bayesmsm",
      "title": "Bayesian Marginal Structural Model Bootstrap Estimation",
      "topics": [
        "bayesmsm"
      ]
    },
    {
      "page": "bayesweight",
      "title": "Bayesian Treatment Effect Weight Estimation Using JAGS",
      "topics": [
        "bayesweight"
      ]
    },
    {
      "page": "bayesweight_cen",
      "title": "Bayesian Treatment Effect Weight Estimation for Censored Data",
      "topics": [
        "bayesweight_cen"
      ]
    },
    {
      "page": "calculate_effect",
      "title": "This function to calculate the causal effect of an intervention given the parameter estimates and intervention levels",
      "topics": [
        "calculate_effect"
      ]
    },
    {
      "page": "plot_APO",
      "title": "Plot Average Potential Outcomes (APO)",
      "topics": [
        "plot_APO"
      ]
    },
    {
      "page": "plot_ATE",
      "title": "Plot Average Treatment Effect Density from bayesmsm output",
      "topics": [
        "plot_ATE"
      ]
    },
    {
      "page": "plot_est_box",
      "title": "Error bar plots for causal treatment effects",
      "topics": [
        "plot_est_box"
      ]
    },
    {
      "page": "simData",
      "title": "Generate synthetic longitudinal data with optional right-censoring",
      "topics": [
        "simData"
      ]
    },
    {
      "page": "summary_bayesmsm",
      "title": "Summary function to generate result table from bayesmsm",
      "topics": [
        "summary_bayesmsm"
      ]
    }
  ],
  "_readme": "https://github.com/kuan-liu-lab/bayesmsm/raw/HEAD/README.md",
  "_rundeps": [
    "abind",
    "boot",
    "cli",
    "coda",
    "codetools",
    "cpp11",
    "doParallel",
    "farver",
    "foreach",
    "ggplot2",
    "glue",
    "gtable",
    "isoband",
    "iterators",
    "labeling",
    "lattice",
    "lifecycle",
    "magrittr",
    "MASS",
    "Matrix",
    "MatrixModels",
    "mcmc",
    "MCMCpack",
    "quantreg",
    "R2jags",
    "R2WinBUGS",
    "R6",
    "RColorBrewer",
    "rjags",
    "rlang",
    "S7",
    "scales",
    "SparseM",
    "stringi",
    "stringr",
    "survival",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_sysdeps": [
    {
      "shlib": "libjags",
      "package": "jags",
      "headers": "jags",
      "source": "jags",
      "version": "4.3.2-2.2404.0",
      "name": "jags",
      "homepage": "https://mcmc-jags.sourceforge.io",
      "description": "Just Another Gibbs Sampler for Bayesian MCMC - binary\nJAGS is Just Another Gibbs Sampler.  It is a program for analysis of\nBayesian hierarchical models using Markov Chain Monte Carlo (MCMC)\nsimulation not wholly unlike BUGS.\n\nJAGS was written with three aims in mind:\n* To have an engine for the BUGS language that runs on Unix\n* To be extensible, allowing users to write their own functions,\ndistributions and samplers.\n* To be a plaftorm for experimentation with ideas in Bayesian modelling\n\nThis package contains the 'jags' binary as well as the associated\nshared library modules loaded by the binary."
    },
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "14.2.0-4ubuntu2~24.04.1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_vignettes": [
    {
      "source": "bayesmsm-censoring.Rmd",
      "filename": "bayesmsm-censoring.html",
      "title": "bayesmsm for longitudinal data with informative right-censoring",
      "author": "Xiao Yan, Kuan Liu",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Simulated longitudinal observational data with right-censoring",
        "Bayesian treatment effect weight estimation using bayesweight_cen",
        "Bayesian non-parametric bootstrap to maximize the utility function with respect to the causal effect using bayesmsm",
        "Visualization functions: plot_ATE, plot_APO, plot_est_box",
        "Reference"
      ],
      "created": "2024-10-21 22:38:09",
      "modified": "2025-06-13 21:25:45",
      "commits": 13
    },
    {
      "source": "bayesmsm-nocensoring.Rmd",
      "filename": "bayesmsm-nocensoring.html",
      "title": "bayesmsm for longitudinal data without right-censoring",
      "author": "Xiao Yan, Kuan Liu",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Simulated longitudinal observational data without right-censoring",
        "Bayesian treatment effect weight estimation using bayesweight",
        "Bayesian non-parametric bootstrap to maximize the utility function with respect to the causal effect using bayesmsm",
        "Visualization functions: plot_ATE, plot_APO, plot_est_box",
        "Reference"
      ],
      "created": "2024-10-08 08:18:30",
      "modified": "2025-06-13 21:25:45",
      "commits": 13
    }
  ],
  "_score": 5.068185861746162,
  "_indexed": true,
  "_nocasepkg": "bayesmsm",
  "_universes": [
    "kuan-liu-lab",
    "kuan-liu"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.0.0",
      "date": "2026-05-15T09:32:31.000Z",
      "distro": "noble",
      "commit": "69f5b11a8a0d74c58fae59eb318db2d329de53da",
      "fileid": "77d7fd8c90822c573e4abb810e5d8d97cecfbb910aa6a3d21d305c722974be1f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kuan-liu-lab/actions/runs/25910487444"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.0.0",
      "date": "2026-05-15T09:32:21.000Z",
      "distro": "noble",
      "commit": "69f5b11a8a0d74c58fae59eb318db2d329de53da",
      "fileid": "6ba2805c447a2521aae34e5b19e43a182646d824ce63ff399f9e736a298856b1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kuan-liu-lab/actions/runs/25910487444"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.0.0",
      "date": "2026-05-15T09:32:51.000Z",
      "commit": "69f5b11a8a0d74c58fae59eb318db2d329de53da",
      "fileid": "1c5acc518a6bc017d98b97a5984adb63ba4026b05c1b5f79ac3a819f314efe16",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kuan-liu-lab/actions/runs/25910487444"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.0.0",
      "date": "2026-05-15T09:32:19.000Z",
      "commit": "69f5b11a8a0d74c58fae59eb318db2d329de53da",
      "fileid": "045c91498f26945daaabfd6e34c6459e8c2d1fbc4377fe1803bbb4d48b61c103",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kuan-liu-lab/actions/runs/25910487444"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.0.0",
      "date": "2026-05-15T09:31:41.000Z",
      "commit": "69f5b11a8a0d74c58fae59eb318db2d329de53da",
      "fileid": "ae062839b356fe18072b7ca516f4c4be3774d8663c9b24ae21df15352bad75bd",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kuan-liu-lab/actions/runs/25910487444"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.0.0",
      "date": "2026-05-15T09:31:08.000Z",
      "commit": "69f5b11a8a0d74c58fae59eb318db2d329de53da",
      "fileid": "2e0c72cbc86b61e76b0d0e0b1a9619259aa57f195e6811ad6ac3055ab4e64bef",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kuan-liu-lab/actions/runs/25910487444"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.0.0",
      "date": "2026-05-15T09:31:07.000Z",
      "commit": "69f5b11a8a0d74c58fae59eb318db2d329de53da",
      "fileid": "1f1c2eede842ef39dda34bdc2403ded893d23b76d7c8710fb9a50318ad437179",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kuan-liu-lab/actions/runs/25910487444"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.0.0",
      "date": "2026-05-22T07:19:29.000Z",
      "commit": "69f5b11a8a0d74c58fae59eb318db2d329de53da",
      "fileid": "165943d777fb803f92e95e82a8bccb82b73d39ae662c362a605828557bb43683",
      "status": "success",
      "buildurl": "https://github.com/r-universe/kuan-liu-lab/actions/runs/25910487444"
    }
  ]
}