statsmodels/statsmodels — pull request #734 by toobaz (2013-03-26 22:20:31+00:00)
Title: Fix latex output

Currently, the LaTeX output is broken for (at least) two reasons:
1) some symbols are not formatted for LaTeX ("%", ">", "|"...)
2) a single "tabular" environment is created (though rows have different numbers of columns!)

Commit fc58ea443f0c2e6f47f217d19cd89640df586810 solves the first problem, at least for what concerns an OLS output (more complicated tables may involve other symbols, which however it is easy to add, using to the "replacements" field I have set up). Notice it is unoptimal to surround _every_ symbol with the formula dollars... but doing otherwise would require a much more invasive change in the tables output creation.

Commit e4144da19df7ec0a94599bddca8bacee4cf85f31 solves instead quite cleanly the second problem. One may argue a bit about the lenght of the horizontal lines (the choice of using \bottomrule rather than \toprule), but those are matters of taste, which can be tweaked.

With those fixes, at least OLS tables compile just fine.