{
  "_id": "6af46edef58eaab79920a0ef",
  "Package": "glmbayes",
  "Type": "Package",
  "Title": "Bayesian Generalized Linear Models (IID Samples)",
  "Version": "0.9.76",
  "Date": "2026-08-06",
  "Authors@R": "c(\nperson(\"Kjell\", \"Nygren\", role = c(\"aut\", \"cre\"),\nemail = \"kjell.a.nygren@gmail.com\"),\nperson(\"The R Core Team\", role = c(\"ctb\", \"cph\"),\ncomment = \"R Mathlib sources, R stats modeling code, and derived/adapted routines\"),\nperson(\"The R Foundation\", role = \"cph\",\ncomment = \"Portions of R Mathlib and R source code\"),\nperson(\"Ross\", \"Ihaka\", role = c(\"ctb\", \"cph\"),\ncomment = \"R Mathlib and original R modeling infrastructure\"),\nperson(\"Robert\", \"Gentleman\", role = c(\"ctb\", \"cph\"),\ncomment = \"Portions of R Mathlib\"),\nperson(\"Simon\", \"Davies\", role = \"ctb\",\ncomment = \"Original R glm implementation\"),\nperson(\"Morten\", \"Welinder\", role = c(\"ctb\", \"cph\"),\ncomment = \"Portions of R Mathlib\"),\nperson(\"Martin\", \"Maechler\", role = \"ctb\",\ncomment = \"Portions of R Mathlib\")\n)",
  "Description": "Provides Bayesian linear and generalized linear model\nfitting with independent and identically distributed (iid)\nposterior samples. The main functions mirror R's lm() and glm()\ninterfaces while adding prior family specifications for\nGaussian, Poisson, binomial, and Gamma models with log-concave\nlikelihoods. Sampling for supported non-conjugate models uses\naccept-reject methods based on likelihood subgradients as in\nNygren and Nygren (2006) <doi:10.1198/016214506000000357>. The\npackage also includes tools for prior setup, posterior\nsummaries, prediction, diagnostics, simulation, vignettes, and\noptional 'OpenCL' acceleration for larger models.",
  "License": "GPL-2",
  "URL": "https://CRAN.R-project.org/package=glmbayes,\nhttps://github.com/knygren/glmbayes,\nhttps://knygren.r-universe.dev/glmbayes",
  "BugReports": "https://github.com/knygren/glmbayes/issues",
  "RdMacros": "Rdpack",
  "SystemRequirements": "Optional OpenCL support via the glmbayesCore\nbackend; source install of glmbayesCore with OpenCL for GPU\nacceleration.",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "LazyData": "true",
  "Language": "en-US",
  "Config/pak/sysreqs": "cmake make libicu-dev ocl-icd-opencl-dev",
  "Repository": "https://knygren.r-universe.dev",
  "Date/Publication": "2026-10-01 14:25:20 UTC",
  "RemoteUrl": "https://github.com/knygren/glmbayes",
  "RemoteRef": "HEAD",
  "RemoteSha": "155e0862495670bc35590fa0893c9eec85d808cc",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-11-11 13:27:44 UTC",
    "User": "root"
  },
  "Author": "Kjell Nygren [aut, cre],\nThe R Core Team [ctb, cph] (R Mathlib sources, R stats modeling code,\nand derived/adapted routines),\nThe R Foundation [cph] (Portions of R Mathlib and R source code),\nRoss Ihaka [ctb, cph] (R Mathlib and original R modeling\ninfrastructure),\nRobert Gentleman [ctb, cph] (Portions of R Mathlib),\nSimon Davies [ctb] (Original R glm implementation),\nMorten Welinder [ctb, cph] (Portions of R Mathlib),\nMartin Maechler [ctb] (Portions of R Mathlib)",
  "Maintainer": "Kjell Nygren <kjell.a.nygren@gmail.com>",
  "_user": "knygren",
  "_type": "src",
  "_file": "glmbayes_0.9.76.tar.gz",
  "_fileid": "https://r2.ropensci.org/5227cee182c919db6f29237b6ef9c71fbc5a99ceef4ba6a7f152a5166ae8075b",
  "_filesize": 5521984,
  "_sha256": "5227cee182c919db6f29237b6ef9c71fbc5a99ceef4ba6a7f152a5166ae8075b",
  "_expires": "2027-02-19T13:34:20.000Z",
  "_created": "2026-11-11T13:27:44.000Z",
  "_published": "2026-11-11T13:34:22.645Z",
  "_upstream": "https://github.com/knygren/glmbayes",
  "_status": "success",
  "_maintainer": {
    "name": "Kjell Nygren",
    "email": "kjell.a.nygren@gmail.com",
    "login": "knygren",
    "linkedin": "in/kjellnygren",
    "description": "Data and analytics professional in pharma. Hobby: R package development. Creator of glmbayes — iid posterior sampling for Bayesian GLMs.",
    "uuid": 7188517
  },
  "_jobs": [
    {
      "job": 130552402055,
      "time": 187,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "13860601782"
    },
    {
      "job": 130552401957,
      "time": 215,
      "config": "linux-release-x86_64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13859008516"
    },
    {
      "job": 130552401992,
      "time": 130,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "13859422997"
    },
    {
      "job": 130552401984,
      "time": 183,
      "config": "macos-release-arm64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13860807123"
    },
    {
      "job": 130549301970,
      "time": 361,
      "config": "source",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13858898131"
    },
    {
      "job": 130552401906,
      "time": 151,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "13860666663"
    },
    {
      "job": 130552401956,
      "time": 326,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "13860257706"
    },
    {
      "job": 130552402038,
      "time": 196,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "13860857132"
    },
    {
      "job": 130552402086,
      "time": 293,
      "config": "windows-release-x86_64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13860262700"
    }
  ],
  "_buildurl": "https://github.com/r-universe/knygren/actions/runs/43028482611",
  "_commit": {
    "id": "155e0862495670bc35590fa0893c9eec85d808cc",
    "author": "knygren <kjell.a.nygren@gmail.com>",
    "committer": "knygren <kjell.a.nygren@gmail.com>",
    "message": "Phase out re-exports of Envelope related functions\n",
    "time": 1790864720
  },
  "_distro": "resolute",
  "_host": "GitHub-Actions",
  "_registered": true,
  "_dependencies": [
    {
      "package": "MASS",
      "role": "Depends"
    },
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "coda",
      "role": "Imports"
    },
    {
      "package": "insight",
      "role": "Imports"
    },
    {
      "package": "bayestestR",
      "role": "Imports"
    },
    {
      "package": "glmbayesCore",
      "version": ">= 0.5.5",
      "role": "Imports"
    },
    {
      "package": "Rdpack",
      "version": ">= 0.11-0",
      "role": "Imports"
    },
    {
      "package": "opencltools",
      "version": ">= 0.8.1",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "bayesrules",
      "role": "Suggests"
    },
    {
      "package": "LearnBayes",
      "role": "Suggests"
    },
    {
      "package": "RcppParallel",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "spelling",
      "role": "Suggests"
    }
  ],
  "_owner": "knygren",
  "_selfowned": true,
  "_usedby": 1,
  "_updates": [
    {
      "week": "2025-46",
      "n": 7
    },
    {
      "week": "2025-47",
      "n": 7
    },
    {
      "week": "2025-48",
      "n": 10
    },
    {
      "week": "2025-49",
      "n": 2
    },
    {
      "week": "2025-50",
      "n": 7
    },
    {
      "week": "2025-51",
      "n": 7
    },
    {
      "week": "2025-52",
      "n": 16
    },
    {
      "week": "2026-01",
      "n": 35
    },
    {
      "week": "2026-02",
      "n": 7
    },
    {
      "week": "2026-03",
      "n": 28
    },
    {
      "week": "2026-04",
      "n": 52
    },
    {
      "week": "2026-05",
      "n": 17
    },
    {
      "week": "2026-06",
      "n": 22
    },
    {
      "week": "2026-07",
      "n": 3
    },
    {
      "week": "2026-08",
      "n": 4
    },
    {
      "week": "2026-09",
      "n": 6
    },
    {
      "week": "2026-10",
      "n": 9
    },
    {
      "week": "2026-11",
      "n": 4
    },
    {
      "week": "2026-12",
      "n": 21
    },
    {
      "week": "2026-13",
      "n": 42
    },
    {
      "week": "2026-14",
      "n": 1
    },
    {
      "week": "2026-15",
      "n": 19
    },
    {
      "week": "2026-16",
      "n": 38
    },
    {
      "week": "2026-17",
      "n": 64
    },
    {
      "week": "2026-18",
      "n": 18
    },
    {
      "week": "2026-19",
      "n": 3
    },
    {
      "week": "2026-20",
      "n": 17
    },
    {
      "week": "2026-21",
      "n": 8
    },
    {
      "week": "2026-22",
      "n": 24
    },
    {
      "week": "2026-23",
      "n": 9
    },
    {
      "week": "2026-24",
      "n": 2
    },
    {
      "week": "2026-25",
      "n": 5
    },
    {
      "week": "2026-26",
      "n": 1
    },
    {
      "week": "2026-28",
      "n": 4
    },
    {
      "week": "2026-29",
      "n": 3
    },
    {
      "week": "2026-30",
      "n": 1
    },
    {
      "week": "2026-31",
      "n": 5
    },
    {
      "week": "2026-32",
      "n": 5
    },
    {
      "week": "2026-39",
      "n": 3
    },
    {
      "week": "2026-40",
      "n": 3
    }
  ],
  "_tags": [
    {
      "name": "v0.9.3",
      "date": "2026-05-05"
    },
    {
      "name": "v0.9.5",
      "date": "2026-05-18"
    },
    {
      "name": "v0.9.6",
      "date": "2026-06-21"
    },
    {
      "name": "v0.9.7",
      "date": "2026-07-19"
    },
    {
      "name": "v0.9.75",
      "date": "2026-08-02"
    }
  ],
  "_stars": 5,
  "_contributors": [
    {
      "user": "knygren",
      "count": 826,
      "uuid": 7188517
    },
    {
      "user": "knygrensny",
      "count": 266,
      "uuid": 224791279
    },
    {
      "user": "danieljobrien",
      "count": 1,
      "uuid": 7174733
    }
  ],
  "_userbio": {
    "uuid": 7188517,
    "type": "user",
    "name": "Kjell Nygren",
    "followers": 2,
    "description": "Data and analytics professional in pharma. Hobby: R package development. Creator of glmbayes — iid posterior sampling for Bayesian GLMs."
  },
  "_downloads": {
    "count": 415,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/glmbayes"
  },
  "_devurl": "https://github.com/knygren/glmbayes",
  "_searchresults": 46,
  "_abi": {
    "exports": [
      {
        "key": "glmbayes/include",
        "hash": "41044e4d9619ad6e"
      }
    ],
    "imports": []
  },
  "_rbuild": "4.6.2",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/glmbayes.html",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md"
  ],
  "_homeurl": "https://github.com/knygren/glmbayes",
  "_realowner": "knygren",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.9.3",
      "date": "2026-05-04"
    },
    {
      "version": "0.9.5",
      "date": "2026-05-18"
    },
    {
      "version": "0.9.6",
      "date": "2026-06-21"
    },
    {
      "version": "0.9.7",
      "date": "2026-07-19"
    },
    {
      "version": "0.9.72",
      "date": "2026-07-26"
    },
    {
      "version": "0.9.75",
      "date": "2026-08-04"
    }
  ],
  "_exports": [
    "check_prior",
    "compute_gaussian_prior",
    "dBeta",
    "describe_prior",
    "dGamma",
    "diagnose_glmbayes",
    "dIndependent_Normal_Gamma",
    "directional_tail",
    "dNormal",
    "dNormal_Gamma",
    "extractDIC",
    "find_algorithm",
    "find_parameters",
    "get_data",
    "get_opencl_core_count",
    "get_parameters",
    "get_priors",
    "glmb",
    "glmb_Standardize_Model",
    "glmb.covratio",
    "glmb.dffits",
    "glmb.influence.measures",
    "glmb.wfit",
    "glmbfamfunc",
    "has_opencl",
    "lmb",
    "model_info",
    "multi_prior_setup",
    "pfamily",
    "pinvgamma_ct",
    "pnorm_ct",
    "Prior_Check",
    "Prior_Setup",
    "qinvgamma_ct",
    "rBeta_prior",
    "rBeta_reg",
    "rGamma_Conjugate_prior",
    "rGamma_Conjugate_reg",
    "rgamma_ct",
    "rGamma_prior",
    "rGamma_reg",
    "rglmb",
    "rIndependent_Normal_Gamma_prior",
    "rindepNormalGamma_reg",
    "rinvgamma_ct",
    "rlmb",
    "rnorm_ct",
    "rNormal_Gamma_prior",
    "rNormal_prior",
    "rNormal_reg",
    "rNormal_reg.wfit",
    "rNormalGamma_reg",
    "simfunction",
    "simulate_prior"
  ],
  "_datasets": [
    {
      "name": "AMI",
      "title": "Amitriptyline overdose data",
      "object": "AMI",
      "class": [
        "data.frame"
      ],
      "fields": [
        "TOT",
        "AMI",
        "GEN",
        "AMT",
        "PR",
        "DIAP",
        "QRS"
      ],
      "rows": 17,
      "table": true,
      "tojson": true
    },
    {
      "name": "BikeSharing",
      "title": "Bike Sharing Dataset (Processed)",
      "object": "BikeSharing",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "instant",
        "dteday",
        "season",
        "yr",
        "mnth",
        "hr",
        "holiday",
        "weekday",
        "workingday",
        "weathersit",
        "temp",
        "atemp",
        "hum",
        "windspeed",
        "casual",
        "registered",
        "cnt",
        "hr_num",
        "month_num",
        "part_of_day",
        "quarter",
        "hr_sin",
        "hr_cos",
        "mon_sin",
        "mon_cos"
      ],
      "rows": 17379,
      "table": true,
      "tojson": true
    },
    {
      "name": "Boston_centered",
      "title": "Boston housing data with mean-centered predictors",
      "object": "Boston_centered",
      "class": [
        "data.frame"
      ],
      "fields": [
        "crim",
        "zn",
        "indus",
        "chas",
        "nox",
        "rm",
        "age",
        "dis",
        "rad",
        "tax",
        "ptratio",
        "black",
        "lstat",
        "medv"
      ],
      "rows": 506,
      "table": true,
      "tojson": true
    },
    {
      "name": "carinsca",
      "title": "Canadian Automobile Insurance Claims for 1957-1958",
      "object": "carinsca",
      "class": [
        "data.frame"
      ],
      "fields": [
        "Merit",
        "Class",
        "Insured",
        "Premium",
        "Claims",
        "Cost"
      ],
      "rows": 20,
      "table": true,
      "tojson": true
    },
    {
      "name": "Cleveland",
      "title": "Cleveland Heart Disease Dataset",
      "object": "Cleveland",
      "class": [
        "data.frame"
      ],
      "fields": [
        "age",
        "sex",
        "cp",
        "trestbps",
        "chol",
        "fbs",
        "restecg",
        "thalach",
        "exang",
        "oldpeak",
        "slope",
        "ca",
        "thal",
        "num",
        "hd"
      ],
      "rows": 297,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "glmbayes-package",
      "title": "glmbayes: Bayesian Generalized Linear Models with iid Sampling",
      "topics": [
        "glmbayes-package",
        "glmbayes"
      ]
    },
    {
      "page": "AMI",
      "title": "Amitriptyline overdose data",
      "concept": [
        "Bayesian Binomial Regression"
      ],
      "topics": [
        "AMI"
      ]
    },
    {
      "page": "anova.glmb",
      "title": "Analysis of Deviance for Bayesian Generalized Linear Model Fits",
      "topics": [
        "anova.glmb"
      ]
    },
    {
      "page": "BikeSharing",
      "title": "Bike Sharing Dataset (Processed)",
      "concept": [
        "Bike sharing",
        "Count regression"
      ],
      "topics": [
        "BikeSharing"
      ]
    },
    {
      "page": "Boston_centered",
      "title": "Boston housing data with mean-centered predictors",
      "concept": [
        "Bayesian linear regression"
      ],
      "topics": [
        "Boston_centered"
      ]
    },
    {
      "page": "carinsca",
      "title": "Canadian Automobile Insurance Claims for 1957-1958",
      "concept": [
        "Bayesian Gamma Regression",
        "Bayesian Poisson Regression"
      ],
      "topics": [
        "carinsca"
      ]
    },
    {
      "page": "case.names.glmb",
      "title": "Case and Variable Names of Fitted Models",
      "topics": [
        "case.names.glmb",
        "variable.names.glmb"
      ]
    },
    {
      "page": "Cleveland",
      "title": "Cleveland Heart Disease Dataset",
      "concept": [
        "Bayesian Binomial Regression"
      ],
      "topics": [
        "Cleveland"
      ]
    },
    {
      "page": "compute_gaussian_prior",
      "title": "Compute Calibrated Gaussian Normal–Gamma Prior Components",
      "topics": [
        "compute_gaussian_prior"
      ]
    },
    {
      "page": "confint.glmb",
      "title": "Credible Intervals for Model Parameters",
      "topics": [
        "confint.glmb"
      ]
    },
    {
      "page": "dBeta",
      "title": "Prior Family Objects for Bayesian Models",
      "topics": [
        "dBeta"
      ]
    },
    {
      "page": "deviance.rglmb",
      "title": "Model Deviance",
      "topics": [
        "deviance.rglmb"
      ]
    },
    {
      "page": "dGamma",
      "title": "Prior Family Objects for Bayesian Models",
      "topics": [
        "dGamma"
      ]
    },
    {
      "page": "gpu_diagnostics",
      "title": "GPU and OpenCL diagnostics for 'glmbayes'",
      "topics": [
        "diagnose_glmbayes",
        "gpu_diagnostics",
        "has_opencl"
      ]
    },
    {
      "page": "dIndependent_Normal_Gamma",
      "title": "Prior Family Objects for Bayesian Models",
      "topics": [
        "dIndependent_Normal_Gamma"
      ]
    },
    {
      "page": "directional_tail",
      "title": "Directional Tail Diagnostic",
      "topics": [
        "directional_tail",
        "print.directional_tail"
      ]
    },
    {
      "page": "dNormal",
      "title": "Prior Family Objects for Bayesian Models",
      "topics": [
        "dNormal"
      ]
    },
    {
      "page": "dNormal_Gamma",
      "title": "Prior Family Objects for Bayesian Models",
      "topics": [
        "dNormal_Gamma"
      ]
    },
    {
      "page": "dummy.coef.glmb",
      "title": "Extract Coefficients in Original Coding",
      "topics": [
        "dummy.coef.glmb",
        "print.dummy_coef.glmb"
      ]
    },
    {
      "page": "extractDIC",
      "title": "Extract DIC from a Fitted Bayesian Model",
      "topics": [
        "extractAIC.glmb",
        "extractAIC.rglmb",
        "extractDIC"
      ]
    },
    {
      "page": "formula.summary.rglmb",
      "title": "Model Formulae for 'summary.rglmb' Objects",
      "topics": [
        "formula.summary.rglmb"
      ]
    },
    {
      "page": "get_opencl_core_count",
      "title": "Get the number of available OpenCL compute units",
      "topics": [
        "get_opencl_core_count"
      ]
    },
    {
      "page": "glmb",
      "title": "Fitting Bayesian Generalized Linear Models",
      "concept": [
        "modelfuns"
      ],
      "topics": [
        "glmb",
        "print.glmb"
      ]
    },
    {
      "page": "glmb_Standardize_Model",
      "title": "Standardize A Non-Gaussian Model",
      "topics": [
        "glmb_Standardize_Model"
      ]
    },
    {
      "page": "glmb.influence.measures",
      "title": "Bayesian Regression Diagnostics",
      "topics": [
        "cooks.distance.glmb",
        "dfbetas.glmb",
        "glmb.covratio",
        "glmb.dffits",
        "glmb.influence.measures",
        "rstandard.glmb",
        "rstudent.glmb"
      ]
    },
    {
      "page": "glmb.wfit",
      "title": "Bayesian Weighted Fitting Engines",
      "topics": [
        "glmb.wfit"
      ]
    },
    {
      "page": "glmbayes_bayestestR_prior_methods",
      "title": "bayestestR Prior-Checking Methods for glmb/lmb Model Objects",
      "topics": [
        "check_prior.glmb",
        "describe_prior.glmb",
        "glmbayes_bayestestR_prior_methods",
        "simulate_prior.glmb"
      ]
    },
    {
      "page": "glmbayes_insight_methods",
      "title": "insight Accessor Methods for glmb/lmb Model Objects",
      "topics": [
        "find_algorithm.glmb",
        "find_parameters.glmb",
        "get_data.glmb",
        "get_parameters.glmb",
        "get_priors.glmb",
        "glmbayes_insight_methods",
        "model_info.glmb"
      ]
    },
    {
      "page": "glmbfamfunc",
      "title": "Return family functions used during simulation and post processing",
      "topics": [
        "glmbfamfunc"
      ]
    },
    {
      "page": "influence.glmb",
      "title": "Bayesian Regression Diagnostics",
      "topics": [
        "influence.glmb"
      ]
    },
    {
      "page": "lmb",
      "title": "Fitting Bayesian Linear Models",
      "concept": [
        "modelfuns"
      ],
      "topics": [
        "lmb",
        "print.lmb"
      ]
    },
    {
      "page": "logLik.glmb",
      "title": "Extract Log-Likelihood",
      "topics": [
        "logLik.glmb"
      ]
    },
    {
      "page": "multi_prior_setup",
      "title": "Prior setup for multiple Gaussian responses",
      "topics": [
        "multi_prior_setup"
      ]
    },
    {
      "page": "pfamily",
      "title": "Prior Family Objects for Bayesian Models",
      "topics": [
        "pfamily"
      ]
    },
    {
      "page": "pinvgamma_ct",
      "title": "The Central Inverse-Gamma Distribution",
      "topics": [
        "pinvgamma_ct"
      ]
    },
    {
      "page": "plot.glmb",
      "title": "Plot posterior draws for objects of class 'glmb'.",
      "topics": [
        "plot.glmb"
      ]
    },
    {
      "page": "pnorm_ct",
      "title": "The Central Normal Distribution",
      "topics": [
        "pnorm_ct"
      ]
    },
    {
      "page": "predict.glmb",
      "title": "Predict Method for Bayesian GLM Fits",
      "topics": [
        "predict.glmb"
      ]
    },
    {
      "page": "Prior_Check",
      "title": "Checks for Prior-data conflicts",
      "topics": [
        "Prior_Check"
      ]
    },
    {
      "page": "Prior_Setup",
      "title": "Setup Prior Objects",
      "concept": [
        "prior"
      ],
      "topics": [
        "Prior_Setup"
      ]
    },
    {
      "page": "qinvgamma_ct",
      "title": "The Central Inverse-Gamma Distribution",
      "topics": [
        "qinvgamma_ct"
      ]
    },
    {
      "page": "rBeta_prior",
      "title": "Prior Simulation Functions for glmbayesCore pfamily Objects",
      "topics": [
        "rBeta_prior"
      ]
    },
    {
      "page": "rBeta_reg",
      "title": "Simulation Functions for Bayesian Generalized Linear Models",
      "topics": [
        "rBeta_reg"
      ]
    },
    {
      "page": "residuals.glmb",
      "title": "Accessing Bayesian Generalized Linear Model Fits",
      "topics": [
        "residuals.glmb",
        "residuals.lmb"
      ]
    },
    {
      "page": "residuals.rglmb",
      "title": "Deviance Residuals for 'rglmb' and 'summary.rglmb' Objects",
      "topics": [
        "residuals.rglmb"
      ]
    },
    {
      "page": "rGamma_Conjugate_prior",
      "title": "Prior Simulation Functions for glmbayesCore pfamily Objects",
      "topics": [
        "rGamma_Conjugate_prior"
      ]
    },
    {
      "page": "rGamma_Conjugate_reg",
      "title": "Simulation Functions for Bayesian Generalized Linear Models",
      "topics": [
        "rGamma_Conjugate_reg"
      ]
    },
    {
      "page": "rgamma_ct",
      "title": "The Central Gamma Distribution",
      "topics": [
        "rgamma_ct"
      ]
    },
    {
      "page": "rGamma_prior",
      "title": "Prior Simulation Functions for glmbayesCore pfamily Objects",
      "topics": [
        "rGamma_prior"
      ]
    },
    {
      "page": "rGamma_reg",
      "title": "Simulation Functions for Bayesian Generalized Linear Models",
      "topics": [
        "rGamma_reg"
      ]
    },
    {
      "page": "rglmb",
      "title": "The Bayesian Generalized Linear Model Distribution",
      "topics": [
        "rglmb"
      ]
    },
    {
      "page": "rIndependent_Normal_Gamma_prior",
      "title": "Prior Simulation Functions for glmbayesCore pfamily Objects",
      "topics": [
        "rIndependent_Normal_Gamma_prior"
      ]
    },
    {
      "page": "rindepNormalGamma_reg",
      "title": "Simulation Functions for Bayesian Generalized Linear Models",
      "topics": [
        "rindepNormalGamma_reg"
      ]
    },
    {
      "page": "rinvgamma_ct",
      "title": "The Central Inverse-Gamma Distribution",
      "topics": [
        "rinvgamma_ct"
      ]
    },
    {
      "page": "rlmb",
      "title": "The Bayesian Linear Model Distribution",
      "topics": [
        "rlmb"
      ]
    },
    {
      "page": "rnorm_ct",
      "title": "The Central Normal Distribution",
      "topics": [
        "rnorm_ct"
      ]
    },
    {
      "page": "rNormal_Gamma_prior",
      "title": "Prior Simulation Functions for glmbayesCore pfamily Objects",
      "topics": [
        "rNormal_Gamma_prior"
      ]
    },
    {
      "page": "rNormal_prior",
      "title": "Prior Simulation Functions for glmbayesCore pfamily Objects",
      "topics": [
        "rNormal_prior"
      ]
    },
    {
      "page": "rNormal_reg",
      "title": "Simulation Functions for Bayesian Generalized Linear Models",
      "topics": [
        "rNormal_reg"
      ]
    },
    {
      "page": "rNormal_reg.wfit",
      "title": "Bayesian Weighted Fitting Engines",
      "topics": [
        "rNormal_reg.wfit"
      ]
    },
    {
      "page": "rNormalGamma_reg",
      "title": "Simulation Functions for Bayesian Generalized Linear Models",
      "topics": [
        "rNormalGamma_reg"
      ]
    },
    {
      "page": "simfunction",
      "title": "Simulation Functions for Bayesian Generalized Linear Models",
      "topics": [
        "simfunction"
      ]
    },
    {
      "page": "simulate.glmb",
      "title": "Simulate Responses",
      "topics": [
        "simulate.glmb"
      ]
    },
    {
      "page": "summary.glmb",
      "title": "Summarizing Bayesian Generalized Linear Model Fits",
      "topics": [
        "print.summary.glmb",
        "summary.glmb"
      ]
    },
    {
      "page": "summary.mlmb",
      "title": "Summarize and print 'mlmb' fits",
      "topics": [
        "print.mlmb",
        "print.summary.mlmb",
        "summary.mlmb"
      ]
    },
    {
      "page": "summary.rgamma_reg",
      "title": "Summarizing Bayesian gamma_reg Distribution Functions",
      "topics": [
        "print.summary.rGamma_reg",
        "summary.rGamma_reg"
      ]
    },
    {
      "page": "summary.rglmb",
      "title": "Summarizing Bayesian Generalized Linear Model Distribution Functions",
      "topics": [
        "print.summary.rglmb",
        "summary.rglmb",
        "summary.rlmb"
      ]
    },
    {
      "page": "vcov.glmb",
      "title": "Calculate Variance-Covariance Matrix for a Fitted Model Object",
      "topics": [
        "vcov.glmb"
      ]
    }
  ],
  "_readme": "https://github.com/knygren/glmbayes/raw/HEAD/README.md",
  "_rundeps": [
    "backports",
    "bayestestR",
    "boot",
    "broom",
    "cli",
    "coda",
    "colorspace",
    "cowplot",
    "cpp11",
    "datawizard",
    "Deriv",
    "doBy",
    "dplyr",
    "farver",
    "forecast",
    "fracdiff",
    "generics",
    "ggplot2",
    "glmbayesCore",
    "glmmTMB",
    "glue",
    "gtable",
    "insight",
    "isoband",
    "jsonlite",
    "labeling",
    "lattice",
    "lifecycle",
    "lme4",
    "lmtest",
    "magrittr",
    "MASS",
    "Matrix",
    "mgcv",
    "minqa",
    "modelr",
    "nlme",
    "nloptr",
    "nmathopencl",
    "nnet",
    "numDeriv",
    "opencltools",
    "pbkrtest",
    "pillar",
    "pkgconfig",
    "purrr",
    "R6",
    "rbibutils",
    "RColorBrewer",
    "Rcpp",
    "RcppArmadillo",
    "RcppEigen",
    "RcppParallel",
    "Rdpack",
    "reformulas",
    "rlang",
    "RTMB",
    "S7",
    "sandwich",
    "scales",
    "stringi",
    "stringr",
    "tibble",
    "tidyr",
    "tidyselect",
    "timeDate",
    "TMB",
    "urca",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr",
    "zoo"
  ],
  "_vignettes": [
    {
      "source": "Chapter-00.Rmd",
      "filename": "Chapter-00.html",
      "title": "Chapter 00: Introduction",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Chapter 00: Introduction",
        "Part 1: An Introduction",
        "Part 2: Bayesian regression models",
        "Part 3: Generalized Linear Models",
        "Part 4: Advanced Topics",
        "Part 5: Simulation Methods and Technical Implementation",
        "Companion textbooks"
      ],
      "created": "2025-08-21 06:07:32",
      "modified": "2026-10-01 14:25:20",
      "commits": 19
    },
    {
      "source": "Chapter-01.Rmd",
      "filename": "Chapter-01.html",
      "title": "Chapter 01: Getting started with glmbayes",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Introductory Discussion",
        "2. Preparing a dataframe",
        "3. Calling the two functions",
        "3.1 Using the classical glm function",
        "3.1.1 Calling the classical glm function",
        "3.2 Setting the Prior and Calling the glmb function",
        "3.2.1 Setting the prior",
        "3.2.2 Calling the glmb function",
        "4. Printing the output",
        "4.1 Printed glm output",
        "4.1.1 Coefficients",
        "4.1.2 Null and Residual Degrees of Freedom",
        "4.1.3 Residual Deviance",
        "4.1.4 AIC",
        "4.2 Printed glmb output",
        "4.2.1 Posterior Mean Coefficients",
        "4.2.2 Effective Number of Parameters",
        "4.2.3 Expected Residual Deviance",
        "4.2.4 DIC",
        "5. Textbook Content Mappings",
        "5.1 Agresti - Foundations of Linear and Generalized Linear Models"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-05-28 10:00:00",
      "commits": 22
    },
    {
      "source": "Chapter-02-S01.Rmd",
      "filename": "Chapter-02-S01.html",
      "title": "Chapter 02-S01: Conjugate Models — Introduction and Overview",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. What is Bayesian inference, and why does it matter?",
        "1.1 The big picture",
        "1.2 Bayes' theorem",
        "1.3 Why conjugacy is a gift",
        "2. Three principles that run through all conjugate models",
        "2.1 The posterior is always a compromise",
        "2.2 Credible intervals mean what you think they mean",
        "2.3 The conjugate prototype and the regression generalization",
        "3. Putting it all together: from simple models to regression",
        "3.1 Roadmap",
        "3.2 What conjugacy gives you — and what it does not",
        "See also"
      ],
      "created": "2026-05-28 02:58:21",
      "modified": "2026-05-28 04:26:36",
      "commits": 2
    },
    {
      "source": "Chapter-02-S02.Rmd",
      "filename": "Chapter-02-S02.html",
      "title": "Chapter 02-S02: Normal–Normal Conjugacy for One Mean",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. The model",
        "1.1 Likelihood",
        "1.2 Prior",
        "1.3 Posterior derivation",
        "2. bayesrules illustration",
        "3. Real data: Old Faithful waiting times",
        "3.1 Fitting with lmb()",
        "4. Connection to glmbayes",
        "See also"
      ],
      "created": "2026-05-28 02:58:21",
      "modified": "2026-05-31 05:08:57",
      "commits": 2
    },
    {
      "source": "Chapter-02-S03.Rmd",
      "filename": "Chapter-02-S03.html",
      "title": "Chapter 02-S03: Beta–Binomial Conjugacy for One Proportion",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. The model",
        "1.1 Likelihood",
        "1.2 Prior",
        "1.3 Posterior derivation",
        "1.4 The posterior mean as a compromise",
        "2. bayesrules illustration",
        "3. Real data: the Bechdel test",
        "3.1 Fitting with glmb() using dBeta()",
        "4. Connection to glmbayes",
        "See also"
      ],
      "created": "2026-05-28 02:58:21",
      "modified": "2026-05-31 05:08:57",
      "commits": 2
    },
    {
      "source": "Chapter-02-S04.Rmd",
      "filename": "Chapter-02-S04.html",
      "title": "Chapter 02-S04: Gamma–Poisson Conjugacy for One Count Rate",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. The model",
        "1.1 Likelihood",
        "1.2 Prior",
        "1.3 Posterior derivation",
        "2. bayesrules illustration",
        "3. Fitting with glmb()",
        "4. Connection to glmbayes",
        "Appendix A. Heart transplant mortality (@Albert2009)",
        "A.1 Fitting with glmb()",
        "See also"
      ],
      "created": "2026-05-28 02:58:21",
      "modified": "2026-05-31 05:08:57",
      "commits": 3
    },
    {
      "source": "Chapter-02-S05.Rmd",
      "filename": "Chapter-02-S05.html",
      "title": "Chapter 02-S05: Gamma–Gamma Conjugacy for One Response Rate",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. The model",
        "1.1 Likelihood",
        "1.2 Prior",
        "1.3 Posterior derivation",
        "2. Illustration with base-R plots",
        "3. Real data: Boston Marathon finishing times",
        "3.1 Fitting with glmb()",
        "4. Connection to glmbayes",
        "See also"
      ],
      "created": "2026-05-28 02:58:21",
      "modified": "2026-05-31 05:08:57",
      "commits": 2
    },
    {
      "source": "Chapter-03.Rmd",
      "filename": "Chapter-03.html",
      "title": "Chapter 03: Estimating Bayesian linear models",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Introductory discussion",
        "2. Linear Model Structure and Gaussian Likelihood (Fixed Dispersion)",
        "2.1 Gaussian Log‑Likelihood (Fixed Dispersion)",
        "[\\ell(\\beta)",
        "2.2 Normal Prior on (\\beta)",
        "2.3 Log‑Posterior and Conjugate Updating",
        "[\\Sigma_",
        "[\\mu_",
        "2.4 Why Fixing Dispersion Matters",
        "3. Sample Data - Dobson's Plant weight data",
        "4. Calling the two functions",
        "4.1 Using the classical lm function",
        "4.1.1 Calling the classical lm function",
        "4.2 Setting the prior and calling the lmb function",
        "4.2.1 Setting the prior",
        "4.2.2 Calling the lmb function",
        "5. Summarizing the output",
        "5.1 Summarizing the lm output",
        "5.1.1 Residual summary",
        "5.1.2 Coefficient Estimates and Hypothesis Tests",
        "5.1.3 Model fit statistics",
        "5.2 Summarizing the lmb output",
        "5.2.1 Prior and maximum‐likelihood estimates",
        "5.2.2 Posterior estimates",
        "5.2.3 Directional Prior-Posterior Summaries",
        "5.2.4 Distribution percentiles"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-05-28 04:26:36",
      "commits": 31
    },
    {
      "source": "Chapter-04.Rmd",
      "filename": "Chapter-04.html",
      "title": "Chapter 04: Tailoring priors — leveraging the Prior_Setup function",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Introductory Discussion",
        "2. The default prior specification",
        "2.1 Identifiability and Full–Rank Likelihood Covariance",
        "2.2 Canonical Precision Definitions and Scaling",
        "2.3 Posterior Mean via Precision Matrices",
        "2.4 The impact of the \"null_model\" and \"null_effects\" defaults for the interpretation of model diagnostics",
        "3. Adjusting the strength of priors using pwt, n_prior, and sd",
        "3.1 Data Setup and Visualization",
        "3.2 Using the pwt argument to adjust the Zellner g-prior",
        "3.3 Using n_prior as an alternative",
        "3.4 Directly Specifying Prior Standard Deviations with sd",
        "4. Adjusting the prior means using intercept_source, effects_source, and mu",
        "4.1 Using intercept_source and effects_source",
        "4.2  The role of the intercept_source in setting the prior mean for the intercept",
        "4.2.1 Intercept Prior: Centered at Full Model MLE",
        "4.2.2 Effect Priors: Centered at Zero",
        "4.2.3 Summary",
        "4.3 The role of the effects_source in setting the prior mean for the model effects",
        "4.4 Manually Setting Prior Means Using mu",
        "4.4.1 How mu interacts with the other arguments",
        "4.4.2 Requirements for user‑specified mu",
        "4.4.3 When manual mu is useful",
        "4.4.4 Example: specifying a custom prior mean",
        "4.4.5 Relationship between mu and prior strength",
        "4.4.6 Summary",
        "5. Practical Considerations for Prior Means and Prior Strength",
        "5.1 Centering and Scaling of Predictors",
        "5.2 Choosing the Prior Mean for the Intercept",
        "5.3 Choosing the Prior Means for the Effects",
        "5.4 When to Specify mu Directly",
        "5.5 Choosing the Strength of the Prior",
        "5.6 Interaction Between Prior Location and Prior Strength",
        "5.7 Summary"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-05-26 22:48:29",
      "commits": 16
    },
    {
      "source": "Chapter-05.Rmd",
      "filename": "Chapter-05.html",
      "title": "Chapter 05: Model predictions and posterior predictive checks (+ bayesplot ppc_*)",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Reviewing Model Predictions",
        "Predictions for Actual Data",
        "Predictions for \"New\" Data",
        "Reviewing Model Residuals",
        "Posterior predictive checks with 'bayesplot' (optional)",
        "Using the DIC Statistic",
        "Running The Probit Model",
        "Running The Clog-Log Model",
        "Running The Reverse Clog-Log Model",
        "Comparing the DIC Statistics",
        "Plotting Predictions and Residuals For the Additional Models",
        "Probit Model",
        "clog-log Model",
        "Reverse clog-log Model"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-05-31 10:16:10",
      "commits": 17
    },
    {
      "source": "Chapter-06.Rmd",
      "filename": "Chapter-06.html",
      "title": "Chapter 06: Deviance residuals, model statistics and posterior inference (+ bayestestR)",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Reviewing Model Predictions",
        "Predictions for Actual Data",
        "Predictions for \"New\" Data",
        "Reviewing Model Residuals",
        "Posterior predictive checks with 'bayesplot' (optional)",
        "Using the DIC Statistic",
        "Running The Probit Model",
        "Running The Clog-Log Model",
        "Running The Reverse Clog-Log Model",
        "Comparing the DIC Statistics",
        "Plotting Predictions and Residuals For the Additional Models",
        "Probit Model",
        "clog-log Model",
        "Reverse clog-log Model"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-05-31 10:16:10",
      "commits": 14
    },
    {
      "source": "Chapter-07.Rmd",
      "filename": "Chapter-07.html",
      "title": "Chapter 07: Foundations of GLMs — families, links, and log-concave likelihoods",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Conceptual Overview",
        "1.1 Exponential Families: A Unifying Framework",
        "1.2 Canonical Link Functions",
        "1.3 Why Log-Concavity Matters",
        "(a) Existence of gradients and subgradients",
        "(b) Any local maximum is a global maximum",
        "(c) Validity of envelope construction methods",
        "(d) Simplified Bayesian computation",
        "2. Generalized Linear Models in Practice: Formulas, Families, and Links",
        "2.1 The Formula Interface and the Linear Predictor",
        "2.2 Family Objects: How glm Receives the Distribution and Link",
        "Specifying a non‑default link",
        "Binomial response formats",
        "Quasi‑families",
        "2.3 Link Functions: Connecting Means to Linear Predictors",
        "2.4 How glm Combines Formulas, Families, and Links",
        "A critical example: how glm receives formula, family, and link",
        "2.5 Transition to the Complete Family–Link Reference",
        "3. Families and Link Functions in glm()",
        "3.1 Families and Link Functions in Base R",
        "Notes",
        "3.2 How Families and Links Fit the Exponential‑Family Structure",
        "3.3 Where to Find the Full Mathematical Forms",
        "3.4 Why This Matters for Bayesian GLMs",
        "4. Bayesian GLMs with glmb()",
        "4.1 Relationship to Classical GLMs",
        "4.2 The pfamily Argument: Specifying Priors",
        "4.3 Supported Likelihood Families",
        "4.4 A Direct Illustration: Calling glmb() with Formulas, Families, and Priors",
        "4.5 Posterior Sampling",
        "4.6 Returned Object",
        "4.7 Related Functions",
        "5. Log‑Concavity, Envelopes, and Posterior Computation",
        "5.1 Why Log‑Concavity Matters",
        "5.2 Envelope Construction",
        "5.3 Posterior Computation Strategy",
        "5.4 Summary",
        "Appendix A. Full Exponential‑Family Forms for All glm() Families and Links",
        "Appendix A. Exponential-family and link reference tables",
        "A.1 Gaussian Family",
        "A.2 Binomial Family",
        "A.3 Poisson Family",
        "A.4 Gamma Family",
        "A.5 Inverse Gaussian Family",
        "A.6 Quasi Families"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-05-26 22:48:29",
      "commits": 14
    },
    {
      "source": "Chapter-08.Rmd",
      "filename": "Chapter-08.html",
      "title": "Chapter 08: Estimating Bayesian generalized linear models",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "General Discussion",
        "The Age of Menarche Data",
        "Variable Transformation and Preliminary Setup",
        "Setting prior point estimates, associated credible intervals, and correlation",
        "Mapping the prior to the link scale",
        "Running the Model",
        "Appendix A. Bayes Rules! companion — logistic priors on weather_perth",
        "Concluding Discussion"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-05-28 04:26:36",
      "commits": 15
    },
    {
      "source": "Chapter-09.Rmd",
      "filename": "Chapter-09.html",
      "title": "Chapter 09: Models for the Binomial family",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Introductory Discussion",
        "2. Binomial Likelihood and Weighted Formulation",
        "2.1 Linear predictor and mean structure",
        "2.2 Weighted binomial log‑likelihood",
        "[\\ell(\\beta)",
        "2.3 Exponential‑family representation",
        "The binomial likelihood belongs to the exponential family [@McCullagh1989; @Agresti2015].For a model with linear predictor[\\eta_i = x_i^\\top \\beta,]and mean[\\mu_i = g^{-1}(\\eta_i),]the contribution of observation (i) to the log‑likelihood can be written as[\\ell_i(\\beta)",
        "2.4 Link functions",
        "3. Specifying Binomial Models in glmbayes",
        "3.1 Prior Specification",
        "4. Logit Link: Likelihood, Prior, Posterior",
        "Weighted Log-Likelihood",
        "[\\ell_{\\text{logit}}(\\beta)",
        "Normal Prior",
        "[\\log p(\\beta)",
        "Log-Posterior",
        "[\\log p(\\beta \\mid y)",
        "\\sum_{i=1}^nw_i\\Big[y_i,\\eta_i - \\log(1+e^{\\eta_i})\\Big]",
        "4.1 Example Data",
        "4.2 Prior Setup",
        "4.3 Fit the Model",
        "4.4 Summary",
        "5. Probit Link: Likelihood, Prior, Posterior",
        "[\\ell_{\\text{probit}}(\\beta)",
        "\\sum_{i=1}^nw_i\\Big[y_i \\log\\Phi(\\eta_i)+(1-y_i)\\log\\big(1-\\Phi(\\eta_i)\\big)\\Big]",
        "5.1 Prior Setup",
        "5.2 Fit the Model",
        "5.3 Summary",
        "6. Complementary Log-Log (cloglog) Link: Likelihood, Prior, Posterior",
        "[\\ell_{\\text{cloglog}}(\\beta)",
        "\\sum_{i=1}^nw_i\\Big[y_i \\log!\\big(1 - e^{-e^{\\eta_i}}\\big)+(1-y_i)\\big(-e^{\\eta_i}\\big)\\Big]",
        "6.1 Prior Setup",
        "6.2 Fit the Model",
        "6.3 Summary",
        "7. Comparing Link Functions",
        "8. Concluding Discussion",
        "Appendix A. Bayes Rules! companion — Perth rain (weather_perth)"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-05-28 04:26:36",
      "commits": 14
    },
    {
      "source": "Chapter-10.Rmd",
      "filename": "Chapter-10.html",
      "title": "Chapter 10: Models for the Poisson family",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Introductory Discussion",
        "2. Poisson Likelihood and Model Structure",
        "2.1 Weighted Poisson Log‑Likelihood",
        "[\\ell(\\beta)",
        "\\sum_{i=1}^n\\left[w_i y_i \\log(\\mu_i)",
        "\\sum_{i=1}^n\\left[w_i y_i \\eta_i",
        "2.2 Exponential‑Family Representation",
        "2.3 Log Link and Its Properties",
        "2.4 Likelihood, Prior, and Posterior (Normal Prior on beta)",
        "[\\log p(\\beta)",
        "[\\log p(\\beta \\mid y)",
        "w_i e^{\\eta_i}\\right]",
        "3. Data Setup",
        "4. Classical Poisson Regression",
        "4.1 Interpretation of the Classical Output",
        "5. Bayesian Poisson Regression with glmb()",
        "5.1 Setting the Prior",
        "5.2 Calling glmb()",
        "6. Printing and Summarizing the Bayesian Output",
        "6.1 Posterior Mean Coefficients",
        "6.2 Effective Number of Parameters",
        "6.3 DIC",
        "7. Comparison of Classical and Bayesian Estimates",
        "8. Credible Intervals and Posterior Interpretation",
        "9. Concluding Remarks",
        "Appendix A. Bayes Rules! companion — equality_index Poisson regression"
      ],
      "created": "2020-07-05 01:43:45",
      "modified": "2026-05-31 05:08:57",
      "commits": 14
    },
    {
      "source": "Chapter-11.Rmd",
      "filename": "Chapter-11.html",
      "title": "Chapter 11: Models for the Gamma family",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Introductory Discussion",
        "2. Gamma Likelihood and Model Structure (Log Link, Fixed Dispersion)",
        "2.1 Weighted Gamma Log-Likelihood (Log Link)",
        "[\\ell(\\beta)",
        "\\sum_{i=1}^nw_i\\left[-\\frac{1}{\\phi},\\eta_i",
        "2.2 Exponential-Family Representation",
        "2.3 Log Link and Its Properties",
        "2.4 Likelihood, Prior, and Posterior (Normal Prior on (\\beta))",
        "[\\log p(\\beta)",
        "[\\log p(\\beta \\mid y)",
        "\\frac{1}{\\phi},y_i e^{-\\eta_i}\\right]",
        "3. Link Functions for Gamma GLMs",
        "4. Gamma Regression Example: Insurance Claims",
        "4.1 Data Setup",
        "4.2 Classical Gamma Regression Using glm()",
        "5. Bayesian Gamma Regression (fixed dispersion) with glmb()",
        "5.1 Estimating Dispersion via gamma.dispersion()",
        "5.2 Prior Setup Using Prior_Setup()",
        "5.3 Fitting the Bayesian Gamma Model",
        "5.4 Summarizing the Bayesian Model",
        "6. Interpretation and Model Diagnostics",
        "6.1 Coefficients",
        "6.2 Dispersion",
        "6.3 DIC and Model Fit",
        "7. Concluding Discussion",
        "Appendix A. Bayes Rules! companion"
      ],
      "created": "2020-07-05 13:36:43",
      "modified": "2026-05-28 04:26:36",
      "commits": 32
    },
    {
      "source": "Chapter-12.Rmd",
      "filename": "Chapter-12.html",
      "title": "Chapter 12: Visualizing posteriors with bayesplot",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Purpose",
        "2. Minimal binomial fit (Menarche)",
        "3. Coefficient trace and density overlays",
        "4. Posterior predictive checks",
        "See also"
      ],
      "created": "2025-08-21 06:07:32",
      "modified": "2026-05-31 10:16:10",
      "commits": 18
    },
    {
      "source": "Chapter-13.Rmd",
      "filename": "Chapter-13.html",
      "title": "Chapter 13: Bayesian inference and decision making with bayestestR",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Purpose",
        "2. Example: logistic regression posterior for coefficients",
        "3. Point and interval summaries",
        "See also"
      ],
      "created": "2025-12-30 17:50:04",
      "modified": "2026-05-31 10:16:10",
      "commits": 17
    },
    {
      "source": "Chapter-14.Rmd",
      "filename": "Chapter-14.html",
      "title": "Chapter 14: Informative priors — centering and differential prior weights",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "General Discussion",
        "The Age of Menarche Data",
        "Variable Transformation and Preliminary Setup",
        "Setting prior point estimates, associated credible intervals, and correlation",
        "Mapping the prior to the link scale",
        "Running the Model",
        "Concluding Discussion"
      ],
      "created": "2025-12-31 04:12:46",
      "modified": "2026-05-26 03:21:09",
      "commits": 8
    },
    {
      "source": "Chapter-15.Rmd",
      "filename": "Chapter-15.html",
      "title": "Chapter 15: Estimating models with unknown dispersion parameters",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Introduction",
        "2. Exponential-Family Background and Log-Concavity",
        "[\\ell(\\beta,\\phi)",
        "2.2 Special Case: Weighted Gaussian Linear Regression",
        "Weighted log-likelihood",
        "[\\ell(\\beta,\\tau)",
        "Exponential-family identification",
        "[c(y_i,\\phi)",
        "Weighted least squares representation",
        "Log-Concavity Properties in the Weighted Gaussian Case",
        "Concavity in ( \\beta )For fixed ( \\phi ), the negative weighted log-likelihood is[-\\ell(\\beta \\mid \\phi)",
        "Concavity in precision ( \\tau = 1/\\phi )Rewriting the weighted likelihood in terms of ( \\tau ):[\\ell(\\beta,\\tau)",
        "2.3 Special Case: Gamma Regression With a Log Link",
        "Log‑concavity",
        "Implications for Bayesian GLMs",
        "3. Gaussian Model With Unknown Dispersion",
        "3. Priors for Gaussian Models With Unknown Dispersion",
        "[\\mathrm{RSS}(\\beta)",
        "3.1 Prior on the Dispersion Only (Gamma Prior on Precision)",
        "[\\log p(\\tau)",
        "3.2 Joint Conjugate Normal–Gamma Prior",
        "Log-prior",
        "[\\log p(\\beta,\\tau)",
        "Log-posterior",
        "[\\log p(\\beta,\\tau \\mid y)",
        "3.3 Independent Normal–Gamma Prior",
        "3.3.1 Independent Normal Gamma Prior in glmbayes",
        "3.3.2 Two-Block Gibbs Sampling using glmbayes",
        "3.3.3 Comparison of the Two Samplers",
        "4. Gamma Regression Models With Unknown Dispersion",
        "4.1 Prior on the Dispersion Only (Gamma Prior on Precision)",
        "[\\log p(\\tau \\mid \\beta,y)",
        "4.2 Independent Normal–Gamma Prior",
        "Log‑prior",
        "Log‑posterior",
        "4.3 Conditional Sampling for the Dispersion Parameter",
        "8. Summary",
        "A1: Posterior Distribution Details for Conjugate Normal-Gamma prior",
        "A1.1 Marginal Posterior for ( \\tau )",
        "[S_",
        "Equivalently, expanding ( (I + X\\Sigma_{0}X^{\\mathsf T})^{-1} ) with theSherman--Morrison--Woodbury formula gives the same middle matrix in theprecision form[G - G\\left(\\Sigma_{0}^{-1} + G\\right)^{-1}G",
        "A1.2 Conditional Posterior for ( \\beta )",
        "[V_",
        "\\left(\\Sigma_",
        "A1.3 Sampling the Posterior",
        "Step 1: Draw the marginal posterior for ( \\tau )",
        "Step 2: Draw ( \\beta ) conditionally on each sampled ( \\tau )",
        "[V_",
        "[m_",
        "Result: Pure i.i.d. Monte Carlo Sampling",
        "A2. Detailed sampling procedured for the Independent Normal-Gamma prior",
        "A2.1 iid Sampling Under Truncated Gamma Priors",
        "A3. Posterior mean of ( \\beta ) and marginal covariance (Zellner-type prior)",
        "A3.1 Weighted likelihood and prior precision",
        "[\\mathrm",
        "A3.2 Posterior mean of ( \\beta )",
        "[\\tau G + \\tau \\frac{pwt}{1-pwt} G",
        "[\\mathrm{Cov}(\\beta \\mid \\tau, y)",
        "\\frac",
        "[\\boxed{E(\\beta \\mid y)",
        "(1-pwt),\\hat\\beta + pwt,\\mu_",
        "A3.3 Marginal covariance of ( \\beta ) and the Gamma parameters",
        "[V_",
        "[\\boxed{\\mathrm{Cov}(\\beta \\mid y)",
        "E(\\tau^",
        "[S_",
        "This is the same scalar as the augmented residual sum of squares S produced byrNormal_reg.wfit() (Section A1).Under the Zellner (g)-prior of A3.1, the prior covariance is(\\Sigma_",
        "Limit (pwt\\to 0) and coefficient covariance.Under the Zellner decomposition above, (pwt\\to 0^{+}) forces(S_{\\mathrm{marg}}\\to \\mathrm{RSS}) (for fixed data and (\\mu_{0}), with afinite mismatch quadratic), not only when (\\mu_{0}=\\hat\\beta).Since (b_{n} = b_{0} + \\tfrac{1}{2} S_{\\mathrm{marg}}), the marginal Gamma ratethen limits to (b_{0} + \\tfrac{1}{2}\\mathrm{RSS}) whenever (b_{0}) is heldfixed along the path; (E(\\tau^{-1}\\mid y)=b_{n}/(a_{n}-1)) therefore ties toRSS through (b_{n}) in the same limit.At the same time, ((1-pwt),G^{-1}\\to G^{-1}) from A3.2--A3.3.Thus (\\mathrm{Cov}(\\beta \\mid \\tau,y) = \\tau^{-1}(1-pwt),G^{-1}) tends to(\\tau^{-1}G^{-1}) (likelihood-only WLS covariance given (\\tau)), and[\\mathrm{Cov}(\\beta \\mid y)",
        "Prior_Setup() dispersion and the Gamma rates (b_{0}), (b_{n})",
        "Special case: (b_{0} = \\frac{1}{2}(n_{\\mathrm{prior}}/n_{w}),S_{\\mathrm{marg}})",
        "[\\frac",
        "\\frac",
        "Growth of (n_",
        "\\frac",
        "dGamma posterior with fixed (\\beta): general form and special choices",
        "Hence, for (n_{\\mathrm{prior}}+n_w>2),[E(\\tau^{-1}\\mid y,\\beta)",
        "\\frac",
        "Choice (\\beta=\\beta_\\star) (posterior mode from dNormal_Gamma) and weak-prior limit",
        "Using the weighted least-squares decomposition:[\\mathrm{RSS}_w(\\beta)",
        "\\mathrm{RSS}_w(\\hat\\beta)+(\\beta-\\hat\\beta)^\\top G(\\beta-\\hat\\beta),\\qquadG=X^\\top W X,]so[\\mathrm{RSS}w(\\beta\\star)",
        "Under scalar Zellner weighting, (\\beta_\\star=(1-pwt)\\hat\\beta+pwt,\\mu_0), giving[\\mathrm{RSS}w(\\beta\\star)"
      ],
      "created": "2025-12-31 04:12:46",
      "modified": "2026-05-26 22:48:29",
      "commits": 5
    },
    {
      "source": "Chapter-16.Rmd",
      "filename": "Chapter-16.html",
      "title": "Chapter 16: Large models — GPU acceleration using OpenCL",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "What you see when you load glmbayes",
        "Enabling GPU acceleration: three steps",
        "Step 1: Check whether OpenCL is already enabled",
        "Step 2: Ensure backend dependencies are OpenCL-ready",
        "Step 3: Reinstall glmbayesCore from source",
        "Windows",
        "Linux / macOS",
        "After the install",
        "Verifying the setup",
        "Running a GPU-accelerated model",
        "Appendix A: AMD GPUs on Linux (ROCm OpenCL)"
      ],
      "created": "2025-12-31 04:12:46",
      "modified": "2026-09-29 19:59:12",
      "commits": 5
    },
    {
      "source": "Chapter-17.Rmd",
      "filename": "Chapter-17.html",
      "title": "Chapter 17: Linear mixed-effects models",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Chapter 17: Linear mixed-effects models",
        "1. Use Case 1: Dispersion and Regression Coefficients (Gaussian)",
        "2. Use Case 2: Hierarchical (Random Effects) Models",
        "2.1 Eight Schools with dNormal_Gamma Prior (Gibbs-suitable)",
        "2.2 Eight Schools with dIndependent_Normal_Gamma Prior",
        "3. Summary"
      ],
      "created": "2026-05-26 03:21:09",
      "modified": "2026-05-26 03:21:09",
      "commits": 1
    },
    {
      "source": "Chapter-18.Rmd",
      "filename": "Chapter-18.html",
      "title": "Chapter 18: Generalized linear mixed-effects models",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Chapter 18: Generalized linear mixed-effects models",
        "1. Model Structure",
        "2. Data and Setup",
        "3. Two-Block Gibbs Sampler",
        "4. CODA Diagnostics",
        "5. Out-of-Sample Prediction",
        "6. Summary"
      ],
      "created": "2026-05-26 03:21:09",
      "modified": "2026-05-26 03:21:09",
      "commits": 1
    },
    {
      "source": "Chapter-A01.Rmd",
      "filename": "Chapter-A01.html",
      "title": "Chapter A01: A detailed overview of the glmbayes package",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Loading the package",
        "Accessing package information, general documentation, and demos",
        "Using the lmb and glmb functions and their methods",
        "The lmb and glmb functions",
        "Specifying Priors",
        "Prior Family Functions",
        "Other Prior Related Functions",
        "Method functions",
        "The rlmb and rglmb functions and their summary functions",
        "Calling the rlmb and rglmb functions",
        "Methods for The rlmb, rglmb, and their summary functions",
        "Advanced Topics",
        "Simulation Functions",
        "Normal_ct Functions",
        "Envelope-based sampling (glmbayesCore)",
        "Utility Functions"
      ],
      "created": "2026-03-06 20:30:57",
      "modified": "2026-10-01 14:25:20",
      "commits": 11
    },
    {
      "source": "Chapter-A03.Rmd",
      "filename": "Chapter-A03.html",
      "title": "Chapter A03: Methods available in glmbayes",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [],
      "created": "2026-03-06 20:30:57",
      "modified": "2026-03-29 01:25:20",
      "commits": 3
    },
    {
      "source": "Chapter-A04.Rmd",
      "filename": "Chapter-A04.html",
      "title": "Chapter A04: Directional Tail Diagnostics for Prior-Posterior Disagreement",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Directional tail diagnostic (current implementation)",
        "Theoretical interpretation and relation to t and F",
        "Relation to univariate t statistics",
        "Relation to multivariate Wald/F-style tests",
        "Interpretation: what probability is being assessed?",
        "Univariate connection to known Bayesian tail/sign summaries",
        "How magnitude compares to classical tests",
        "Strong-prior regime",
        "Weak-prior (data-dominant) limit",
        "Scalar decomposition (normal-gamma heuristic)",
        "Incorporating the package example (Ex_directional_tail.R)",
        "Illustrative plots from Ex_directional_tail.R",
        "How directional_tail() is called",
        "How summary.glmb() uses directional tail",
        "Minimal reproducible workflow",
        "Supplementary notes: why the Bayesian tail can be smaller",
        "1.3 Different centering (posterior mean vs. OLS) and prior shrinkage"
      ],
      "created": "2026-03-06 20:30:57",
      "modified": "2026-03-29 02:16:22",
      "commits": 5
    },
    {
      "source": "Chapter-A06.Rmd",
      "filename": "Chapter-A06.html",
      "title": "Chapter A06: Accept–Reject Sampling for Dispersion in Gamma Regression",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Introduction",
        "1.2 Likelihood",
        "[\\ell_i(v)",
        "v\\log v",
        "v\\log \\mu_i+(v-1)\\log y_i",
        "\\log\\Gamma(v)",
        "[\\ell(v)",
        "\\sum_{i=1}^nw_i\\left[v\\log v",
        "1.3 Prior",
        "1.4. Posterior Log‑Density",
        "[f(v)",
        "2. The sampler",
        "2.1 Proposal Distribution",
        "[\\begin{aligned}\\log p_{prop}(v) & = (a_0+  \\frac{1}{2}\\sum_i w_i )\\log [ b_0 - \\bar{c}(v_{\\text{tangent}})] ;-; \\log\\Gamma(a_0+  \\frac{1}{2}\\sum_i w_i ) \\[4pt]&  ;+; ((a_0+  \\frac{1}{2}\\sum_i w_i ) - 1)\\log v ;-; [ b_0 - \\bar{c}(v_{\\text{tangent}})] v.\\end{aligned}]",
        "2.2 Bounding function",
        "[\\log h(v)",
        "\\ell(v)",
        "\\bigl[\\ell(v_{\\text{tangent}})",
        "\\bar{c}(v_{\\text{tangent}})(v - v_{\\text{tangent}})\\bigr]",
        "2.3 Equivalence Claim",
        "2.4 Implementation Outline"
      ],
      "created": "2026-03-06 20:30:57",
      "modified": "2026-03-29 02:16:22",
      "commits": 3
    },
    {
      "source": "Chapter-A12.Rmd",
      "filename": "Chapter-A12.html",
      "title": "Chapter A12: Technical Derivations for Priors Returned by `Prior_Setup()",
      "author": "Kjell Nygren",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Chapter A12: Technical Derivations for Priors Returned by Prior_Setup()",
        "1. Introduction",
        "1. Introductory Discussion",
        "2. Default Priors for Coefficient Means and Covariance Matrices",
        "2.1 How prior means are determined",
        "2.2 Data precision $P(\\beta)$.",
        "2.3 Zellner-type prior using $P(\\beta^{\\ast})$",
        "2.3.1 Precision mapping and default covariance scaling",
        "[\\Sigma_0 = \\Sigma / d,]so[\\Sigma_0^",
        "d,\\Sigma^",
        "d,\\frac",
        "2.3.2 Posterior mean and Variance under dNormal()",
        "dNormal() (Gaussian, coefficient-scale covariance Sigma).For Gaussian likelihood precision $P(\\beta^\\ast)$ and prior precision$\\Sigma^{-1}$,[E(\\beta\\mid y)",
        "\\bigl(P(\\beta^\\ast)+\\Sigma^",
        "The posterior covariance is[\\mathrm{Var}(\\beta\\mid y)",
        "\\bigl(P(\\beta^\\ast)+\\Sigma^",
        "2.3.3 Marginal posterior mean under dNormal_Gamma()",
        "dNormal_Gamma() (Gaussian conjugate Normal--Gamma, using Sigma_0).The marginal posterior mean is[E(\\beta\\mid y)",
        "E_{\\tau\\mid y}!\\left[E(\\beta\\mid \\tau,y)\\right].]For fixed $\\tau$,[E(\\beta\\mid \\tau,y)",
        "\\bigl(\\tau X^",
        "2.4 Vector pwt and optional sd",
        "3. Default Priors for Dispersion, Shape, and Rate Parameters",
        "3.1 Posterior pieces: contribution from likelihood + Normal block",
        "and the marginal quadratic term[S_",
        "3.2 Prior-strength parameterization from pwt",
        "The scalar prior‑weight pwt is mapped to an effective prior sample size[n_",
        "\\frac",
        "The dispersion‑free covariance used in dNormal_Gamma() is[\\Sigma_0",
        "\\frac",
        "3.3 Gaussian prior-family calibration and parameter mapping",
        "3.3.1 Default calibration and posterior Gamma shape/rate",
        "Let (n_w=\\sum_i w_i) be the effective sample size (n_effective).For scalar pwt, Prior_Setup() defines the effective prior sample size[n_",
        "\\frac",
        "3.3.2 Conjugate Normal–Gamma posterior (dNormal_Gamma())",
        "Theorem 1 (Conjugate posterior under the default dNormal_Gamma() calibration)",
        "Let the prior be[\\beta\\mid\\tau\\sim N(\\mu,\\tau^{-1}\\Sigma_0),\\qquad\\tau\\sim\\Gamma(a_0,b_0),]with[\\Sigma_0",
        "\\frac",
        "(i) Posterior mean of (\\beta)",
        "[\\mu_",
        "\\mathrm{pwt},\\mu+(1-\\mathrm{pwt}),\\hat\\beta",
        "(ii) Posterior dispersion‑free covariance",
        "[\\Sigma_",
        "(\\Sigma_0^",
        "\\frac{n_{\\mathrm{prior}}}{n_{\\mathrm{prior}}+n_w},\\Sigma_0",
        "(iii) Posterior Gamma shape",
        "(iv) Posterior Gamma rate",
        "(v) Marginal posterior mean of (\\beta)",
        "(vi) Posterior expectation of (\\sigma^2=1/\\tau)",
        "For (a_n>1),[\\mathbb{E}[\\sigma^2\\mid y]",
        "\\frac",
        "(vii) Marginal posterior covariance of (\\beta)",
        "Let[V_n=\\Sigma_",
        "Then[\\mathrm{Cov}(\\beta\\mid y)",
        "\\mathbb{E}[\\sigma^2\\mid y],V_n",
        "Interpretation",
        "Theorem 2 (Weak‑prior limit of the dNormal_Gamma() posterior)",
        "Under the default calibration of Theorem 1, let[n_",
        "(i) Limiting posterior mean of (\\beta)",
        "[\\mu_",
        "\\lim_",
        "(ii) Limiting dispersion‑free covariance",
        "[\\Sigma_",
        "\\lim_",
        "(iii) Limiting Gamma shape",
        "[a_",
        "\\lim_{n_{\\mathrm{prior}}\\to 0^+} a_n",
        "(iv) Limiting Gamma rate",
        "[b_",
        "\\lim_{n_{\\mathrm{prior}}\\to 0^+} b_n",
        "(v) Limiting marginal mean of (\\beta)",
        "[\\mathbb{E}{\\Pi{0}}[\\beta\\mid y]",
        "\\mu_",
        "(vi) Limiting expectation of (\\sigma^2 = 1/\\tau)",
        "For (\\tau\\mid y \\sim \\Gamma(a_{\\Pi_{0}},b_{\\Pi_{0}})),[\\mathbb{E}{\\Pi{0}}[\\sigma^2\\mid y]",
        "\\frac",
        "(vii) Limiting marginal covariance of (\\beta)",
        "[\\mathrm{Cov}{\\Pi{0}}(\\beta\\mid y)",
        "\\mathbb",
        "Proof of Theorem 2.",
        "By Theorem 1, for each (n_{\\mathrm{prior}}>0) the dNormal_Gamma posterior is Normal–Gamma withhyperparameters[\\mu_{\\mathrm{post}}(n_{\\mathrm{prior}}),\\quad\\Sigma_{0,\\mathrm{post}}(n_{\\mathrm{prior}}),\\quada_n(n_{\\mathrm{prior}}),\\quadb_n(n_{\\mathrm{prior}}),]given explicitly by[\\mu_{\\mathrm{post}}(n_{\\mathrm{prior}})",
        "\\frac{n_{\\mathrm{prior}}}{n_{\\mathrm{prior}}+n_w},\\mu+\\frac{n_w}{n_{\\mathrm{prior}}+n_w},\\hat\\beta,][\\Sigma_{0,\\mathrm{post}}(n_{\\mathrm{prior}})",
        "\\frac{n_w}{n_{\\mathrm{prior}}+n_w},G^{-1},][a_n(n_{\\mathrm{prior}})",
        "\\frac{n_{\\mathrm{prior}}+k+n_w}{2},\\qquadb_n(n_{\\mathrm{prior}})",
        "3.3.3 Posterior covariance under dNormal() with default dispersion",
        "Covariance under fixed (\\sigma^2)",
        "From Section 2.3.2, under scalar pwt,[\\mathrm{Var}(\\beta\\mid y,\\sigma^2)",
        "For weighted Gaussian regression,[P(\\beta^\\ast)",
        "\\sigma^{-2}X^{\\mathsf T}W_{\\mathrm{obs}}X,]so[\\mathrm{Var}(\\beta\\mid y,\\sigma^2)",
        "Using[n_",
        "\\frac",
        "\\frac{n_w}{n_w+n_{\\mathrm{prior}}},]this becomes[\\mathrm{Var}(\\beta\\mid y,\\sigma^2)",
        "Default dispersion",
        "To choose a default fixed value of (\\sigma^2), Prior_Setup() uses theposterior mean from the Normal–Gamma model (Theorem 1 (vi)):[\\mathrm",
        "Substituting this into the covariance expression gives[\\mathrm{Var}(\\beta\\mid y,\\mathrm{dispersion}_{\\mathrm{default}})",
        "Calibrated prior covariance returned by Prior_Setup()",
        "With the same default dispersion, Prior_Setup() returns the coefficient‑scaleprior covariance[\\Sigma_",
        "Weak‑prior limit",
        "3.3.4 Independent Normal–Gamma Prior",
        "Coefficient-scale covariance:[\\Sigma",
        "ING Gamma shape:[\\mathrm",
        "a_0 + \\frac",
        "Gamma rate:[\\texttt",
        "b_0",
        "Theorem 3 (Weak-prior limit of the Independent Normal–Gamma posterior)",
        "From the posterior ratio identity in A.2 and Lemma B, we have, for each (n_{\\mathrm{prior}}>0),[\\Pi^{(\\mathrm{ING})}{n{\\mathrm{prior}}}(\\mathrm{d}\\beta,\\mathrm{d}\\tau)",
        "Let (f\\colon\\mathbb",
        "For the moment statements, take (f(\\beta,\\tau)=\\beta_j),(f(\\beta,\\tau)=\\tau^{-1}), and(f(\\beta,\\tau)=(\\beta-\\mathbb{E}{\\Pi_0}[\\beta])(\\beta-\\mathbb{E}{\\Pi_0}[\\beta])^\\top) componentwise.Lemma A again applies because Assumptions 4–5 ensure that the NG Gamma parametersstay uniformly bounded away from zero, giving uniform integrability of the correspondingNG moments.The same envelope (M) from Claim B.2 transfers this to the ING path via the ratiorepresentation. Hence dominated convergence applies to these (unbounded) test functionsas well, yielding[\\mathbb{E}{\\Pi^{(\\mathrm{ING})}{n_{\\mathrm{prior}}}}[\\beta]\\to\\mathbb{E}{\\Pi_0}[\\beta]=\\hat\\beta,\\quad\\mathbb{E}{\\Pi^{(\\mathrm{ING})}{n{\\mathrm{prior}}}}[\\tau^{-1}]\\to\\mathbb{E}_{\\Pi_0}[\\tau^{-1}]",
        "\\frac{\\mathrm{RSS}w}{n_w-p},]and[\\mathrm{Cov}{\\Pi^{(\\mathrm{ING})}{n{\\mathrm{prior}}}}(\\beta\\mid y)\\to\\mathrm{Cov}_{\\Pi_0}(\\beta\\mid y)",
        "3.3.5 dGamma() Prior (Fixed $\\beta$, Gamma Prior on Precision)",
        "Prior on (\\tau) (fixed-$\\beta$ path)",
        "Posterior for (\\tau) given (y) and fixed (\\beta^{+})",
        "Posterior expectation of (\\sigma^2 = 1/\\tau)",
        "For (a_n > 1),[E[\\sigma^2 \\mid y, \\beta^{+}]",
        "\\frac",
        "This completes the description of the fixed-$\\beta$ Gamma prior used by dGamma() andrGamma_reg().",
        "Appendix A: Technical Ingredients for the ING Weak‑Prior Limit",
        "A.1 Common Gaussian Setup",
        "A.2 Posterior Ratio Representation",
        "NG prior (Theorem 1, §3.3.2)",
        "For each (n_{\\mathrm{prior}} > 0),[\\beta \\mid \\tau \\sim N!\\left(\\mu,;\\tau^{-1}\\Sigma_0\\right),\\qquad\\tau \\sim \\Gamma!\\left(a_0(n_{\\mathrm{prior}}),, b_0(n_{\\mathrm{prior}})\\right),]where the dispersion–free Zellner matrix is[\\Sigma_0",
        "ING prior (§3.3.4)",
        "The ING prior uses a fixed coefficient–scale covariance and a Gamma shape shifted by (p/2):[\\beta \\mid n_{\\mathrm{prior}} \\sim N!\\left(\\mu,;\\Sigma(n_{\\mathrm{prior}})\\right),\\qquad\\tau \\sim \\Gamma!\\left(a_0(n_{\\mathrm{prior}})+\\tfrac{p}{2},; b_0(n_{\\mathrm{prior}})\\right),]with (\\beta) and (\\tau) independent, and[\\Sigma(n_{\\mathrm{prior}})",
        "Ratio of prior kernels",
        "Define[R_{n_{\\mathrm{prior}}}(\\beta,\\tau)",
        "Because the ING Gamma shape equals the NG Gamma shape plus (p/2), the (\\tau)-powers match and cancel.The ratio therefore reduces to[R_{n_{\\mathrm{prior}}}(\\beta,\\tau)",
        "Posterior ratio identity",
        "A.3 Lemma A: Uniform moment bounds for the NG path",
        "Lemma A (Uniform moment bounds for the NG posterior)",
        "Claim A.1 (Continuity and compactness of NG hyperparameters)",
        "[\\mu_{\\mathrm{post}}(n_{\\mathrm{prior}})",
        "[\\Sigma_{0,\\mathrm{post}}(n_{\\mathrm{prior}})",
        "[a_n(n_{\\mathrm{prior}})",
        "\\frac{n_{\\mathrm{prior}} + k + n_w}{2},\\qquadb_n(n_{\\mathrm{prior}})",
        "Proof of Lemma A",
        "Bounds for (\\tau)",
        "[\\mathbb{E}[\\tau \\mid y, n_{\\mathrm{prior}}]",
        "\\frac{a_n(n_{\\mathrm{prior}})}{b_n(n_{\\mathrm{prior}})},\\qquad\\mathbb{E}[\\tau^2 \\mid y, n_{\\mathrm{prior}}]",
        "Bounds for (\\beta)",
        "[\\mathbb{E}[\\beta \\mid y, n_{\\mathrm{prior}}]",
        "[\\mathrm{Cov}(\\beta \\mid y, n_{\\mathrm{prior}})",
        "[\\mathbb{E}[\\sigma^2 \\mid y, n_{\\mathrm{prior}}]",
        "[\\mathbb{E}\\bigl[|\\beta|^2 \\mid y, n_{\\mathrm{prior}}\\bigr]",
        "A.4 Lemma B: Ratio convergence and domination",
        "Let (R_{n_{\\mathrm{prior}}}(\\beta,\\tau)) be the posterior density ratio[R_{n_{\\mathrm{prior}}}(\\beta,\\tau)",
        "Claim B.1 (Explicit prior ratio and quadratic form)",
        "Then (\\tilde R_{n_{\\mathrm{prior}}}) can be written in the form[\\tilde R_{n_{\\mathrm{prior}}}(\\beta,\\tau)",
        "From Section A.2, the NG and ING prior kernels are[\\pi^{(\\mathrm{NG})}{n{\\mathrm{prior}}}(\\beta,\\tau)\\propto\\tau^{a_0(n_{\\mathrm{prior}})+p/2-1}\\exp!\\left(-b_0(n_{\\mathrm{prior}})\\tau-\\frac{\\tau}{2}(\\beta-\\mu)^\\top\\Sigma_0^{-1}(\\beta-\\mu)\\right),][\\pi^{(\\mathrm{ING})}{n{\\mathrm{prior}}}(\\beta,\\tau)\\propto\\tau^{a_0(n_{\\mathrm{prior}})+p/2-1}\\exp!\\left(-b_0(n_{\\mathrm{prior}})\\tau\\right)\\exp!\\left(-\\frac{1}{2}(\\beta-\\mu)^\\top\\Sigma(n_{\\mathrm{prior}})^{-1}(\\beta-\\mu)\\right),]with[\\Sigma_0",
        "\\frac{1-pwt}{pwt},(X^\\top W_{\\mathrm{obs}}X)^{-1},\\qquad\\Sigma(n_{\\mathrm{prior}})",
        "The (\\tau)-powers match (ING shape = NG shape (+;p/2)), so[\\tilde R_{n_{\\mathrm{prior}}}(\\beta,\\tau)",
        "\\frac",
        "Then[\\tilde R_{n_{\\mathrm{prior}}}(\\beta,\\tau)",
        "Using the explicit formula for (\\Sigma(n_",
        "\\frac{n_{\\mathrm{prior}}}{n_w},\\frac{n_w - p}{\\mathrm{Smarg}},(X^\\top W_{\\mathrm{obs}}X),]we see that (\\Sigma(n_{\\mathrm{prior}})^{-1}\\to 0) as (n_{\\mathrm{prior}}\\to 0^+).This uses Assumptions 2–3 to ensure the scalar prefactor is positive.Hence, for each fixed (\\beta),[h_{n_{\\mathrm{prior}}}(\\beta)",
        "Claim B.2 (Uniform envelope and integrability)",
        "[M(\\beta,\\tau)",
        "Recall[R_{n_{\\mathrm{prior}}}(\\beta,\\tau)",
        "\\frac",
        "\\tilde R_",
        "\\iint L(y\\mid\\beta,\\tau),\\pi^",
        "Step 1: Envelope for (\\tilde R_{n_{\\mathrm{prior}}}).",
        "From Claim B.1 and the explicit formulas in A.2,[\\log \\tilde R_{n_{\\mathrm{prior}}}(\\beta,\\tau)",
        "Step 2: Boundedness of the normalizing–constant ratio.",
        "Step 3: Envelope for (R_{n_{\\mathrm{prior}}}) and integrability under (\\Pi_0).",
        "Combining Steps 1–2,[\\bigl|R_{n_{\\mathrm{prior}}}(\\beta,\\tau)\\bigr|\\leK,M_0(\\beta,\\tau)",
        "Write both posteriors as[\\pi^{(\\cdot)}{n{\\mathrm{prior}}}(\\beta,\\tau\\mid y)\\proptoL(y\\mid\\beta,\\tau),\\pi^{(\\cdot)}{n{\\mathrm{prior}}}(\\beta,\\tau),]with the common Gaussian likelihood (L(y\\mid\\beta,\\tau)) from Section A.1.The likelihood cancels in the posterior ratio, so[R_{n_{\\mathrm{prior}}}(\\beta,\\tau)",
        "\\frac",
        "\\tilde R_",
        "\\iint L,\\pi^",
        "By Claim B.1,[\\tilde R_{n_{\\mathrm{prior}}}(\\beta,\\tau)",
        "In our explicit construction, (q_{n_{\\mathrm{prior}}}(\\beta)) does not depend on(n_{\\mathrm{prior}}) at all, and[h_{n_{\\mathrm{prior}}}(\\beta)",
        "Next, write the normalizing–constant ratio as[\\frac",
        "\\frac",
        "\\frac",
        "Finally,[R_{n_{\\mathrm{prior}}}(\\beta,\\tau)",
        "A.8 Summary",
        "Appendix B: Derivation of Theorem 1 (Conjugate Normal–Gamma posterior)",
        "B.1 Setup and joint kernel",
        "Under the Zellner calibration in §3.3.2,[\\Sigma_0",
        "\\frac",
        "The joint prior–likelihood kernel in ((\\beta,\\tau)) is[\\pi(\\beta,\\tau\\mid y)\\propto\\tau^{a_0-1}\\exp(-b_0\\tau),\\tau^{p/2}\\exp!\\Bigl(-\\tfrac{\\tau}{2}(\\beta-\\mu)^\\top\\Sigma_0^{-1}(\\beta-\\mu)\\Bigr),\\tau^{n_w/2}\\exp!\\Bigl(-\\tfrac{\\tau}{2}\\mathrm{RSS}_w(\\beta)\\Bigr),]where[\\mathrm{RSS}_w(\\beta)",
        "B.2 Posterior Normal block: mean and dispersion‑free covariance",
        "Write[G_{\\mathrm{post}} := G + \\Sigma_0^{-1},]and complete the square:[(\\beta-\\hat\\beta)^\\top G(\\beta-\\hat\\beta)+(\\beta-\\mu)^\\top\\Sigma_0^{-1}(\\beta-\\mu)",
        "Using (\\Sigma_0^",
        "\\Bigl(1+\\frac{n_w}{n_{\\mathrm{prior}}}\\Bigr)G",
        "\\frac",
        "Substituting into (\\mu_",
        "\\frac",
        "G_",
        "\\frac",
        "B.3 Posterior Gamma block: shape and rate",
        "The integral over (\\beta) is a multivariate Gaussian integral:[\\int \\tau^{p/2}\\exp!\\Bigl(-\\tfrac{\\tau}{2}Q(\\beta)\\Bigr),d\\beta",
        "After cancellation, the only remaining powers of (\\tau) are[a_0 - 1 + \\frac{n_w}{2},]so the posterior Gamma shape is[a_n",
        "a_0 + \\frac",
        "\\frac",
        "Thus[b_n = b_0 + \\frac",
        "\\frac",
        "B.4 Marginal moments of (\\beta) and (\\sigma^2)",
        "Given (\\tau), the posterior factorizes as[\\beta\\mid\\tau,y \\sim N\\bigl(\\mu_",
        "\\frac",
        "\\frac{n_{\\mathrm{prior}}+n_w}{n_w},G^{-1},][a_n",
        "\\frac{n_{\\mathrm{prior}}+k+n_w}{2},\\qquadb_n",
        "Marginal mean of (\\beta).Using the law of total expectation,[E[\\beta\\mid y]",
        "E_\\tau\\bigl[E[\\beta\\mid\\tau,y]\\bigr]",
        "E_\\tau[\\mu_{\\mathrm{post}}]",
        "\\mu_{\\mathrm{post}},]since (\\mu_{\\mathrm{post}}) does not depend on (\\tau). Thus[E[\\beta\\mid y]",
        "Marginal mean of (\\sigma^2 = \\tau^{-1}).For (\\tau\\sim\\Gamma(a_n,b_n)) with shape–rate parameterization,[E[\\tau^{-1}\\mid y]",
        "Substituting the expressions for (a_n) and (b_n),[E[\\sigma^2\\mid y]",
        "\\frac",
        "Marginal covariance of (\\beta).By the law of total covariance,[\\mathrm{Cov}(\\beta\\mid y)",
        "E_\\tau\\bigl[\\mathrm{Cov}(\\beta\\mid\\tau,y)\\bigr]+\\mathrm{Cov}\\tau\\bigl(E[\\beta\\mid\\tau,y]\\bigr).]Since (E[\\beta\\mid\\tau,y]=\\mu{\\mathrm{post}}) does not depend on (\\tau), the second term vanishes and[\\mathrm{Cov}(\\beta\\mid y)",
        "E_\\tau\\bigl[\\tau^{-1}\\Sigma_{0,\\mathrm{post}}\\bigr]",
        "Substitute:[a_n-1",
        "\\frac{n_{\\mathrm{prior}}+k+n_w}{2}-1",
        "\\frac{n_{\\mathrm{prior}}+k+n_w-2}{2},]so[E[\\tau^{-1}\\mid y]",
        "\\frac",
        "Step 2: (\\Sigma_",
        "Under the Zellner calibration,[\\Sigma_0",
        "\\frac",
        "Hence[\\Sigma_0^{-1} + G",
        "\\Bigl(\\frac{\\mathrm{pwt}}{1-\\mathrm{pwt}} + 1\\Bigr)G",
        "\\frac",
        "Now use the mapping between (\\mathrm",
        "\\frac",
        "Thus[\\Sigma_",
        "(1-\\mathrm",
        "Step 3: Combine the pieces.Putting Steps 1 and 2 together,[\\mathrm{Cov}(\\beta\\mid y)",
        "E[\\tau^",
        "In particular, the covariance can be written as[\\mathrm{Cov}(\\beta\\mid y)"
      ],
      "created": "2026-04-10 02:50:11",
      "modified": "2026-05-26 22:48:29",
      "commits": 11
    }
  ],
  "_score": 8.888067113407438,
  "_indexed": true,
  "_nocasepkg": "glmbayes",
  "_universes": [
    "knygren"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.9.76",
      "date": "2026-11-11T13:30:43.000Z",
      "distro": "resolute",
      "commit": "155e0862495670bc35590fa0893c9eec85d808cc",
      "fileid": "https://r2.ropensci.org/a6f631eeb467df4b2a5e62fac91e915e32d51ba6f077ec8a6a6092c59a305493",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/43028482611"
    },
    {
      "r": "4.6.2",
      "os": "linux",
      "version": "0.9.76",
      "date": "2026-11-11T13:31:15.000Z",
      "distro": "resolute",
      "commit": "155e0862495670bc35590fa0893c9eec85d808cc",
      "fileid": "https://r2.ropensci.org/5c58200a9e4656cd9e2eb8b09dbd0ec9e00e30af26d27707ea11f2513bba1517",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/43028482611"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.9.76",
      "date": "2026-11-11T13:30:31.000Z",
      "commit": "155e0862495670bc35590fa0893c9eec85d808cc",
      "fileid": "https://r2.ropensci.org/846aeb1bc42f8baaf546b5cc8807ec74f145f8ba364b83b563759891c0560359",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/43028482611"
    },
    {
      "r": "4.6.2",
      "os": "mac",
      "version": "0.9.76",
      "date": "2026-11-11T13:31:14.000Z",
      "commit": "155e0862495670bc35590fa0893c9eec85d808cc",
      "fileid": "https://r2.ropensci.org/e8d0aebd56e08bc9ba6c1e5c2ec4e2fbab04f599feb933c6dfcd52d9b92308bc",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/43028482611"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.9.76",
      "date": "2026-11-11T13:30:57.000Z",
      "commit": "155e0862495670bc35590fa0893c9eec85d808cc",
      "fileid": "https://r2.ropensci.org/af58f8d2efbbf63991b18ec235190ff4c59d47609530793caf12f5a570bc09eb",
      "status": "success",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/43028482611"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.9.76",
      "date": "2026-11-11T13:31:45.000Z",
      "commit": "155e0862495670bc35590fa0893c9eec85d808cc",
      "fileid": "https://r2.ropensci.org/94e3880f401823ef482ed508e3c52d1f28c515b784f74b397e20a909ca5375b6",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/43028482611"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.9.76",
      "date": "2026-11-11T13:30:22.000Z",
      "commit": "155e0862495670bc35590fa0893c9eec85d808cc",
      "fileid": "https://r2.ropensci.org/b11a7ce26865e61d1f2bc8ad574f5b3114f19392a382c070718c38d688b19b9f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/43028482611"
    },
    {
      "r": "4.6.2",
      "os": "win",
      "version": "0.9.76",
      "date": "2026-11-11T13:31:31.000Z",
      "commit": "155e0862495670bc35590fa0893c9eec85d808cc",
      "fileid": "https://r2.ropensci.org/e055667e99552c276b95a2e083dfa29167de7b4d408ac9ae80a1905f1b4b2fce",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/knygren/actions/runs/43028482611"
    }
  ]
}