Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Readability of Tables - adding space between rows, changing the overall look

    Dear Statalist,

    I would like to know whether there is a way to increase the spacing between rows in tables?



    Click image for larger version

Name:	Screenshot (29).png
Views:	1
Size:	43.8 KB
ID:	1595095



    As you can see in the image above our table looks a little cluttered due to the closeness ove the rows.
    I also would like to know whether it it possible to increase line thickness?

    Here is what I am trying to achieve:


    Click image for larger version

Name:	Screenshot (26).png
Views:	1
Size:	9.7 KB
ID:	1595096



    This is the code for the table above:



    Code:
    local allvars CashtoAt TXUNCER fiveyearRTC fiveyearCASHETR fcons nol lossfirm NWC lev EBITDA MTBR size divpo capExpend aquist atCF resDev
    
    estpost sum `allvars', detail 
    esttab using Table_2.html, replace noobs nonumbers /// 
    cells("count(label(N) fmt(%7.0fc)) mean(fmt(3) label(Mean))  p50(fmt(3) label(Median))  sd(fmt(3) label(Standard Deviation)) p25(fmt(3) label(25th percentile)) p75(fmt(3) label(75th percentile))") ///
    label ///
    title ("Table 2: Descriptive Statistics") compress nonotes
    -------------

    The following two images show parts of a regression I ran in the same variables. My issue with them is that the R-squared is displayed in a " .12345" format and not in a "0.1234" format. Furthermore, there is an unecessary line separating R&D and the rest of the variables, the lines at the top are too thin and "Dependent Variable = Cash-to-Assets" is missing a line underneath.

    Again, here are snippets of the table:


    Click image for larger version

Name:	Screenshot (31).png
Views:	1
Size:	17.1 KB
ID:	1595097





    Click image for larger version

Name:	Screenshot (30).png
Views:	1
Size:	15.9 KB
ID:	1595098




    And here is what I am trying to achieve:

    Click image for larger version

Name:	Screenshot (28).png
Views:	1
Size:	12.8 KB
ID:	1595099




    This is the code:


    Code:
    run cluster2.ado 
    
    
    eststo model1: cluster2 CashtoAt TXUNCER fiveyearRTC fiveyearCASHETR fcons nol lossfirm NWC lev EBITDA MTBR size divpo capEx aquist atCF resDev, fcluster(gvkey) tcluster(fyear) 
    estadd local nfirms 3121
    estadd local FE Industry and Year 
    estadd local Clustering By Firm and Year 
     
    esttab model1 using table25.html, drop (_cons) stats(firm N FE Clustering r2,fmt(%9.5f %9.0g) labels("Firms" "N" "Fixed Effects" "Clustering" "R-Squared")) 
    
    eststo multinationals: cluster2 CashtoAt TXUNCER fiveyearRTC fiveyearCASHETR fcons nol lossfirm NWC lev EBITDA MTBR size divpo capEx aquist atCF resDev if mne==1, fcluster(gvkey) tcluster(fyear) 
    estadd local nfirms 1897
    estadd local FE Industry and Year 
    estadd local Clustering By Firm and Year 
    
    eststo domestics: cluster2 CashtoAt TXUNCER fiveyearCASHETR fcons nol lossfirm NWC lev EBITDA MTBR size divpo capEx aquist atCF resDev if mne==0, fcluster(gvkey) tcluster(fyear) 
    
    estadd local nfirms 1726
    estadd local FE Industry and Year 
    estadd local Clustering By Firm and Year 
    
    
    esttab model1 multinationals domestics using table25.html, replace label ///
    drop (_cons) stats(nfirms N FE Clustering r2,fmt(%9.5f %9.0g) labels("Firms" "N" "Fixed-Effects" "Clustering" "R-Squared")) ///
    mtitle("Full Sample" "Multinationals" "Domestics") nonumbers ///
    mgroup ("Dependent Variable = Cash-to-Assets") nonumbers ///
    title(Table 4: "The effect of tax uncertainty on cash holdings") b(3) compress nonotes

    Upon researching this topic, I found that Stata is able to export tables through other programs (Latex, Word etc.) so I am thinking, that my tables will never look like the tables I am trying to replicate, if I only export them in a html format. Please correct me if I am mistaken.

    Any advice on this topic and the above mentioned tables is greatly appreciated!











Working...
X