Announcement

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

  • Exporting the table results of qrprocess to excel or word

    Hi STATALIST,

    I need advice on how I can export the table results of qrprocess to excel or word.

    Regards,
    Code:
    qrprocess Y_WiFi2_4GHzNLOSM0 b1.Y_WiFi2_4GHzNLOS_EverySixMinute, quantile(0.05 0.25 0.50 0.75 0.95) method(qreg)


    Y_WiFi2_4GHzNLOSM0 Coef. Std. Err. t P>t [95% Conf. Interval]

    Quant. 0.05
    2.Y_WiFi2_.. 3.50e-12 9.20e-13 3.80 0.000 1.70e-12 5.30e-12
    3.Y_WiFi2_.. 5.50e-12 8.96e-13 6.14 0.000 3.74e-12 7.26e-12
    4.Y_WiFi2_.. 7.50e-12 8.91e-13 8.42 0.000 5.75e-12 9.25e-12
    5.Y_WiFi2_.. 9.30e-12 8.80e-13 10.56 0.000 7.57e-12 1.10e-11
    _cons 3.26e-10 6.42e-13 507.22 0.000 3.24e-10 3.27e-10

    Quant. 0.25
    2.Y_WiFi2_.. 5.50e-12 1.62e-12 3.40 0.001 2.33e-12 8.67e-12
    3.Y_WiFi2_.. 4.80e-12 1.53e-12 3.14 0.002 1.80e-12 7.80e-12
    4.Y_WiFi2_.. 5.70e-12 1.54e-12 3.69 0.000 2.67e-12 8.73e-12
    5.Y_WiFi2_.. 6.40e-12 1.48e-12 4.33 0.000 3.50e-12 9.30e-12
    _cons 3.61e-10 1.12e-12 322.51 0.000 3.59e-10 3.64e-10

    Quant. 0.5
    2.Y_WiFi2_.. 2.78e-11 3.94e-12 7.05 0.000 2.01e-11 3.55e-11
    3.Y_WiFi2_.. -6.60e-12 3.58e-12 -1.84 0.065 -1.36e-11 4.14e-13
    4.Y_WiFi2_.. 2.00e-11 4.09e-12 4.89 0.000 1.20e-11 2.80e-11
    5.Y_WiFi2_.. -1.85e-11 3.32e-12 -5.58 0.000 -2.50e-11 -1.20e-11
    _cons 4.72e-10 2.48e-12 190.12 0.000 4.68e-10 4.77e-10

    Quant. 0.75
    2.Y_WiFi2_.. 5.12e-11 1.46e-11 3.52 0.000 2.27e-11 7.97e-11
    3.Y_WiFi2_.. 7.10e-12 1.41e-11 0.50 0.615 -2.06e-11 3.48e-11
    4.Y_WiFi2_.. 3.63e-11 1.54e-11 2.36 0.018 6.18e-12 6.64e-11
    5.Y_WiFi2_.. -3.46e-11 1.39e-11 -2.49 0.013 -6.19e-11 -7.32e-12
    _cons 7.29e-10 1.05e-11 69.61 0.000 7.09e-10 7.50e-10

    Quant. 0.95
    2.Y_WiFi2_.. -4.65e-10 2.73e-10 -1.70 0.089 -1.00e-09 7.10e-11
    3.Y_WiFi2_.. -1.24e-09 2.33e-10 -5.33 0.000 -1.70e-09 -7.87e-10
    4.Y_WiFi2_.. -9.22e-10 2.66e-10 -3.46 0.001 -1.44e-09 -4.00e-10
    5.Y_WiFi2_.. -1.46e-09 2.46e-10 -5.95 0.000 -1.95e-09 -9.82e-10
    _cons 8.30e-09 1.83e-10 45.31 0.000 7.94e-09 8.66e-09

    Last edited by Masoumeh Sanagou; 11 May 2022, 15:58.

  • #2
    The easiest approach will be to copy the results as a table from the Stata Results window and paste it into Word or Excel.

    Here is a sample run of qrprocess.
    Code:
    . sysuse auto
    (1978 automobile data)
    
    . qrprocess price weight length foreign, vce(boot) quantile(0.25 0.5 0.75)
    (bootstrapping .................................................................................
    > ...................)
    
    Quantile regression
    No. of obs.        74      
    Algorithm:         qreg.
    Variance:          empirical bootstrap.
    
    ------------------------------------------------------------------------------
          price  |      Coef.   Std. Err.      t     P>|t|    [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    Quant. 0.25  |
         weight  |   1.831789   1.193841    1.53    0.129    -.5492525     4.21283
         length  |    2.84556   24.47018    0.12    0.908    -45.95867    51.64979
        foreign  |   2209.925   1010.856    2.19    0.032     193.8367    4226.014
          _cons  |  -1879.775   2876.544   -0.65    0.516    -7616.861    3857.312
    ------------------------------------------------------------------------------
    Quant. 0.5   |
         weight  |   3.933588   2.561046    1.54    0.129    -1.174258    9.041434
         length  |  -41.25191   67.96286   -0.61    0.546    -176.7996    94.29575
        foreign  |   3377.771   1064.986    3.17    0.002     1253.724    5501.818
          _cons  |   344.6489   5969.647    0.06    0.954    -11561.44    12250.73
    ------------------------------------------------------------------------------
    Quant. 0.75  |
         weight  |    9.22291   2.026758    4.55    0.000      5.18067    13.26515
         length  |  -220.7833   72.75111   -3.03    0.003    -365.8808   -75.68578
        foreign  |   3595.133   1179.117    3.05    0.003     1243.459    5946.807
          _cons  |    20242.9   8315.364    2.43    0.017     3658.434    36827.37
    ------------------------------------------------------------------------------
    
    .
    From Stata's menus I choose Edit > Table copy options and click Remove all in the dialog box that opens, and then click OK to close the dialog box.

    Then, in Stata's Results window I select the lines that I have colored blue above, and then choose Edit > Copy table copy.

    Then, I paste what I have copied into Microsoft Word or Microsoft Excel. In Word, I will then select what I have pasted and use Table > Convert > Text to table.

    Finally, I edit the results to look as I prefer.

    Comment


    • #3
      Thanks for the reply. However, as I have around 70 tables, I'm looking for an export option or any advice on how I can program it to save time.
      Cheers,

      Comment

      Working...
      X