Skip to content

Instantly share code, notes, and snippets.

View mamacneil's full-sized avatar

Aaron MacNeil mamacneil

View GitHub Profile
@mamacneil
mamacneil / Arctic.ipynb
Created July 6, 2022 09:29
PyMC (4.0) implementation of classic compositional dataset in both Dirichlet and softmax approaches
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mamacneil
mamacneil / GammaGLM_pymc3.ipynb
Created April 9, 2021 14:32
Gamma GLM in PyMC3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mamacneil
mamacneil / skittles.ipynb
Created January 28, 2021 00:53
Dirichlet-multinomial model implementation from Isaac Slavitt
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mamacneil
mamacneil / UKHouseOfCommons.csv
Created January 28, 2021 00:49
Implementation of Simon Jackman's UK political compositional model
constituency county y1 y2 y1lag y2lag coninc labinc libinc v1 v2 v3
Barrow & Furness Cumbria 1.3286 1.4732 1.182 1.0142 1 0 0 0.4131 0.4774 0.1094
Berwick-upon-Tweed Northumberland -0.3032 -0.6634 -0.5689 -1.0906 0 0 1 0.3277 0.2286 0.4437
Bishop Auckland Durham 0.5598 1.0113 0.7052 1.0258 0 1 0 0.3183 0.4999 0.1818
Durham City of Durham 0.0978 0.9092 -0.4139 0.3037 0 1 0 0.2405 0.5414 0.2181
Copeland Cumbria 1.7351 1.8508 1.5507 1.6453 0 1 0 0.435 0.4883 0.0767
Easington Durham 0.4546 1.9246 0.0408 1.4702 0 1 0 0.1671 0.7268 0.1061
Hexham Northumberland 0.8811 0.1085 0.4472 -0.5683 0 0 0 0.533 0.2461 0.2208
Langbaurgh Cleveland 1.3717 1.3182 0.7418 0.6582 0 1 0 0.4542 0.4306 0.1152
Durham North Durham 0.4855 1.365 -0.0637 0.9126 0 1 0 0.2484 0.5987 0.1529
@mamacneil
mamacneil / dyads.ipynb
Created January 28, 2021 00:45
Implementation of intercept-only dyads model from McElreath Ch14/Koester and Leckie 2014
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mamacneil
mamacneil / FishBase_LH.ipynb
Last active September 4, 2020 09:01
Grab K and age at maturity (tm) values from Fishbase Life History Page
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mamacneil
mamacneil / IntroBayes.ipynb
Last active November 24, 2017 17:45
Code to support Thinking Bayesian lecture
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mamacneil
mamacneil / Forced_PyMC2
Created April 21, 2016 05:14
Bayesian model for simulated forced response data
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
},
"source": [
"# Bayesian implementation of forced-response model in PyMC3\n",
"\n",
"### Based on Blair et al. 2015\n"
@mamacneil
mamacneil / GammaGLM.ipynb
Last active April 2, 2021 14:32
Example of a Gamma GLM in PyMC2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.