Pro Football Data
I’ve made the acquaintance of a group of data analysts here in the triangle and have agreed to arrange an outing to the Durham Bulls minor league baseball team. Because it’s for stat nerds and because...
View ArticleNFL Prediction – Algorithm 1
So I tidied the code up a bit from last time; no more for loop. Actually, I tidied it up a lot. My goal had been to arrange the data in such a way that I could get a simple moving average of the score...
View ArticleHow to spend an inordinate amount of time becoming efficient
I’ve spent a good deal of 2012 constructing a data warehouse to manage all the various data elements that my company has. Although we’re a small enterprise, the richness and complexity of the...
View ArticleLyin’ Vikings and Bears, oh my
Week 14 was interesting, for at least one game: Bears vs Vikings. These teams had played just two weeks previously and the result had been a relatively comfortable Bears victory. Chicago followed by...
View ArticleTesting Assumption Testing
I’ve been doing a lot of linear modeling this year. That’s not much different than any ordinary year, but now I’m doing it in R. I had spent a bit of time in recent years trying to look at loss...
View ArticleHow I learned to stop worrying and really love lists
One of the first weird things to get used to in R is unlearning some of the things that you think you know. As often happens, this reminds me of a quote I once read about Zen, which went about like...
View ArticleConfit de Stanard, Part 1 – The Rant
I’m breaking this up into two parts to isolate the political elements from the purely objective presentation. I’ll start off with some very biased comments about the legacy of Stanard’s Monte Carlo...
View ArticleTurnovers are poison
This is probably a slightly useless post, but a bit of fun all the same. If nothing else, it allows me to take a stab at learning a bit more about logistic regression. I’m still trying to unravel the...
View ArticleQuerying, parsimony and golden hammers
I love it when things are easy. I love it so much that I’ll spend a great deal of time and effort to keep things simple. At the same time, though, I think there’s some value in expending effort in...
View ArticleNested loops with mapply
So as I sink deeper into the second level of R enlightenment, one thing troubled me. “lapply” is fine for looping over a single vector of elements, but it doesn’t do a nested loop structure. These tend...
View ArticleYou can’t spell loss reserving without R
Last year, I spent a morning trying to return to first principles when modeling loss reserves. (Brief aside to non-actuaries: a loss reserve is the financial provision set aside to pay for claims which...
View ArticleLoss reserving has a new, silly name
I started using Git some time ago, but mostly for local work files. Today, I finally sync’ed up a repository for loss reserving analysis. It may be found here: https://github.com/PirateGrunt/MRMR MRMR...
View ArticleObject Orientation in R – Notes from a novice
Having posted some code to Git a few days ago and having been wholly dissatisfied with it, I began to do what I often do with code I don’t like. I started re-writing it bigger and weirder and more...
View ArticleNFL Code on Github
I’ve made some revisions and simplifications to the code to compile NFL data. It’s now all out on Github for anyone to play with in advance of the Superbowl. In the meantime, here’s a lovely picture...
View ArticleBuilding a package in RStudio is actually very easy
So, you’ve written some code and you use it routinely. Now you’ve written some code and you’d like to use version control to ensure that development continues in a robust fashion. You do that and you...
View ArticleClustering Loss Development Factors
Anytime I get a new hammer, I waste no time in trying to find something to bash with it. Prior to last year, I wouldn’t have known what a cluster was, other than the first half of a slang term used...
View ArticleCallback functions for GUI widgets
Of all the things I dislike about R, one of the biggest is the fact that you can declare a function within the list of arguments to another function. I’ve gotten over it for very minor operations...
View ArticleBig RxR Blues
I’ve updated the GitHub repository for RxR with some bits of SQL that are hopefully useful. This is a very quick stab at establishing a basic schema definition for (re)insurance data. This first cut...
View ArticlePassing columns of a dataframe to a function without quotes
I love the syntax of calls to lm and ggplot, wherein the dataframe is specified as a variable and specific columns are referenced as though they were separate variables. While developing some of my...
View ArticleComputed columns for dataframes
Everyone loves to aggregate data. Everyone loves to create new columns based on other columns. Everyone hates to do the same thing twice. In my continuing work on multilevel view of loss reserving, I...
View Article