Announcement

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

  • Output .rtf file using esttab showing results for 90+ models (including those from the past)

    Would appreciate any advice on this as it is for my dissertation. When using esttab all results previously generated using eststo are shown, resulting in output table showing 90+ sets of results as I have run and altered the code a few times. Any way to only output the results generated from the most recent execution of the code (only 4 sets of results).

    For context, this is hedonic pricing model.

    esttab using Reg_tables_$date.rtf, re ///
    stats(N r2 r2_a F p, fmt(%9.0g %10.4f)) b(%10.2f) star(* 0.10 ** 0.05 *** 0.01) ///
    varwidth(25) modelwidth(7) label onecell nogaps nobaselevels compress ///
    title(Regression Summary) not



  • #2
    estout is from SSC (FAQ Advice #12). The results in memory can be referenced using a period (.) whereas the option -replace- overwrites previously stored results.

    Code:
    esttab . using Reg_tables_$date.rtf, replace ///
    stats(N r2 r2_a F p, fmt(%9.0g %10.4f)) b(%10.2f) star(* 0.10 ** 0.05 *** 0.01) ///
    varwidth(25) modelwidth(7) label onecell nogaps nobaselevels compress ///
    title(Regression Summary) not

    Comment


    • #3
      Andrew Musau , thanks for replying and for the help! I have four sets of results to export and using the replace option or the period means that only one set of results (the last one) is outputted. Do you know if there is a way to specifically output the last four sets of results? I have been looking but have not been able to find much further information

      Comment


      • #4
        Use -replace- for the first of the four results, and for the remaining three, append them.

        Comment


        • #5
          Originally posted by ruby meng View Post
          Andrew Musau , thanks for replying and for the help! I have four sets of results to export and using the replace option or the period means that only one set of results (the last one) is outputted. Do you know if there is a way to specifically output the last four sets of results? I have been looking but have not been able to find much further information
          If you cannot follow Leonardo's advice, show us the regression commands that come before the esttab code.

          Comment


          • #6
            Leonardo Guizzetti thank you for the suggestion! It works but the the results are stored in four seperate tables in the same file rather than one table with four columns of results which is what I would like.

            Comment


            • #7
              Originally posted by ruby meng View Post
              Leonardo Guizzetti thank you for the suggestion! It works but the the results are stored in four seperate tables in the same file rather than one table with four columns of results which is what I would like.
              That was not at all clear from your description. Sorry, I don't use -esttab- so I can't be of further help here.

              Comment


              • #8
                Andrew Musau the regression commands are just four lines of "eststo: reg ..."

                Comment


                • #9
                  Originally posted by Leonardo Guizzetti View Post

                  That was not at all clear from your description. Sorry, I don't use -esttab- so I can't be of further help here.
                  No worries and thanks for your help anyways! Sorry I could have been more clear

                  Comment


                  • #10
                    Code:
                    eststo m1: reg ...
                    eststo m2: reg ...
                    eststo m3: reg ...
                    eststo m4: reg ...
                    esttab m1 m2 m3 m4 using Reg_tables_$date.rtf, replace ///
                    stats(N r2 r2_a F p, fmt(%9.0g %10.4f)) b(%10.2f) star(* 0.10 ** 0.05 *** 0.01) ///
                    varwidth(25) modelwidth(7) label onecell nogaps nobaselevels compress ///
                    title(Regression Summary) not

                    Comment


                    • #11
                      Originally posted by Andrew Musau View Post
                      Code:
                      eststo m1: reg ...
                      eststo m2: reg ...
                      eststo m3: reg ...
                      eststo m4: reg ...
                      esttab m1 m2 m3 m4 using Reg_tables_$date.rtf, replace ///
                      stats(N r2 r2_a F p, fmt(%9.0g %10.4f)) b(%10.2f) star(* 0.10 ** 0.05 *** 0.01) ///
                      varwidth(25) modelwidth(7) label onecell nogaps nobaselevels compress ///
                      title(Regression Summary) not
                      Got the output I was aiming for now, thanks so much!

                      Comment

                      Working...
                      X