Quantitative finance collector
C++ Matlab VBA/Excel Java Mathematica R/Splus Net Code Site Other
Oct 7

OLS Regression with missing values

Posted by abiao at 21:20 | Code » VBA/Excel | Comments(0) | Reads(10764)
Excel provides a handy function called LINEST that allows the user to make OLS regressions in an very quick and simple fashion. Unfortunately, the function fails if some values are missing in the data.

Here is a small program that addresss this shortcoming. After installing this add-in, you can simply say LINESTNA(...) instead of LINEST(...) and the problem with the missing values is gone.

The program first extracts the rows that do not contain any missing values, and then calls Excel's LINEST to perform the estimation with the cleaned data. The data have to be organized column-wise.


Add a comment
Enable HTML
Enable UBB
Enable Emots
Nickname   Password   Optional
Site URI   Email   [Register]