Publications by PirateGrunt

24 Days of R: Day 15

15.12.2013

Over the course of the next few days, I'm going to try to find enough time to build up a reasonably simple simulation of insurance exposure and claims. I'll be taking a hierarchical view of the underlying process. As with pretty much everything that I write about, I'm writing about it as I'm learning about it. It was only last year that I first st...

2590 sym Python (1480 sym/6 pcs) 12 img

24 Days of R: Day 16

16.12.2013

Yesterday I said that I'd carry on with the monte carlo simulation of insurance data. I'm not going to as I don't think I've got enough time and mental energy to do it justice. I'm sure tens of people are disappointed to learn this. Instead, I'm going to have a look at the recently released PISA study, which assesses student performance in many c...

2689 sym R (1430 sym/3 pcs) 4 img

24 Days of R: Day 17

18.12.2013

I couldn't manage to find time yesterday, so today I'm going to try and catch up with two posts. In the first, I'm going to talk about a package I've been gradually working on over the course of the year. After all, what's Christmas if you don't get a package? I do quite a lot of lightweight ETL (extract, transform, load) and I've gotten in the h...

3776 sym R (1649 sym/2 pcs) 4 img

24 Days of R: Day 18

18.12.2013

Earlier today, while looking for something else, I managed to stumble across a presentation given at the 2010 CAS RPM. (Egregious self-promotion: I'll be leading a day-long workshop at next year's RPM in Washington, DC.) I wasn't looking for a presentation on hierarchical models, but there one was. The fantastic Jim Guszcza has a great slide show...

3897 sym R (2650 sym/5 pcs) 8 img

24 Days of R: Day 19

19.12.2013

Carrying on with the multi-level model, I'm going to look at the paid and incurred workers comp losses for a large number of insurance companies. This is a similar exercise to what I did last night, but I'm now working with real, rather than simulated data and the stochastic process is assumed to be different. First, I'll fetch some data from the...

2298 sym R (3348 sym/8 pcs) 16 img

24 Days of R: Day 20

20.12.2013

Some time ago, I was doing some analysis and trying to determine whether or not there was a predictive variable for a binomial response. I ran logistic regressions for about half a dozen variables in different combinations and nothing showed a fit of any significance. Well, almost nothing. I had measured the response against date. Date is a conti...

2863 sym R (2458 sym/4 pcs) 6 img

24 Days of R: Day 21

21.12.2013

I drove through Tennessee today. Despite having grown up in Kentucky, I had never really noticed the Tennessee flag, but earlier this year, while in Nashville, I saw it and thought it was one of the cooler state flags. I downloaded a PNG file of the flag from wikicommons and tried to do what I thought would be a very simple thing. I wanted to dra...

1906 sym R (2483 sym/5 pcs) 12 img

24 Days of R: Day 22

22.12.2013

I like to use Goodreads to keep track of which books I'm reading (and not reading). They very helpfully sent me an e-mail to inform me how many books I've read so far in 2013. The number is 19. Hardly an impressive number, but between job, family and trying to develop my R skills, I'm not embarassed by that either. However, it's not as though I'm...

2638 sym R (2778 sym/5 pcs) 10 img

24 Days of R: Day 23

23.12.2013

Penultimate post, I'm going to take a quick look at the Gini indicator for wealth inequality. Data comes from the World Bank. I've downloaded the zipped file, decompressed it and given it a different name. I'm going to dfGini = read.csv("./Data/Gini.csv", stringsAsFactors = FALSE, skip = 2) colnames(dfGini) = gsub("X", "", colnames(dfGini)) libr...

930 sym R (2272 sym/4 pcs) 8 img

24 Days of R: Day 24

24.12.2013

OK, so I phoned it in last night. Final post and maybe this one will be a bit better. Can't recall what got me thinking about it, but I was running over the issue of school performance and the erroneous notion that small class sizes will produce better students. This is occasionally debunked, but I thought it'd be fun to demonstrate the appeal of...

2811 sym R (3831 sym/6 pcs) 6 img