# Blog Posts

## Weekly R-Tips: Visualizing Predictions

Lets say that we estimated a linear regression model on time series data with lagged predictors. The goal is to estimate sales as a function of inventory, search volume, and media spend from two months ago. After using the lm function to perform linear regression, we predict sales using values from two month ago. If Continue reading Weekly R-Tips: Visualizing Predictions

## Weekly R-Tips: Importing Packages and User Inputs

Number 1: Importing Multiple Packages Anyone who has used R for some time has written code that required the use of multiple packages. In most cases, this will be done by using the library or require function to bring in the appropriate extensions. That’s nice and gets the desired result, but can’t we just import Continue reading Weekly R-Tips: Importing Packages and User Inputs

## Automate the Boring Stuff: GGPlot2

The majority of my interaction with the ggplot2 package involves the interactive execution of code to visualize data within the context of exploratory data analysis. This is often a manual process and quite laborious. I recently sought to improve these tasks by creating a series of user defined functions that contained my most commonly used Continue reading Automate the Boring Stuff: GGPlot2

## Applied Statistical Theory: Quantile Regression

This is part two of the ‘applied statistical theory’ series that will cover the bare essentials of various statistical techniques. As analysts, we need to know enough about what we’re doing to be dangerous and explain approaches to others. It’s not enough to say “I used X because the misclassification rate was low.” Standard linear Continue reading Applied Statistical Theory: Quantile Regression

## Applied Statistical Theory: Belief Networks

Applied statistical theory is a new series that will cover the basic methodology and framework behind various statistical procedures. As analysts, we need to know enough about what we’re doing to be dangerous and explain approaches to others. It’s not enough to say “I used X because the misclassification rate was low.” At the same Continue reading Applied Statistical Theory: Belief Networks

## Basic Forecasting

Forecasting refers to the process of using statistical procedures to predict future values of a time series based on historical trends. For businesses, being able gauge expected outcomes for a given time period is essential for managing marketing, planning, and finances. For example, an advertising agency may want to utilizes sales forecasts to identify which Continue reading Basic Forecasting

## Writing a Resignation Letter in Latex

Here’s a resignation letter I wrote earlier this year in Latex. Of course, such tasks are much easier done in Microsoft Word or Open Office, but I somehow enjoy using Latex to typeset documents. It’s not the most efficient and often not a practical solution, but if you ever need to quit your job, here’s Continue reading Writing a Resignation Letter in Latex

## My Latex Preamble

Over the past few years, I’ve relied less on Latex for writing documents. This is primarily because documentation hasn’t been a critical part of the jobs that I’ve had. Another reason is that I’ve found a format and structure that works well, and so I end up using this template over and over for every Continue reading My Latex Preamble

## A Few Days of Python: Automating Tasks Involving Excel Files

There are plenty of instances where analysts are regularly forwarded xls spreadsheets and tasked with summarizing the data. In many cases, these scenarios can be automated through fairly simple Python scripts. In the following code, I take an Excel spreadsheet with two sheets, summarize each sheet using a pivot table, and add those results to Continue reading A Few Days of Python: Automating Tasks Involving Excel Files

## A Few Days of Python: Using R in Python

Using R Functions in Python