{
  "_id": "6a20eeeacd65a98ecbd1b3cd",
  "Package": "drugDemand",
  "Type": "Package",
  "Title": "Drug Demand Forecasting",
  "Version": "0.1.3",
  "Date": "2024-02-27",
  "Authors@R": "person(\"Kaifeng\", \"Lu\", , \"kaifenglu@gmail.com\", role = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0002-6160-7119\"))",
  "Description": "Performs drug demand forecasting by modeling drug\ndispensing data while taking into account predicted enrollment\nand treatment discontinuation dates. The gap time between\nrandomization and the first drug dispensing visit is modeled\nusing interval-censored exponential, Weibull, log-logistic, or\nlog-normal distributions (Anderson-Bergman (2017)\n<doi:10.18637/jss.v081.i12>). The number of skipped visits is\nmodeled using Poisson, zero-inflated Poisson, or negative\nbinomial distributions (Zeileis, Kleiber & Jackman (2008)\n<doi:10.18637/jss.v027.i08>). The gap time between two\nconsecutive drug dispensing visits given the number of skipped\nvisits is modeled using linear regression based on least\nsquares or least absolute deviations (Birkes & Dodge (1993,\nISBN:0-471-56881-3)). The number of dispensed doses is modeled\nusing linear or linear mixed-effects models (McCulloch & Searle\n(2001, ISBN:0-471-19364-X)).",
  "License": "GPL (>= 2)",
  "RoxygenNote": "7.3.0",
  "Roxygen": "list(markdown = TRUE)",
  "Encoding": "UTF-8",
  "NeedsCompilation": "yes",
  "Config/pak/sysreqs": "cmake make libicu-dev libuv1-dev libssl-dev\nzlib1g-dev",
  "Repository": "https://kaifenglu.r-universe.dev",
  "Date/Publication": "2024-02-27 23:11:29 UTC",
  "RemoteUrl": "https://github.com/kaifenglu/drugdemand",
  "RemoteRef": "HEAD",
  "RemoteSha": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
  "Packaged": {
    "Date": "2026-06-04 03:14:41 UTC",
    "User": "root"
  },
  "Author": "Kaifeng Lu [aut, cre] (ORCID: <https://orcid.org/0000-0002-6160-7119>)",
  "Maintainer": "Kaifeng Lu <kaifenglu@gmail.com>",
  "MD5sum": "0ef1494bf0bf50e556799109db4db481",
  "_user": "kaifenglu",
  "_type": "src",
  "_file": "drugDemand_0.1.3.tar.gz",
  "_fileid": "431172903bd2138dd0d9969406ad8a82059eb8a03f5fab293792f46274d325ac",
  "_filesize": 106188,
  "_sha256": "431172903bd2138dd0d9969406ad8a82059eb8a03f5fab293792f46274d325ac",
  "_created": "2026-06-04T03:14:41.000Z",
  "_published": "2026-06-04T03:20:09.958Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79442121829,
      "time": 177,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "7402174687"
    },
    {
      "job": 79442121842,
      "time": 194,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "7402178187"
    },
    {
      "job": 79442121825,
      "time": 181,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7402175525"
    },
    {
      "job": 79442121819,
      "time": 214,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7402182340"
    },
    {
      "job": 79442121828,
      "time": 118,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "WARNING",
      "artifact": "7402161895"
    },
    {
      "job": 79442121815,
      "time": 277,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "WARNING",
      "artifact": "7402196002"
    },
    {
      "job": 79442121844,
      "time": 115,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7402160945"
    },
    {
      "job": 79442121835,
      "time": 266,
      "config": "macos-release-x86_64",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7402194347"
    },
    {
      "job": 79441729110,
      "time": 225,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7402136137"
    },
    {
      "job": 79442121795,
      "time": 161,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7402170756"
    },
    {
      "job": 79442121914,
      "time": 217,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "7402183133"
    },
    {
      "job": 79442121849,
      "time": 165,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "WARNING",
      "artifact": "7402171748"
    },
    {
      "job": 79442121823,
      "time": 150,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7402168427"
    }
  ],
  "_buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/kaifenglu/drugdemand",
  "_commit": {
    "id": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
    "author": "Kaifeng Lu <kaifenglu@gmail.com>",
    "committer": "Kaifeng Lu <kaifenglu@gmail.com>",
    "message": "- remove the dependence on pscl and icenReg packages\n- add stringr to imported packages\n- add survival::survreg and stats::optim to imported functions\n- use the Brent method for optimization to fit an interval-censored exponential distribution to the time from randomization to the first drug dispensing visit\n- check the number of unique combinations of time and k1 in f_fit_ti\n- use the VarCorr function from the nlme package to obtain the variance of random effects from the lme function call\n- use data from all kit types to inform the common time model\n- add the pred_pp_only parameter to f_drug_demand to make protocol-based predictions only\n- ensure that df and visitview have all the required columns and none of the required columns have missing values\n- combine dosing_pred_df and dosing_pred_pp in the f_drug_demand output\n- handle cases where all patients in a treatment arm discontinued before the cutoff\n- replace round with formatC to retain the zeros after the decimal point\n- rename fit_xx to xx_fit, where xx = k0, t0, t1, ki, ti, di to be consistent with enroll_fit and event_fit naming convention\n- add kit and kit_name to handle cases when a drug has different kit types depending on the site\n- add the prior probability of different kit types within a drug at the design stage\n- streamline the examples through the use of function calls\n- update the initial parameter values in f_fit_ki for zero-inflated Poisson model\n- update the p.fit calculation in f_fit_ti when using the least absolute deviations model\n- convert kit_name to a factor to ensure the correct order when creating a plot\n- add kit_name as the sub plot title in f_dispensing_models.R\n- add the vf_kit parameter to f_dose_draw_1 to get the kit information for each subject in each simulation draw\n- add the f_ongoing_new function to prepare the dosing data sets to impute for ongoing and new subjects\n- add kit_description_df to the output of f_dose_observed\n- add the rdirichlet function to generate cell probab",
    "time": 1709075489
  },
  "_maintainer": {
    "name": "Kaifeng Lu",
    "email": "kaifenglu@gmail.com",
    "login": "kaifenglu",
    "description": "",
    "uuid": 95114218,
    "orcid": "0000-0002-6160-7119"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "Rcpp",
      "role": "LinkingTo"
    },
    {
      "package": "Rcpp",
      "version": ">= 1.0.10",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "version": ">= 1.1.0",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "version": ">= 1.1.0",
      "role": "Imports"
    },
    {
      "package": "purrr",
      "version": ">= 1.0.2",
      "role": "Imports"
    },
    {
      "package": "stringr",
      "version": ">= 1.4.0",
      "role": "Imports"
    },
    {
      "package": "plotly",
      "version": ">= 4.10.1",
      "role": "Imports"
    },
    {
      "package": "survival",
      "version": ">= 2.41-3",
      "role": "Imports"
    },
    {
      "package": "mvtnorm",
      "version": ">= 1.1-3",
      "role": "Imports"
    },
    {
      "package": "erify",
      "version": ">= 0.4.0",
      "role": "Imports"
    },
    {
      "package": "stats",
      "version": ">= 3.5.0",
      "role": "Imports"
    },
    {
      "package": "MASS",
      "version": ">= 7.3-54",
      "role": "Imports"
    },
    {
      "package": "nlme",
      "version": ">= 3.1-153",
      "role": "Imports"
    },
    {
      "package": "L1pack",
      "version": ">= 0.41-24",
      "role": "Imports"
    },
    {
      "package": "eventPred",
      "version": ">= 0.2.3",
      "role": "Imports"
    },
    {
      "package": "parallel",
      "version": ">= 4.1.2",
      "role": "Imports"
    },
    {
      "package": "foreach",
      "version": ">= 1.5.2",
      "role": "Imports"
    },
    {
      "package": "doParallel",
      "version": ">= 1.0.17",
      "role": "Imports"
    },
    {
      "package": "doRNG",
      "version": ">= 1.8.6",
      "role": "Imports"
    }
  ],
  "_owner": "kaifenglu",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "kaifenglu",
      "count": 45,
      "uuid": 95114218
    }
  ],
  "_userbio": {
    "uuid": 95114218,
    "type": "user",
    "name": "kaifenglu"
  },
  "_downloads": {
    "count": 144,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/drugDemand"
  },
  "_devurl": "https://github.com/kaifenglu/drugdemand",
  "_searchresults": 5,
  "_topics": [
    "cpp"
  ],
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/drugDemand.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/kaifenglu/drugdemand",
  "_realowner": "kaifenglu",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2023-10-23"
    },
    {
      "version": "0.1.1",
      "date": "2023-10-31"
    },
    {
      "version": "0.1.2",
      "date": "2023-12-21"
    },
    {
      "version": "0.1.3",
      "date": "2024-02-28"
    }
  ],
  "_exports": [
    "f_bar_chart",
    "f_cum_dose",
    "f_dispensing_models",
    "f_dose_draw",
    "f_dose_draw_1",
    "f_dose_draw_t_1",
    "f_dose_observed",
    "f_dose_pp",
    "f_drug_demand",
    "f_fit_di",
    "f_fit_ki",
    "f_fit_t0",
    "f_fit_ti",
    "f_ongoing_new",
    "rdirichlet"
  ],
  "_help": [],
  "_rundeps": [
    "askpass",
    "assertthat",
    "base64enc",
    "bbmle",
    "bdsmatrix",
    "BH",
    "bslib",
    "cachem",
    "cli",
    "codetools",
    "commonmark",
    "cpp11",
    "crosstalk",
    "curl",
    "data.table",
    "deSolve",
    "digest",
    "doParallel",
    "doRNG",
    "dplyr",
    "erify",
    "evaluate",
    "eventPred",
    "farver",
    "fastGHQuad",
    "fastmap",
    "fastmatrix",
    "flexsurv",
    "fontawesome",
    "foreach",
    "fs",
    "generics",
    "ggplot2",
    "glue",
    "gtable",
    "highr",
    "htmltools",
    "htmlwidgets",
    "httpuv",
    "httr",
    "isoband",
    "iterators",
    "jquerylib",
    "jsonlite",
    "knitr",
    "L1pack",
    "labeling",
    "later",
    "lattice",
    "lazyeval",
    "lifecycle",
    "lpSolve",
    "lrstat",
    "lsoda",
    "magrittr",
    "MASS",
    "Matrix",
    "memoise",
    "mgcv",
    "mime",
    "mstate",
    "muhaz",
    "mvtnorm",
    "nlme",
    "numDeriv",
    "openssl",
    "otel",
    "pillar",
    "pkgconfig",
    "plotly",
    "promises",
    "purrr",
    "quadprog",
    "R6",
    "rappdirs",
    "RColorBrewer",
    "Rcpp",
    "RcppArmadillo",
    "RcppParallel",
    "RcppThread",
    "rlang",
    "rmarkdown",
    "rngtools",
    "rstpm2",
    "S7",
    "sass",
    "scales",
    "shiny",
    "sourcetools",
    "statmod",
    "stringi",
    "stringr",
    "survival",
    "sys",
    "tibble",
    "tidyr",
    "tidyselect",
    "tinytex",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr",
    "xfun",
    "xtable",
    "yaml"
  ],
  "_sysdeps": [
    {
      "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"
    }
  ],
  "_score": 2,
  "_indexed": true,
  "_nocasepkg": "drugdemand",
  "_universes": [
    "kaifenglu"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.3",
      "date": "2026-06-04T03:17:30.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
      "fileid": "c98a055a09924ec655879f2d059127f3a882fd20b694a63d5cb98258f53e7003",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.3",
      "date": "2026-06-04T03:17:37.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
      "fileid": "6092a7fa00576f6dedaf3bfe4d851cb33d04f09516eecf65da3eed394175e772",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.3",
      "date": "2026-06-04T03:17:34.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
      "fileid": "e00eee385bbae0ba5cbc9dd4f38c29d07b603fb1e1437fd4a89a8379303949ab",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.3",
      "date": "2026-06-04T03:17:58.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
      "fileid": "c225e4ff1a797aea3b7be1bd888df5d89111a5f07f04b51ccca1f87a2fbc1b53",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.3",
      "date": "2026-06-04T03:16:34.000Z",
      "arch": "aarch64",
      "commit": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
      "fileid": "038440f007960d94ba49b4d2f33c59e8a9649a7035f75464b353d03db1e1bbfd",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.3",
      "date": "2026-06-04T03:18:21.000Z",
      "arch": "x86_64",
      "commit": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
      "fileid": "9d6997ba978b1374a4d8b40f2049cd08f3d4eaa70ae80289f6330c5bf131d9a4",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.1.3",
      "date": "2026-06-04T03:16:27.000Z",
      "arch": "aarch64",
      "commit": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
      "fileid": "d90521c6ebe4843d45d564d38e6a4dc97db6187d680863b72eeabe8a1096ffda",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.1.3",
      "date": "2026-06-04T03:18:25.000Z",
      "arch": "x86_64",
      "commit": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
      "fileid": "7129f322cac3d203612ee8dd656b635f312a5d61869ba2a5b655670c681195af",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.3",
      "date": "2026-06-04T03:17:45.000Z",
      "arch": "emscripten",
      "commit": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
      "fileid": "95c9a6b42a6ba12481c9862ab0ee8fde361eafbf17e3c217fb95912e75418a2d",
      "status": "success",
      "buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.3",
      "date": "2026-06-04T03:17:10.000Z",
      "arch": "x86_64",
      "commit": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
      "fileid": "bdfbe11bda3f23bf799f9edd1877560b4bdf593dcf0b182ad9a4194f29accfa9",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.3",
      "date": "2026-06-04T03:16:38.000Z",
      "arch": "x86_64",
      "commit": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
      "fileid": "ccc9d2431dd584dcc0af11a210a441fb8e862322a1a1a4467f9eb7eaf9491194",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.1.3",
      "date": "2026-06-04T03:16:36.000Z",
      "arch": "x86_64",
      "commit": "9ccfcbc0d55bfb9a630c084ecdb3b18c9ee28652",
      "fileid": "e41f1b26e997dfc8ce75f0f637c340c465e98cb3a707ebd02940cb0aca67d2fc",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/kaifenglu/actions/runs/26927940480"
    }
  ]
}