Everybody loves speed comparisons! Is R faster than Python? Is
dplyr faster than
data.table? Is STAN faster than JAGS? It has been said that speed comparisons are utterly meaningless, and in general I agree, especially when you are comparing apples and oranges which is what I’m going to do here. I’m going to compare a couple of alternatives to
lm(), that can be used to run linear regressions in R, but that are more general than
lm(). One reason for doing this was to see how much performance you’d loose if you would use one of these tools to run a linear regression (even if you could have used
lm()). But as speed comparisons are utterly meaningless, my main reason for blogging about this is just to highlight a couple of tools you can use when you grown out of
lm(). The speed comparison was just to lure you in. Let’s run!