Announcement

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

  • Issue with estout function

    I am attempting to put multiple regressions in a table with the coefficients and p values. However, I am having an issue with the labelling of row and column headers-

    This is the current code I am using:

    Code:
     estout m1 m2 m3
    
    ---------------------------------------------------
                           m1           m2           m3
                            b            b            b
    ---------------------------------------------------
    UKIS            -.0111878    -.0280661    -.0001217
    CCI              .0000502     .0002587    -.0000379
    EPU             -7.97e-07    -7.19e-06     .0000152
    _cons           -.0043665    -.0218091    -.0002017
    ---------------------------------------------------
    
    . label varlabels(_cons Constant)
    invalid syntax
    r(198);
    I tried another method of labelling which also doesn't seem to work:
    Code:
    label _cons "constant"
    invalid syntax
    r(198);
    Not sure what is going wrong here?

  • #2
    You're not new here, so you should know better than to post results without data or code. You're also asked by the FAQ to let us know that estout is user contributed, and is a command, not a function.

    My initial impression is you need to have it in quotes (Constant), but if not, then you'll definitely need to post your data and code, and then I'll have a look in a few minutes when I go downstairs and have coffee.

    Oh, and why is your code on two lines? Can't you just label the coefficients as options of estout?

    Comment


    • #3
      Sure let me add in the data-

      Code:
      input float lretFTSE100 double EPU float CCI
                  .  87.51  101.244
                  .  54.02        .
                  .  89.88        .
                  . 182.99        .
                  .  58.08        .
       -.0017807904  84.42        .
        -.007184107  22.54        .
         .004728384 205.08        .
        -.006222915 138.36        .
                  . 221.58        .
                  .      0        .
                  . 142.86        .
       -.0021305445 199.27        .
          .00477447 112.57        .
        -.001190921   23.4        .
         .007110974  71.75        .
                  .  38.48        .
                  . 102.35        .
                  . 127.19        .
       -.0041852435  257.2        .
         .002643599 186.89        .
        -.007652489  24.48        .
        -.003575908  96.33        .
                  . 128.17        .
                  .  254.8        .
                  .   84.5        .
        .0003418619  57.57        .
         .004738027 129.16        .
         -.01274617 107.66        .
        -.004737455  21.71        .
                  .  72.46        .
                  . 132.39 101.3045
                  . 166.49        .
        .0020998758 136.77        .
         .001793143 156.65        .
        -.003213097 169.13        .
        .0041811494 196.29        .
                  . 126.47        .
                  .  30.81        .
                  .   8.34        .
        -.006667921  83.63        .
        -.002022498  97.98        .
       -.0041760853 111.42        .
         .007800043  52.18        .
                  . 141.22        .
                  .  95.39        .
                  . 234.21        .
         .012034496  55.13        .
       -.0041754744  27.19        .
         .016224109 176.71        .
      -.00011737856  48.28        .
                  .  78.05        .
                  . 244.87        .
                  .  60.89        .
        -.006107942 145.66        .
         .002396631   52.6        .
        .0018485195 218.28        .
        -.005257503  46.12        .
                  .  156.3        .
                  . 153.66        .
                  .  28.91 101.3478
      Code I have been using is
      Code:
      reg lretFTSE100 CCI EPU
      estimates store m1 , title(Model 1)
      reg F1.lretFTSE100 CCI EPU
      estimates store m2 , title(Model 2)
      reg F3.lretFTSE100 CCI EPU
      estimates store m3 , title(Model 3)
      estout m1 m2 m3, cells(b(star fmt(3)) p(par fmt(2)))
      estout m1 m2 m3, cells(b(star fmt(6)) p(par fmt(6)))
      legend label varlabels(_cons constant)
      I have taken out the UKIS variable as it starts 6 months after the start of my dataset and I do not know how to specify a time period using dataex

      Comment


      • #4
        Essentially repeated at https://www.statalist.org/forums/for...estout-command If interested, please answer there.

        Comment

        Working...
        X