Publications by Luis
Early August flotsam
Back teaching a couple of subjects and it’s the constant challenge to find enough common ground with students so one can push/pull them to the other side of new concepts. We are not talking about complex hierarchical models using mixed models or Bayesian approaches, but multiple linear regression or similar. What do students actually learn in f...
2180 sym 2 img
Careless comparison bites back (again)
When running stats labs I like to allocate a slightly different subset of data to each student, which acts as an incentive for people to do their own work (rather than copying the same results from a fellow student). We also need to be able to replicate the results when marking, so we need a record of exactly which observations were dropped to cr...
2045 sym R (341 sym/2 pcs) 2 img
INLA: Bayes goes to Norway
INLA is not the Norwegian answer to ABBA; that would probably be a-ha. INLA is the answer to ‘Why do I have enough time to cook a three-course meal while running MCMC analyses?”. Integrated Nested Laplace Approximations (INLA) is based on direct numerical integration (rather than simulation as in MCMC) which, according to people ‘in the kn...
3570 sym R (6696 sym/3 pcs) 4 img
Mid-August flotsam
Reached mid-semester point, with quite a few new lectures to prepare. Nothing extremely complicated but, as always, the tricky part is finding a way to make it meaningful and memorable. Sometimes, and this is one of those times, I sound like a broken record but I’m a bit obsessive about helping people to ‘get’ a topic. I gave knitr a go wh...
1923 sym 2 img
m x n matrix with randomly assigned 0/1
Today Scott Chamberlain tweeted asking for a better/faster solution to building an m x n matrix with randomly assigned 0/1. He already had a working version: r <- 1000 c <- 1000 m0 <- matrix(0, r, c) apply(m0, c(1,2), function(x) sample(c(0,1),1)) Now, I’m the first to acknowledge that I’ve never got the ‘apply’ family of functions and ...
2906 sym R (347 sym/6 pcs) 2 img
Suicide statistics and the Christchurch earthquake
Suicide is a tragic and complex problem. This week New Zealand’s Chief Coroner released its annual statistics on suicide, which come with several tables and figures. One of those figures refers to monthly suicides in the Christchurch region (where I live) and comes with an interesting comment: Suicides in the Christchurch region (Timaru to Kaik...
2537 sym R (830 sym/1 pcs) 4 img
Mid-September flotsam
This is one of those times of the year: struggling to keep the head above the water, roughly one month before the last lecture of the semester. On top trying to squeeze trips, meetings and presentations in between while dealing with man flu. Creating a list of introductory-level Bayesian blogs. Some suggestions in the comments: Probably Overthin...
1344 sym 2 img
(Unsurprisingly) users default to the defaults
Oddities tend to jump out when one uses software in a daily basis. The situation is even clearer when using software for teaching: many more people looking at it with fresh eyes. Let’s say that we are fitting a simple linear model and we use the summary function, then POW! i- one gets all sorts of stars next to each of the coefficients and ii- ...
2743 sym R (990 sym/3 pcs) 2 img
New Zealand school performance: beyond the headlines
I like the idea of having data on school performance, not to directly rank schools—hard, to say the least, at this stage—but because we can start having a look at the factors influencing test results. I imagine the opportunity in the not so distant future to run hierarchical models combining Ministry of Education data with Census/Statistics N...
3782 sym R (2015 sym/5 pcs) 10 img
Some regressions on school data
Eric and I have been exchanging emails about potential analyses for the school data and he published a first draft model in Offsetting Behaviour. I have kept on doing mostly data exploration while we get a definitive full dataset, and looking at some of the pictures I thought we could present a model with fewer predictors. The starting point is t...
2812 sym R (1995 sym/3 pcs) 4 img