Announcement

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

  • Issue with estout command

    I am attempting to use the estout command to put the coefficient, p values and significance stars of 5 separate regressions, but I am having issue with re-labelling some of the contents in the table.

    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(6)) p(par fmt(6)))
    legend label varlabels(_cons "constant")
    I have also attempted to use
    Code:
    label _cons "constant"
    with no success.

    This is a sample of the data I am using
    Code:
    input float(lretFTSE100 CCI) double EPU
                .  101.244  87.51
                .        .  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
                . 101.3045 132.39
                .        . 166.49
      .0020998758        . 136.77
       .001793143        . 156.65
      -.003213097        . 169.13
      .0041811494        . 196.29
                .        . 126.47
                .        .  30.81
                .        .   8.34
      -.006667921        .  83.63

  • #2
    ^I am using estout from SSC in STATA 17.0

    Comment


    • #3
      estout (Stata Journal, SSC) is a wonderful command I never use, for reasons that aren't important here. So I would like to be able to answer this, but I have no idea.

      My concern is different. It is about how best to use Statalist, in your own best interests.

      You're already running a thread on this https://www.statalist.org/forums/for...stout-function

      You didn't get what you wanted, which is inevitably disappointing, but the way to handle this is not to start yet another thread with the same stuff and without a cross-reference. That is a good way to waste your time and that of others, as the same question is not likely to get a better answer. What you did is not intended to be rude, or thoughtless, but experienced members here will see it as poor practice.

      I would be more sympathetic if you have not already been advised in previous threads not to do this,

      Statalist like just about any technical forum has advantages: it is free, and if you ask a good question that interests somebody, you may get a good answer quickly, which is great. But nobody is obliged to answer anything. If you don't get a good answer, you need to be patient, but you can and should try making the question clearer.

      This is already advice you have been asked to read. See #1 at https://www.statalist.org/forums/help#adviceextras

      Comment


      • #4
        I understand Nick and thank you for making me aware of not how to use Statalist, as the last thing I want to do is waste anyone's time. I have experienced before that 99% of the time if a question is viewed by many but not answered within a day, it is likely to never be answered. How would you suggest getting around this issue without posting the question again, as my previous thread is likely to have been lost within other threads that have been created since?

        Comment


        • #5
          A minimal suggestion is that your data example doesn't allow anybody to run your code as you don't show a time variable or explain how the data are declared to tsset or xtset. Hence my guess is that the code would fail for any reader as soon as a command specifies lagged or leading variables.

          Also there are only 2 non-missing values of CCI in the data example, so those models might for that reason too fail or produce atypical results.

          Being fairly experienced in Stata means that occasionally I can understand a problem without seeing data or sample code and many others here are similarly experienced. It is more common that I have no useful idea about a solution until I have read in a data example, run the code, and seen for myself what the issue is. If a solution looks concise and clean it's because I've edited out all the silly mistakes and wrong turnings.

          Comment


          • #6
            My guess is that you have read the estout documentation, and are attempting to replicate a snippet of code such as

            Code:
            . estout, cells("b(star label(Coef.)) se(label(Std. err.))") ///
            > stats(r2 N, labels(R-squared "N. of cases")) ///
            > label legend varlabels(_cons Constant)
            The triple slashes here are important: they ensure that subsequent lines are treated as though they are part of the first line. In other words, try this

            Code:
            estout m1 m2 m3, cells(b(star fmt(6)) p(par fmt(6))) legend label varlabels(_cons "constant")
            If this gives you what you want, you can try adding the triple slashes back. Note that this only works if you are executing a do-file. If you are using the command window, then the triple slashes will not work.

            Code:
            estout m1 m2 m3, cells(b(star fmt(6)) p(par fmt(6))) ///
            legend label varlabels(_cons "constant")

            Comment

            Working...
            X