asdocx: Export from Stata to Word, Excel, LaTeX & HTML Forums asdocx Forum Number of decimals with very small numbers

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Ozer Erdem
    Participant
    Post count: 14

    Hi Dr. Shah,

    I am trying to increase the number of decimals. dec(10) or higher numbers are not getting the results with very small numbers.

    Here is the code that I use:

     asdocx reghdfe Abnormal_Vol_Ratio i.pred , dec(30) nest reset save(myfile.html) replace

    Here is the asdocx result.

     
    		Table: Regression results
    0 1		2 
    					
    1		(1) 
    2 Variables		Abnormal_Vol_Ratio 
    					
    3 pred		                                  
    4		                                  
    5 1		0.*** 
    6		(0.) 
    7 2		0.*** 
    8		(0.) 
    9 Intercept		0.*** 
    10		(0.) 
    11 Observations		11394472 
    12 R2		0. 
    					
    Notes:  Standard errors	are	in parentheses. *** p<.01, ** p<.05,	*	p<.1
    
    

    Here is the result from Stata result window.
    For example, I would like to see the coefficient which is 8.49e-07 on my asdocx table.
    I was hoping to see 0.000000849 in the asdocx table but even if I increase the dec(), I keep getting 0.***

    Thank you.

    asdocx reghdfe Abnormal_Vol_Ratio i.pred , dec(30) nest reset save(myfile.html)	replace
    (MWFE estimator converged in 1 iterations)
    
    HDFE Linear regression                            Number of obs   = 11,394,472
    Absorbing 1 HDFE group                            F(   2,11394469)=     359.05
    Prob > F        =     0.0000
    R-squared       =     0.0001
    Adj R-squared   =     0.0001
    Within R-sq.    =     0.0001
    Root MSE        =     0.0000
    
    
    Abnormal_V~o  Coefficient  Std. err.      t    P>t     [95% conf. interval]
    
    pred 
    1     8.49e-07   3.29e-08    25.79   0.000     7.84e-07    9.13e-07
    2     7.25e-07   7.10e-08    10.22   0.000     5.86e-07    8.65e-07
    
    _cons    3.00e-06   1.64e-08   182.52   0.000     2.97e-06    3.03e-06
    
    
    Attaullah Shah
    Moderator
    Post count: 76

    For setting decimal points in an asdoc’x document, I encourage you to visit this page https://asdocx.com/decimal-points/. If you wish to change decimal points for a single column, see the Section 4 on the above page.

    In the following example, I am setting 11 decimal points for the second column, note the 2 in c2_dec(11). If you wish to target another column, just change the # part in c#_dec().

    sysuse auto
    
    asdocx reg pr2, replace c2_dec(11) nest 
                                 
                             Table: Regression results
    
      0 |1                                                 2 
    ----+-----------------------------------------------------------------------------
      1 |                                                (1) 
      2 |Variables                                       pr2 
    ----+-----------------------------------------------------------------------------
      3 |Intercept                             06.165e-07*** 
      4 |                                       (03.429e-08) 
      5 |Observations                                     74 
      6 |R2                                                0 
    ----------------------------------------------------------------------------------
    Notes:  Standard errors are in parentheses. *** p<.01, ** p<.05, * p<.1
    
    Ozer Erdem
    Participant
    Post count: 14

    Thank you.
    It works great now.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.