I obtained a summary table of a regression with couple variables. The code I used was this:
stock = dyn$lm(y1 ~ x1 +lag(x2, -1) + x2 + x3 +x4)
print(xtable(stock))
which gave me the following output:
% latex table generated in R 3.0.1 by xtable 1.7-1 package
% Mon Aug 12 21:01:51 2013
\begin{table}[ht]
\centering
\begin{tabular}{rrrrr}
\hline
& Estimate & Std. Error & t value & Pr($>$$|$t$|$) \\
\hline
(Intercept) & 0.0031 & 0.0036 & 0.85 & 0.3951 \\
x1 & 0.4947 & 0.0371 & 13.33 & 0.0000 \\
lag(x2, -1) & 0.3745 & 0.0347 & 10.79 & 0.0000 \\
x2 & -0.1248 & 0.0368 & -3.39 & 0.0007 \\
x3 & 0.7368 & 0.0424 & 17.36 & 0.0000 \\
x4 & -0.0033 & 0.0039 & -0.84 & 0.3983 \\
\hline
\end{tabular}
\end{table}
I can only change the row names (which are x1,lag(x2,-1), etc.) to greeks manually to line up with the regression in my research. However, I need to replicate the regression with many different groups of data which makes it too time-consuming to do it one by one.
Is there a more automated/robust solution that works to customize the row names with code?