Announcement

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

  • Estimate save in Stata format instead of .txt

    Hi,

    I would like to save the estimate of the following regression as a Stata file:

    Code:
    webuse grunfeld
    xtfmb invest mvalue kstock, verbose
    est store FMB
    Can someone help? Thanks!

  • #2
    findit parmestor help estimates save ??

    Comment


    • #3
      Stephen,

      i had looked at estimates save but it talks about saving in .txt format (hence title...). How to save in .dta format? Thanks

      Comment


      • #4
        Have you looked at -parmest-?

        Comment


        • #5
          Stephen,

          I have tried with parmest:
          Code:
              webuse grunfeld, clear
              xtfmb invest mvalue kstock, verbose
              parmest, saving(FMB_test.dta, replace)
          However, I would like to record the coefficients that I get on the screen with the option "verbose". It is a list of regression coefficients that I would like to save. Please let me know how to do that.


          Comment


          • #6
            estimates save doesn't save in a txt file, it saves it as a STER file... see more here:
            http://www.statalist.org/forums/foru...imates-to-file

            Comment


            • #7
              If you are interested in saving just the first stage estimates:

              Code:
              webuse grunfeld, clear
              statsby _b r2=e(r2) , by(year) saving(c:\temp\stage1.dta, replace): reg invest mvalue kstock
              If you want both stage1 and stage2 in the same dataset:

              Code:
              **create stage2 dataset
              webuse grunfeld, clear
              xtfmb invest mvalue kstock, verbose
              mat B=e(b)
              clear
              svmat B
              rename B1 _b_mvalue
              rename B2 _b_kstock
              rename B3 _b_cons
              gen _eq2_r2= e(r2)
              gen year=0
              save c:\temp\stage2.dta, replace
              
              append using c:\temp\stage1.dta
              Stata/MP 14.1 (64-bit x86-64)
              Revision 19 May 2016
              Win 8.1

              Comment

              Working...
              X