{
  "_id": "6aaea00e3d719c1f8407d2bd",
  "Package": "hmclearn",
  "Type": "Package",
  "Title": "Fit Statistical Models Using Hamiltonian Monte Carlo",
  "Version": "0.0.5",
  "Authors@R": "c(person(given = \"Samuel\",\nfamily = \"Thomas\",\nrole = c(\"cre\", \"aut\"),\nemail = \"samthoma@iu.edu\"),\nperson(given = \"Wanzhu\",\nfamily = \"Tu\",\nrole = \"ctb\",\nemail = \"wtu1@iu.edu\"))",
  "Maintainer": "Samuel Thomas <samthoma@iu.edu>",
  "Description": "Provide users with a framework to learn the intricacies of\nthe Hamiltonian Monte Carlo algorithm with hands-on experience\nby tuning and fitting their own models.  All of the code is\nwritten in R.  Theoretical references are listed below:. Neal,\nRadford (2011) \"Handbook of Markov Chain Monte Carlo\" ISBN:\n978-1420079418, Betancourt, Michael (2017) \"A Conceptual\nIntroduction to Hamiltonian Monte Carlo\" <arXiv:1701.02434>,\nThomas, S., Tu, W. (2020) \"Learning Hamiltonian Monte Carlo in\nR\" <arXiv:2006.16194>, Gelman, A., Carlin, J. B., Stern, H. S.,\nDunson, D. B., Vehtari, A., & Rubin, D. B. (2013) \"Bayesian\nData Analysis\" ISBN: 978-1439840955, Agresti, Alan (2015)\n\"Foundations of Linear and Generalized Linear Models ISBN:\n978-1118730034, Pinheiro, J., Bates, D. (2006) \"Mixed-effects\nModels in S and S-Plus\" ISBN: 978-1441903174.",
  "License": "GPL-3",
  "Encoding": "UTF-8",
  "Language": "en-US",
  "LazyData": "true",
  "RoxygenNote": "7.1.1",
  "VignetteBuilder": "knitr",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-09-19 14:41:04 UTC",
    "User": "root"
  },
  "Author": "Samuel Thomas [cre, aut], Wanzhu Tu [ctb]",
  "Config/pak/sysreqs": "libicu-dev",
  "Repository": "https://cranhaven.r-universe.dev",
  "Date/Publication": "2026-09-19 05:02:00 UTC",
  "RemoteUrl": "https://github.com/cranhaven/cranhaven.r-universe.dev",
  "RemoteRef": "package/hmclearn",
  "RemoteSha": "90830186b825b00f5c4d80e5d596cbc58ed20367",
  "RemoteSubdir": "hmclearn",
  "_user": "cranhaven",
  "_type": "src",
  "_file": "hmclearn_0.0.5.tar.gz",
  "_fileid": "https://r2.ropensci.org/c1fb41cf994e0dd729f93291c6960799df2e5ca9d8ba8d74db83c35cccd68f14",
  "_filesize": 2168101,
  "_sha256": "c1fb41cf994e0dd729f93291c6960799df2e5ca9d8ba8d74db83c35cccd68f14",
  "_expires": "2026-12-28T14:45:32.000Z",
  "_created": "2026-09-19T14:41:04.000Z",
  "_published": "2026-09-19T14:45:34.830Z",
  "_jobs": [
    {
      "job": 105914094700,
      "time": 134,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "ERROR",
      "artifact": "10586453758"
    },
    {
      "job": 105914094658,
      "time": 219,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "ERROR",
      "artifact": "10585682858"
    },
    {
      "job": 105914094653,
      "time": 118,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "ERROR",
      "artifact": "10586158995"
    },
    {
      "job": 105914094694,
      "time": 133,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "ERROR",
      "artifact": "10586363754"
    },
    {
      "job": 105913610357,
      "time": 218,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "10585744085"
    },
    {
      "job": 105914094671,
      "time": 137,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "10586413756"
    },
    {
      "job": 105914094719,
      "time": 110,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "ERROR",
      "artifact": "10586523569"
    },
    {
      "job": 105914094746,
      "time": 111,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "ERROR",
      "artifact": "10585967534"
    },
    {
      "job": 105914094702,
      "time": 106,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "ERROR",
      "artifact": "10586333725"
    }
  ],
  "_host": "GitHub-Actions",
  "_buildurl": "https://github.com/r-universe/cranhaven/actions/runs/35449308626",
  "_status": "success",
  "_upstream": "https://github.com/cranhaven/cranhaven.r-universe.dev",
  "_commit": {
    "id": "90830186b825b00f5c4d80e5d596cbc58ed20367",
    "author": "GitHub Action <action@github.com>",
    "committer": "GitHub Action <action@github.com>",
    "message": "Add hmclearn to CRANhaven, because archived on 2026-09-19 05:02:00 +0000\n",
    "time": 1789794120
  },
  "_maintainer": {
    "name": "Samuel Thomas",
    "email": "samthoma@iu.edu"
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.6",
      "role": "Depends"
    },
    {
      "package": "bayesplot",
      "role": "Imports"
    },
    {
      "package": "parallel",
      "role": "Imports"
    },
    {
      "package": "MASS",
      "role": "Imports"
    },
    {
      "package": "mvtnorm",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "Matrix",
      "role": "Suggests"
    },
    {
      "package": "lme4",
      "role": "Suggests"
    },
    {
      "package": "carData",
      "role": "Suggests"
    },
    {
      "package": "mlbench",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "mlmRev",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "MCMCpack",
      "role": "Suggests"
    }
  ],
  "_owner": "cranhaven",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-38",
      "n": 1
    }
  ],
  "_tags": [],
  "_topics": [
    "archived",
    "packages",
    "r-universe"
  ],
  "_stars": 5,
  "_contributors": [
    {
      "user": "henrikbengtsson",
      "count": 183,
      "uuid": 1616850
    }
  ],
  "_userbio": {
    "uuid": 161993010,
    "type": "organization",
    "name": "cranhaven",
    "followers": 3,
    "description": "CRANhaven - Repository for Recently Archived CRAN Packages"
  },
  "_downloads": {
    "count": 320,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/hmclearn"
  },
  "_devurl": "https://github.com/cranhaven/cranhaven.r-universe.dev",
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/hmclearn.html",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md"
  ],
  "_homeurl": "https://github.com/sthomas522/hmclearn",
  "_realowner": "sthomas522",
  "_cranurl": false,
  "_releases": [
    {
      "version": "0.0.3",
      "date": "2020-06-25"
    },
    {
      "version": "0.0.4",
      "date": "2020-07-27"
    },
    {
      "version": "0.0.5",
      "date": "2020-10-05"
    }
  ],
  "_exports": [
    "diagplots",
    "g_glmm_bin_posterior",
    "g_glmm_poisson_posterior",
    "g_linear_posterior",
    "g_lmm_posterior",
    "g_logistic_posterior",
    "g_poisson_posterior",
    "glmm_bin_posterior",
    "glmm_poisson_posterior",
    "hmc",
    "hmc.fit",
    "leapfrog",
    "linear_posterior",
    "lmm_posterior",
    "logistic_posterior",
    "mcmc_acf",
    "mcmc_acf_bar",
    "mcmc_areas",
    "mcmc_dens",
    "mcmc_hex",
    "mcmc_hist",
    "mcmc_hist_by_chain",
    "mcmc_intervals",
    "mcmc_neff",
    "mcmc_neff_data",
    "mcmc_neff_hist",
    "mcmc_pairs",
    "mcmc_rhat",
    "mcmc_rhat_hist",
    "mcmc_scatter",
    "mcmc_trace",
    "mcmc_violin",
    "mh",
    "mh.fit",
    "neff",
    "poisson_posterior",
    "psrf",
    "qfun",
    "qprop"
  ],
  "_datasets": [
    {
      "name": "Drugs",
      "title": "Student Drug Usage Dataset",
      "object": "Drugs",
      "class": [
        "data.frame"
      ],
      "fields": [
        "A",
        "C",
        "M",
        "count"
      ],
      "rows": 8,
      "table": true,
      "tojson": true
    },
    {
      "name": "Endometrial",
      "title": "Endometrial Cancer Dataset",
      "object": "Endometrial",
      "class": [
        "data.frame"
      ],
      "fields": [
        "NV",
        "PI",
        "EH",
        "HG"
      ],
      "rows": 79,
      "table": true,
      "tojson": true
    },
    {
      "name": "Gdat",
      "title": "Count of Fresh Gopher Tortoise Shells",
      "object": "Gdat",
      "class": [
        "data.frame"
      ],
      "fields": [
        "Site",
        "year",
        "shells",
        "type",
        "Area",
        "density",
        "prev"
      ],
      "rows": 30,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "coef.hmclearn",
      "title": "Extract Model Coefficients",
      "topics": [
        "coef.hmclearn"
      ]
    },
    {
      "page": "diagplots",
      "title": "Diagnostic plots for 'hmclearn'",
      "topics": [
        "diagplots"
      ]
    },
    {
      "page": "diagplots.hmclearn",
      "title": "Diagnostic plots for 'hmclearn'",
      "topics": [
        "diagplots.hmclearn"
      ]
    },
    {
      "page": "Drugs",
      "title": "Student Drug Usage Dataset",
      "topics": [
        "Drugs"
      ]
    },
    {
      "page": "Endometrial",
      "title": "Endometrial Cancer Dataset",
      "topics": [
        "Endometrial"
      ]
    },
    {
      "page": "Gdat",
      "title": "Count of Fresh Gopher Tortoise Shells",
      "topics": [
        "Gdat"
      ]
    },
    {
      "page": "hmc",
      "title": "Fit a generic model using Hamiltonian Monte Carlo (HMC)",
      "topics": [
        "hmc"
      ]
    },
    {
      "page": "hmc.fit",
      "title": "Fitter function for Hamiltonian Monte Carlo (HMC)",
      "topics": [
        "hmc.fit"
      ]
    },
    {
      "page": "hmclearn-glm-posterior",
      "title": "Sample log posterior and gradient functions for select generalized linear models and mixed effect models",
      "topics": [
        "glmm_bin_posterior",
        "glmm_poisson_posterior",
        "g_glmm_bin_posterior",
        "g_glmm_poisson_posterior",
        "g_linear_posterior",
        "g_lmm_posterior",
        "g_logistic_posterior",
        "g_poisson_posterior",
        "hmclearn-glm-posterior",
        "linear_posterior",
        "lmm_posterior",
        "logistic_posterior",
        "poisson_posterior"
      ]
    },
    {
      "page": "hmclearn-plots",
      "title": "Plotting for MCMC visualization and diagnostics provided by 'bayesplot' package",
      "topics": [
        "hmclearn-plots",
        "mcmc_acf",
        "mcmc_acf.hmclearn",
        "mcmc_acf_bar",
        "mcmc_acf_bar.hmclearn",
        "mcmc_areas",
        "mcmc_areas.hmclearn",
        "mcmc_dens",
        "mcmc_dens.hmclearn",
        "mcmc_hex",
        "mcmc_hex.hmclearn",
        "mcmc_hist",
        "mcmc_hist.hmclearn",
        "mcmc_hist_by_chain",
        "mcmc_hist_by_chain.hmclearn",
        "mcmc_intervals",
        "mcmc_intervals.hmclearn",
        "mcmc_neff",
        "mcmc_neff.hmclearn",
        "mcmc_neff_data",
        "mcmc_neff_data.hmclearn",
        "mcmc_neff_hist",
        "mcmc_neff_hist.hmclearn",
        "mcmc_pairs",
        "mcmc_pairs.hmclearn",
        "mcmc_rhat",
        "mcmc_rhat.hmclearn",
        "mcmc_rhat_hist",
        "mcmc_rhat_hist.hmclearn",
        "mcmc_scatter",
        "mcmc_scatter.hmclearn",
        "mcmc_trace",
        "mcmc_trace.hmclearn",
        "mcmc_violin",
        "mcmc_violin.hmclearn"
      ]
    },
    {
      "page": "leapfrog",
      "title": "Leapfrog Algorithm for Hamiltonian Monte Carlo",
      "topics": [
        "leapfrog"
      ]
    },
    {
      "page": "mh",
      "title": "Fit a generic model using Metropolis-Hastings (MH)",
      "topics": [
        "mh"
      ]
    },
    {
      "page": "mh.fit",
      "title": "Fitter function for Metropolis-Hastings (MH)",
      "topics": [
        "mh.fit"
      ]
    },
    {
      "page": "neff",
      "title": "Effective sample size calculation",
      "topics": [
        "neff"
      ]
    },
    {
      "page": "neff.hmclearn",
      "title": "Effective sample size calculation",
      "topics": [
        "neff.hmclearn"
      ]
    },
    {
      "page": "plot.hmclearn",
      "title": "Plot Histograms of the Posterior Distribution",
      "topics": [
        "plot.hmclearn"
      ]
    },
    {
      "page": "predict.hmclearn",
      "title": "Model Predictions for HMC or MH",
      "topics": [
        "predict.hmclearn"
      ]
    },
    {
      "page": "psrf",
      "title": "Calculates Potential Scale Reduction Factor (psrf), also called the Rhat statistic, from models fit via 'mh' or 'hmc'",
      "topics": [
        "psrf"
      ]
    },
    {
      "page": "psrf.hmclearn",
      "title": "Calculates Potential Scale Reduction Factor (psrf), also called the Rhat statistic, from models fit via 'mh' or 'hmc'",
      "topics": [
        "psrf.hmclearn"
      ]
    },
    {
      "page": "qfun",
      "title": "Multivariate Normal Density of Theta1 | Theta2",
      "topics": [
        "qfun"
      ]
    },
    {
      "page": "qprop",
      "title": "Simulate from Multivariate Normal Density for Metropolis Algorithm",
      "topics": [
        "qprop"
      ]
    },
    {
      "page": "summary.hmclearn",
      "title": "Summarizing HMC Model Fits",
      "topics": [
        "summary.hmclearn"
      ]
    }
  ],
  "_readme": "https://github.com/cranhaven/cranhaven.r-universe.dev/raw/package/hmclearn/hmclearn/README.md",
  "_rundeps": [
    "abind",
    "backports",
    "bayesplot",
    "checkmate",
    "cli",
    "cpp11",
    "distributional",
    "dplyr",
    "farver",
    "generics",
    "ggdist",
    "ggplot2",
    "ggridges",
    "glue",
    "gtable",
    "isoband",
    "labeling",
    "lifecycle",
    "magrittr",
    "MASS",
    "matrixStats",
    "mvtnorm",
    "numDeriv",
    "pillar",
    "pkgconfig",
    "plyr",
    "posterior",
    "purrr",
    "quadprog",
    "R6",
    "RColorBrewer",
    "Rcpp",
    "reshape2",
    "rlang",
    "S7",
    "scales",
    "stringi",
    "stringr",
    "tensorA",
    "tibble",
    "tidyr",
    "tidyselect",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "linear_mixed_effects_hmclearn.Rmd",
      "filename": "linear_mixed_effects_hmclearn.html",
      "title": "hmclearn: Linear Mixed Effects Regression Example",
      "author": "Samuel Thomas",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Derive log posterior and gradient for HMC",
        "Linear mixed effects model example data",
        "Comparison model - Frequentist",
        "Fit model using hmc",
        "Source",
        "References"
      ],
      "created": "2026-09-19 05:02:00",
      "modified": "2026-09-19 05:02:00",
      "commits": 1
    },
    {
      "source": "linear_regression_hmclearn.Rmd",
      "filename": "linear_regression_hmclearn.html",
      "title": "hmclearn: Linear Regression Example",
      "author": "Samuel Thomas",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Derive log posterior and gradient for HMC",
        "Linear Regression Example Data",
        "Comparison model - Frequentist",
        "Fit model using hmc",
        "MCMC summary and diagnostics",
        "Source",
        "References"
      ],
      "created": "2026-09-19 05:02:00",
      "modified": "2026-09-19 05:02:00",
      "commits": 1
    },
    {
      "source": "logistic_mixed_effects_hmclearn.Rmd",
      "filename": "logistic_mixed_effects_hmclearn.html",
      "title": "hmclearn: Logistic Mixed Effects Regression Example",
      "author": "Samuel Thomas",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Derive log posterior and gradient for HMC",
        "Logistic mixed effects model example data",
        "QR decomposition of design matrix",
        "Fit model using hmc",
        "Comparison model - Frequentist",
        "Source",
        "References"
      ],
      "created": "2026-09-19 05:02:00",
      "modified": "2026-09-19 05:02:00",
      "commits": 1
    },
    {
      "source": "logistic_regression_hmclearn.Rmd",
      "filename": "logistic_regression_hmclearn.html",
      "title": "hmclearn: Logistic Regression Example",
      "author": "Samuel Thomas",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Derive log posterior and gradient for HMC",
        "Logistic Regression Example Data",
        "Comparison models - Frequentist and Metropolis-Hastings",
        "Fit model using hmc",
        "MCMC summary and diagnostics",
        "Source",
        "Reference"
      ],
      "created": "2026-09-19 05:02:00",
      "modified": "2026-09-19 05:02:00",
      "commits": 1
    },
    {
      "source": "poisson_regression_hmclearn.Rmd",
      "filename": "poisson_regression_hmclearn.html",
      "title": "hmclearn: Poisson Regression Example",
      "author": "Samuel Thomas",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Derive log posterior and gradient for HMC",
        "Poisson Regression Example Data",
        "Comparison model - Frequentist",
        "Fit model using hmc",
        "MCMC summary and diagnostics",
        "Source",
        "References"
      ],
      "created": "2026-09-19 05:02:00",
      "modified": "2026-09-19 05:02:00",
      "commits": 1
    }
  ],
  "_score": 4.096910013008056,
  "_indexed": false,
  "_nocasepkg": "hmclearn",
  "_universes": [
    "cranhaven"
  ],
  "_indexurl": "https://sthomas522.r-universe.dev/hmclearn",
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.0.5",
      "date": "2026-09-19T14:43:12.000Z",
      "distro": "resolute",
      "commit": "90830186b825b00f5c4d80e5d596cbc58ed20367",
      "fileid": "https://r2.ropensci.org/ce30b6e00210de657636d704de060ed2fa35ecc72d1ec7b0adb5fb894d7b0bd9",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/cranhaven/actions/runs/35449308626"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.0.5",
      "date": "2026-09-19T14:44:22.000Z",
      "distro": "resolute",
      "commit": "90830186b825b00f5c4d80e5d596cbc58ed20367",
      "fileid": "https://r2.ropensci.org/9bf88f5fe6efb3d24c1772acef1b743cecedbfa7fb6e7281573f56ad0dae6c17",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/cranhaven/actions/runs/35449308626"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.0.5",
      "date": "2026-09-19T14:42:47.000Z",
      "commit": "90830186b825b00f5c4d80e5d596cbc58ed20367",
      "fileid": "https://r2.ropensci.org/6eb61358832836f19fa3bd38c96ced2cf4d0c8bc83fe60027f5a2ae4209514b2",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/cranhaven/actions/runs/35449308626"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.0.5",
      "date": "2026-09-19T14:43:01.000Z",
      "commit": "90830186b825b00f5c4d80e5d596cbc58ed20367",
      "fileid": "https://r2.ropensci.org/2dbc455e1bb00e9ead86643cddf1a7056d74591503964b22c33f6ab6a3e618d3",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/cranhaven/actions/runs/35449308626"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.0.5",
      "date": "2026-09-19T14:43:37.000Z",
      "commit": "90830186b825b00f5c4d80e5d596cbc58ed20367",
      "fileid": "https://r2.ropensci.org/ef7291a3e0ff11e951f2fc12f43443cf3bfdc34b35065390185e690a18c0a487",
      "status": "success",
      "buildurl": "https://github.com/r-universe/cranhaven/actions/runs/35449308626"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.0.5",
      "date": "2026-09-19T14:42:18.000Z",
      "commit": "90830186b825b00f5c4d80e5d596cbc58ed20367",
      "fileid": "https://r2.ropensci.org/d7a44726dac6f724eecab8dfaf0bb8f250e8606e80f5c0418c365d7d2c6fda3d",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/cranhaven/actions/runs/35449308626"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.0.5",
      "date": "2026-09-19T14:42:25.000Z",
      "commit": "90830186b825b00f5c4d80e5d596cbc58ed20367",
      "fileid": "https://r2.ropensci.org/66d13e7118525bd8ac16d6db35e4dc38055fb2ec8b9da8b3ac8d6e7ca80a49d8",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/cranhaven/actions/runs/35449308626"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.0.5",
      "date": "2026-09-19T14:42:17.000Z",
      "commit": "90830186b825b00f5c4d80e5d596cbc58ed20367",
      "fileid": "https://r2.ropensci.org/f9a747cebcd3a26519162f724c5ea996a0798fc612a27065378f5ab9dec05928",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/cranhaven/actions/runs/35449308626"
    }
  ]
}