2008-07-13

apsrTable

I have needed to do this for a very long time: apsrtable is now completely rewritten. It is temporarily called apsrTable to avoid much confusion with the old one, does things that the old one didn't, and is on its way to being more extensible. It handles lm and glm objects for now. Documentation and formal packaging I will wrap up in the next week.

Its latex code is now much readable, still uses dcolumn, still handles user-supplied standard errors, and it adds a host of features like omitting some rows of like controls, and model naming is flexible. Most importantly it matches variable names across models and leaves holes where they belong. Here's a snippet of sample output:
apsrTable(m1,m2,m3,omitcoef=4:17,lev=.1,align="c",model.counter=6,se="robust")

%Latex table generated by Mike Malecki's apsrTable()
%Uncomment the following line and the end one to change figure versions
%if you are using a full-featured family such as Minion Pro.
\figureversion{tabular}
\begin{tabular}{cD{.}{.}{-1}D{.}{.}{-1}D{.}{.}{-1}}\hline
 & \multicolumn{1}{c}{Model 6} & \multicolumn{1}{c}{Model 7} & \multicolumn{1}{c}{Model 8}\\ 
%                   & Model 6  & Model 7  & Model 8 \\ 
(Intercept)         & 71.95    & 35.95    & 38.83   \\ 
                    & (44.44)  & (38.63)  & (45.81) \\ 
maj.parl            & -2.03    & -4.81    & -0.86   \\ 
                    & (3.38)   & (3.52)   & (3.98)  \\ 
maj.pres            & -10.50   & -14.45 * &         \\ 
                    & (6.32)   & (5.42)   &         \\ 
lrCentered          & -1.26    &          & 3.71    \\ 
                    & (5.07)   &          & (5.52)  \\ 
pro.pres:lrCentered & -3.59    &          & -6.27   \\ 
                    & (6.61)   &          & (6.34)  \\ 
maj.parl:lrCentered & -4.46    &          & -8.52   \\ 
                    & (5.78)   &          & (6.73)  \\ 
pro.pres            &          & -8.81 *  & -3.36   \\ 
                    &          & (4.99)   & (5.46)  \\ 
N                   & 46       & 46       & 46      \\ 
$R^2$               & 0.82     &          & 0.81    \\ 
adj. $R^2$          & 0.70     &          & 0.67    \\ 
AIC                 &          & 310.38   &         \\ 
BIC                 &          & 434.72   &         \\ 
$\log L$           &          & -87.19   &         \\\hline
\multicolumn{ 4 }{l}{ Robust standard errors in parentheses} \\
\end{tabular}

\figureversion{proportional}

No comments: