Category Archives: R

>R code for OLS

>Just to show the mathematics involved in computing the OLS coefficients on a simulated data set (which is a good approach to really learning econometrics): set.seed(1234)n <- 1000×1 <- rnorm(n)x2 <- runif(n)X <- cbind(1, x1, x2)k <- ncol(X)beta <- c(2, … Continue reading

Posted in Econometrics, Numerical methods, Programming, R | Leave a comment

>Optimized ATLAS BLAS speed gains in R

>After reading this, I decided to give it a go myself and replaced the default Rblas.dll with the the one linked against the ATLAS library and, indeed, speed gains in matrix computations are significant. I used the C2D version linked … Continue reading

Posted in Numerical methods, R | Leave a comment