Publications by Ken Wood

Hierarchical Mixture Models & Likelihoods

08.08.2023

We have the mixture model written as \[f(x) = \sum_{k=1}^{K}w_kg_k(x)\] We will introduce an indicator \(C\), which is a (discrete) random variable where \(C \in 1,2,,,,K\). Then, \(X|C \sim g_c(x)\) and \(C\sim Pr(C=k) = w_k\), and \[Pr(X)=\sum_{k=1}^{K}f(x|C=k)Pr(C=k)=\sum_{k=1}^{K}w_kg_k(x)\] Setting up the hierarchical problem: \(X|C \sim g_c(x...

6848 sym Python (603 sym/1 pcs) 1 img

Hierarchical Mixture Models & Likelihoods

07.08.2023

We have the mixture model written as \[f(x) = \sum_{k=1}^{K}\omega_kg_k(x)\] We will introduce an indicator \(C\), which is a (discrete) random variable where \(C \in 1,2,,,,K\). Then, \(X|C \sim g_c(x)\) and \(C\sim Pr(C=k) = \omega_k\), and \[Pr(X)=\sum_{k=1}^{K}f(x|C=k)Pr(C=k)=\sum_{k=1}^{K}\omega_kg_k(x)\] Setting up the hierarchical problem: \...

1087 sym Python (603 sym/1 pcs) 1 img

Bayesian Zero-Inflated Mixture Modes

07.08.2023

Zero inflated negative binomial distribution x = seq(0, 15) y = dnbinom(x, 8, 0.6) z = 0.2*c(1,rep(0,length(x)-1)) + (1-0.2)*y par(mfrow=c(2,1)) par(mar=c(4,4,2,2)+0.1) barplot(y, names.arg=x, las=1, xlab = "x", ylab="Probability", border=NA, main="Negative Binomial") par(mar=c(4,4,1,1)+0.1) barplot(z, names.arg=x, las=1, xlab = "x", ylab=...

825 sym 4 img

Bayesian Mixture Model Examples

07.08.2023

Mixture of univariate Gaussians, bimodal x = seq(-5, 12, length=100) y = 0.6*dnorm(x, 0, 1) + 0.4*dnorm(x, 5, 2) par(mar=c(4,4,1,1)+0.1) plot(x, y, type="l", ylab="Density", las=1, lwd=2) Mixture of univariate Gaussians, unimodal skewed x = seq(-5, 12, length=100) y = 0.55*dnorm(x, 0, sqrt(2)) + 0.45*dnorm(x, 3, 4) par(mar=c(4,4,1,1)+0.1) plot(x, ...

158 sym 3 img

Data Analysis Project - Bayesian Statistics V2

05.08.2023

Executive Summary The purpose of this project was to fit a series of regression models to a dataset containing housing features and a corresponding sale price as the response variable. Three models were constructed using both R and JAGS. One of the JAGS models used 3 features to predict sale prices while the final iteration used 4 features. A numbe...

3790 sym R (6308 sym/20 pcs)

Bayesian Mixture Models - Basic Definitions

04.08.2023

Suppose we have a variable \(X\) with probability density function of \(f(x)\) (continuous) or probability mass function (discrete). Then \(F(x)\) is the probability distribution where \(F(x) = P(X<x)\). The Mixture model takes the form: \[F(x) = \sum_{k=1}^{K}w_kG_k(x),\] where \(w_k\) are the weights and \(G_k(x)\) are the components such that \(...

2855 sym

Data Analysis Project - Bayesian Statistics

02.08.2023

Introduction The Ames Housing dataset, which is available on Kaggle.com, was compiled by Dean De Cock for use in data science education. It’s an incredible dataset resource for data scientists and statisticians looking for a modernized and expanded version of the often-cited Boston Housing dataset. The subject dataset contains 79 explanatory vari...

4048 sym 1 img

Hierarchical Modeling using Bayesian Methods

30.07.2023

Data Input Let’s fit our hierarhical model for counts of chocolate chips. The data can be found in cookies.dat. dat = read.table(file="cookies.dat", header=TRUE) head(dat) ## chips location ## 1 12 1 ## 2 12 1 ## 3 6 1 ## 4 13 1 ## 5 12 1 ## 6 12 1 table(dat$location) ## ## 1 2 3 ...

2334 sym R (5334 sym/43 pcs) 10 img

Poisson Regression using Bayesian Methods

27.07.2023

For an example of Poisson regression, we’ll use the badhealth data set from the COUNT package in R. library("COUNT") ## Loading required package: msme ## Loading required package: MASS ## Loading required package: lattice ## Loading required package: sandwich data("badhealth") ?badhealth head(badhealth) ## numvisit badh age ## 1 30 0 ...

3782 sym R (5100 sym/48 pcs) 11 img

Logistic Regression using Bayesian Methods

26.07.2023

Data For an example of logistic regression, we’ll use the urine data set from the boot package in R. The response variable is r, which takes on values of \(0\) or \(1\). We will remove some rows from the data set which contain missing values. library("boot") data("urine") ?urine head(urine) ## r gravity ph osmo cond urea calc ## 1 0 1.021 4...

1030 sym R (585 sym/7 pcs) 2 img