May 7, 2021

bayes

time series

public health

Covid-19

Using Bayesian Structural Times Series to estimate when some North Carolina counties will be vaccinated to a sufficient number.

Oct. 3, 2020

r

shiny

deploy

shinyproxy

This post discuses using the ShinyProxy framework to serve static html sites. These products could be generated from single R Markdown documents to entire websites. Serving these items in containers gives you all the benefits of containerising your work along with the ability to authenticate through ShinyProxy if desired.

Sept. 5, 2020

Bayes

SIR

Compartmental Model

Epidemiology

In this post I review how to build a compartmental model using the Stan probabilistic computing language. This is based largely by the case study, [Bayesian workflow for disease transmission modeling in Stan](https://mc-stan.org/users/documentation/case-studies/boarding_school_case_study.html) which has been expanded to include a second compartment for exposed individuals as well as utilise case incidence data rather than prevalence.

Sept. 1, 2020

Super-spreading events can be characterised by a single case spreading to a larger than expected number of people. This phenomenon can be well-represented by a negative binomial distribution versus a standard Poisson distribution. In this post I review the overdispersion factor and how it can be parameterised in a model.

Aug. 27, 2020

Stan

Optimisation

Using Stan for optimization.

Aug. 9, 2020

pandemic

scenarios

curve statistics

This post explores using tools to summarise curves rather than fixed time summary methods. This includes using odin and ggdist to explore the risk of underestimating epidemic curves.

Aug. 9, 2020

pandemic

scenarios

curve statistics

julia

agent based models

Use Julia and R to run agent based models in Julia and visualise them in R.

Aug. 9, 2020

pandemic

bayes

sensitivity

Here I explore the implications of different levels of sensitivity and specificity in a Bayesian framework. All of this work is based on Gelman and Carpenter.

March 13, 2020

pandemic

exponential growth modeling

In the post I explore the potential growth rate of Covid-19 to Forsyth County, NC. This also includes looking at the kind of load that this virus could place on our existing healthcare systems. I strongly advocate for acting to delay to flood of potential community acquired infections.

March 4, 2020

airflow

wls

git

scheduling

apache airflow

In this I detail the process for getting a working instance of Apache Airflow on Windows Linux Subsystem. This is a combination of several different posts spread across the internet. Apache Airflow is an exceptional program for scheduling and running tasks.

Jan. 1, 2020

Resolutions

Stan

A preview of some of the items that I will try to write about in 2020.

Oct. 8, 2019

Political

Bayes

State Space

In a previous blog post I looked at approval ratings. Now that impeach is the topic of the day, I think it would be wise to try the same methodology with the public opinion surrounding impeachment. While the data are much more sparse, it will be fun to examine.

Sept. 26, 2019

Political

Bayes

State Space

Given the current controversy regarding President Trump, let's use a state-space Bayesian model to see what his approval rating currently is. As more surveys go into the field this will change, but let's just look now.

Sept. 18, 2019

Bayes

Loss Functions

Assessment

Stan

Often times when doing an analysis, it is important to put the results in the context of the loss. For example, a small effect that is cheaply implemented might be the best use of resources. Using Bayesian modeling and loss functions we can better assess the impact and provide better information for decision-making when it comes to allocation of scarce resources (especially in the world of small effect sizes).

July 19, 2019

Some ruminations about the legacy of Apollo and doing things when failure isn't an option.

June 22, 2019

CLI

awk

sed

bash

Using `AWK` to parse court calendars

June 10, 2019

Tooling

GPP

Workflow

Having a defined project workflow is important for many reasons. Consistency of design allows for easier sharing (you or other collaborators don't have to look for things) and reduces some cognitive load by allowing you to focus on content and less on form. This is my lightly opinionated project structure. Of course these fews are ever evolving.

June 9, 2019

Sensitivity

Cost Benefit Analysis

Sometimes instead of accuracy we need to look at different metrics. One such metric is sensitivity, which is a measure of those who are actually targets how many does the model correctly identify. This can be the metric of choice over accuracy when you are dealing with a raw event such as a terrorist attack or even student retention. It is always important to understand what metrics you are optimising your models on.

May 18, 2019

Political

Bayes

State Space

In this section I replicate some state space poll modeling that James Savage and Peter Ellis used in a few different scenarios. State space modeling provides a great way to model times series effects when the data are collected at irregular intervals (e.g. opinion polling).

April 8, 2019

Political

In this post I explore a potential outcomes to the composition of the Winston-Salem city council.

April 7, 2019

fake data

omitted variable

inference

A short description of the post.

April 5, 2019

Bayes

MRP

brms

Using fake data simulations to understand the our MRP model.

April 4, 2019

Rcpp

Bayes

Metropolis Hasting samplers are typically slow in R because of inability to parallelise or vectorise operations. The Rcpp package allows a way to use C++ to conduct these MCMC operations at a much greater speed. This post explores how one would do this, achieving a >20x speed up.

April 3, 2019

ggplot2

data visualisation

r

This is a quick overview of a trick to add LaTex in ggplot2.

Nov. 7, 2018

Bayes

mrp

prediction

This post explores MRP using brms and tidyverse modeling.

Oct. 29, 2018

causal inference

synthetic controls

econometrics

The purpose of this post is to replicate the examples in the gsynth package for synthetic controls. This is a methodology for causal inference especially at the state level.

Oct. 28, 2018

time series

This is just a quick reproduction of the items discussed in the hts package. This allows for hierarchical time series which is an important feature when looking at data that take a hierarchical format like counties within a state or precincts within counties within states.

Sept. 24, 2018

Bayes

r

Hierarchical Modeling

Fake Data

Causal Inference

Looking at a blog post that Andrew Gelman posted on fake data simulations and HLM. The power of fake data simulations is that it really makes you think twice about what kind of effect for which you are looking as well as the power of your research design to detect it. This illustrates a really good practice for anyone looking to do this kind of analysis.

Sept. 17, 2018

network analysis

r

Network analysis provides an way to analyse the interconnectedness of different networks. This can provide insight into social networks, interconnected groups of text, tweets, etc. Visualisations help to show these relationships but also some numeric values to quantify them.

Sept. 16, 2018

r

econometrics

modeling

Exploring the examples in Kleiber and Zeileis' Applied Economics in R

July 19, 2018

time series

r

forecasting

Using Fourier Transform as coefficients in short time series data helps with prediction.

July 12, 2018

r

apis

packages

Exploring the concept of developing internal APIs. An API could also be an R package that can be used by people in your organisation to more easily connect to common data sources. This is a good example of some internal tooling that can make data access easier.

July 11, 2018

r

IRT

Constructs

Survey Analysis

Item Response Theory (IRT) is a method by which item difficulty is assessed and used to measure latent factors. Classical test theory has a shortcoming where the test-taker's ability and the difficulty of the item cannot be separated. Thus there is a question of universalisability outside of the instrument. Additionally, the models make some assumptions that mathematically may not be justified. In come IRT which handles some of these issues.

July 10, 2018

blogging

platforms

communication

So I'm moving to radix

July 10, 2018

Welcome to the rebooted blog!

July 7, 2018

timeseries

forecasting

r

Let's examine some of the functions inside for forecast

July 6, 2018

programming

r

This post explores how to see opportunities to make your code run faster.

July 5, 2018

forecasting

Bayes

r

Exploring the bsts package and what it provides for Bayesian structural time series modeling

July 5, 2018

ggplot2

data visualisation

r

ggrough is a great package that can be used to make graphs that look hand-drawn. This can be a great aesthetic choice when giving presentations and making handouts.

July 4, 2018

ggplot2

data visualisation

r

Exploring the power of gghighlight package to automatically highlight charts

July 4, 2018

ggplot2

data visualisation

r

An example of the value suppressing uncertainty scale. Great uses include forecast uncertainity.

- Articles (41)
- agent based models (1)
- airflow (1)
- apache airflow (1)
- apis (1)
- Assessment (1)
- awk (1)
- bash (1)
- bayes (2)
- Bayes (10)
- blogging (1)
- brms (1)
- causal inference (1)
- Causal Inference (1)
- CLI (1)
- communication (1)
- Compartmental Model (1)
- Constructs (1)
- Cost Benefit Analysis (1)
- Covid-19 (1)
- curve statistics (2)
- data visualisation (4)
- deploy (1)
- econometrics (2)
- Epidemiology (1)
- exponential growth modeling (1)
- fake data (1)
- Fake Data (1)
- forecasting (3)
- ggplot2 (4)
- git (1)
- GPP (1)
- Hierarchical Modeling (1)
- inference (1)
- IRT (1)
- julia (1)
- Loss Functions (1)
- modeling (1)
- mrp (1)
- MRP (1)
- network analysis (1)
- omitted variable (1)
- Optimisation (1)
- packages (1)
- pandemic (4)
- platforms (1)
- Political (4)
- prediction (1)
- programming (1)
- public health (1)
- r (14)
- Rcpp (1)
- Resolutions (1)
- scenarios (2)
- scheduling (1)
- sed (1)
- sensitivity (1)
- Sensitivity (1)
- shiny (1)
- shinyproxy (1)
- SIR (1)
- Stan (3)
- State Space (3)
- Survey Analysis (1)
- synthetic controls (1)
- time series (3)
- timeseries (1)
- Tooling (1)
- wls (1)
- Workflow (1)

If you see mistakes or want to suggest changes, please create an issue on the source repository.

Text and figures are licensed under Creative Commons Attribution CC BY 4.0. Source code is available at https://github.com/medewitt/medewitt.github.io, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".