Will there be a last man on the moon?

I was born in 1990. Mankind first stepped on the moon on July 20th 1969. We did it again in November of the same year, again in February and July of 1971, and in April and December of the following year. In total there have been 12 men to have set foot on another celestial…

Surrogate models

At StanCon 2018 Helsinki, a couple of us gathered together for this thing Breck organised – birds of a feather, to discuss topics of interest with each other. I think there were about 8 of us interested in surrogate models and these are some of the notes from that meeting. So what is a surrogate…

Selection function in STAN

I’m currently working on a problem where I need to sample from a very specific custom pdf. It has taken me a lot of time to get this pdf written down but now that I finally have it, I’m just missing one key ingredient… the selection function! This is when you have some underlying data…

Problems with binning data

I learned early on in my PhD that binning is not a good idea. The loss of information from binning will lead to biased results. Here I demonstrate this with a simple linear regression toy model. #generate toy data x = runif(nc, 13,15) y = 22+1.5*x+rnorm(nc, 0,0.5) #bin in y variable nbin = 10 ybins…