0

Given that many regression results are from classes not supported by xtable to export to Latex, I'm trying to create my own summary of regression result. So far, I've been able to create the following matrix:

> coef <- coefficients(summary(tob1))[,1]
> se <- sqrt(diag(vcov(tob1)))
> pvals <- 2*(1-pt(abs(coef)/se, df.residual(tob1)))
> ttob1 <- cbind(coef,se,pvals)
> ttob1
      coef           se            pvals
X1 175.1252128   19.861699207   0.000000e+00
X2 -0.3377459    0.252531805    1.810945e-01
X3 -113.7189271  14.943601767   2.864375e-14
X4 50.8150461    13.863303952   2.475501e-04
X5 -244.2535872  12.739088876   0.000000e+00
X6 -244.4901871  13.447635109   0.000000e+00
X7 -3.5817039    1.675738225    3.257835e-02

Now I want to create some function to create a table that has the following format

X1 175.12
   (19.86)
X2 -.3377
   (.25)
X3 -113.72
   (14.94)

How should I do that?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user1172558
  • 655
  • 4
  • 12
  • 18

0 Answers0