Announcement

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

  • #31
    Dear Statalist,

    I am using Stata 17 to run panel fixed effects regression.I want to use the command --collect-- to create a table.but how can I add the fixed effects into the table, diaplay "Country fixed effects YES" or "Year fixed effects YES" in the table.In Stata 16,we can easily use --outreg2-- to add them.But In the Collections Systerm, How can I add them?and how can I drop the variable "Year1936" ,"Year 1937".....,I will give an example below.
    Code:
    webuse grunfeld,clear
    collect clear
    collect _r_b _r_se, tag(model[(1)]):xtreg invest mvalue kstock i.year,fe r
    collect _r_b _r_se, tag(model[(2)]):xtreg invest c.mvalue##c.kstock i.year,fe r
    collect layout (colname#result) (model)
    collect style showbase off
    collect style cell, nformat(%5.2f) border(right, pattern(nil))
    collect style cell result[_r_se], sformat("(%s)")
    collect preview
    collect style cell cell_type[item column-header], halign(center)
    collect style header result, level(hide)
    collect style column, extraspace(1)
    collect stars _r_p 0.01 "***" 0.05 "** " 0.1 "*  " 1 "   ", attach(_r_b) 
    collect layout (colname#result[_r_b _r_se] result[r2 N]) (model) 
    collect style header result[r2 N], level(label)
    collect style header colname, level(value)
    collect style row stack, spacer delimiter(" x ")
    collect label levels result N "N" r2 "R2", modify
    collect style cell result[N], nformat(%5.0f)
    collect preview
    --------------------------------------
                        (1)         (2)   
    --------------------------------------
    mvalue            0.12***     0.05**  
                       (0.01)      (0.02) 
                                          
    kstock            0.36***     -0.10   
                       (0.05)      (0.09) 
                                          
    Year=1936        -19.20       8.67    
                      (20.70)     (13.04) 
    Year=1937        -40.69       10.28   
                      (33.28)     (21.93) 
    Year=1938        -39.23**     -5.39   
                      (15.74)      (9.69) 
    Year=1939        -69.47**    -17.28   
                      (27.00)     (11.53) 
    Year=1940        -44.24**     12.77   
                      (17.37)     (14.41) 
    Year=1941        -18.80       40.78   
                      (17.85)     (23.91) 
    Year=1942        -21.14       37.33   
                      (14.16)     (24.42) 
    Year=1943        -42.98***    26.04   
                      (12.54)     (21.26) 
    Year=1944        -43.10***    29.63   
                      (11.00)     (22.01) 
    Year=1945        -55.68***    24.21   
                      (15.20)     (20.04) 
    Year=1946        -31.17       53.22   
                      (20.92)     (31.08) 
    Year=1947        -39.39       51.77   
                      (26.44)     (31.41) 
    Year=1948        -43.72       59.54   
                      (38.88)     (38.97) 
    Year=1949        -73.50*      39.20   
                      (38.25)     (32.82) 
    Year=1950        -75.90*      44.72   
                      (36.80)     (35.26) 
    Year=1951        -62.48       64.30   
                      (49.42)     (43.71) 
    Year=1952        -64.63       75.70   
                      (51.56)     (50.52) 
    Year=1953        -67.72       79.40   
                      (43.74)     (51.40) 
    Year=1954        -93.53**     68.77   
                      (31.73)     (48.68) 
                                          
    mvalue x kstock               0.00*** 
                                   (0.00) 
                                          
    _cons            -32.84       41.99*  
                      (19.78)     (21.39) 
                                          
    R2                  0.80        0.87  
                                          
    N                   200         200   
    --------------------------------------



    Best regards.

    Raymond Zhang
    Stata 17.0,MP

    Comment


    • #32
      Raymond Zhang , you have already asked this question here. This thread is not the place to ask for help. Please don't spam the forum with multiple posts asking the same question.

      Comment


      • #33
        I'm using readreplace in Stata 17 but get the following error. How to fix it?
        Click image for larger version

Name:	error.png
Views:	2
Size:	10.9 KB
ID:	1611313

        Comment


        • #34
          I wonder if the stata17SE in MacBook is faster than stata16.1MP?I use my stata17SE, and it seems that it's slower than stata16.1MP.

          Comment


          • #35
            That sounds like the difference between SE and MP. I am not surprised.
            ---------------------------------
            Maarten L. Buis
            University of Konstanz
            Department of history and sociology
            box 40
            78457 Konstanz
            Germany
            http://www.maartenbuis.nl
            ---------------------------------

            Comment


            • #36
              Hi. Stata 17 looks great. Just one clarification: while using Bayesian VAR, I don't see option 'actuals' in "bayesfcast" command. Is there a way out if one wants to get forecasts conditional on the path of one or two variables? Thanks in advance.

              Comment

              Working...
              X