Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regression table in latex from splm

I would like to know which is the easiest way to put a regression output (splm object) in TeX. Stargazer, texreg, latex does not recognize this type of object so the table would have to be done kind of manually. I already put the coefficients and standard errors in a matrix (standard error bellow) in the following way (each column is a different regression):

                      [,1]         [,2]          [,3]         [,4]         [,5]         [,6]
lambda         -0.550153770 -0.606755198 -1.0894505645  0.703821961 -0.560769652 -0.698232106
                0.056878033  0.056878033  0.0568780329  0.056878033  0.056878033  0.056878033
rho             0.571742772  0.618236404  0.7365074175 -1.017060680  0.745559212  0.733598140
                0.034064728  0.034064728  0.0340647282  0.034064728  0.034064728  0.034064728

However I don't know how to put to this matrix the stars (if they are in a vector), parenthesis to the standard errors, and finally put that matrix to TeX including the rownames.

like image 384
user2246905 Avatar asked Dec 09 '15 23:12

user2246905


1 Answers

It's not a perfect answer but you can piece together something

 smry <- summary(splm_lag)
  pander(data.frame(R.Square = smry$rsqr))
  pander(smry$CoefTable)



----------
 R.Square 
----------
  0.9161  
----------


-----------------------------------------------------------------------
          &nbsp;            Estimate   Std. Error   t-value   Pr(>|t|) 
-------------------------- ---------- ------------ --------- ----------
        **lambda**           0.574      0.05808      9.883   4.943e-23 

         **PC1**            -0.06165    0.03741     -1.648    0.09931  

         **PC2**            0.05824     0.02296      2.537    0.01118  

         **PC3**            0.02966     0.01937      1.531     0.1258  

         **PC4**            -0.04165    0.02289      -1.82    0.06879  

 **I(as.numeric(years))**   0.03059     0.00939      3.258    0.001122 
-----------------------------------------------------------------------
like image 123
mmann1123 Avatar answered Sep 17 '22 13:09

mmann1123