Announcement

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

  • Asdoc Query (reporting for thesis format)

    hello and good day, I am using Local projection method and I want to export the result of my regression in the thesis format that is need just "coefficient and std and observation , R2 and reprent the Pvalue. but I do not know how? i am so thankful to recieve your advice.

    Code:
    xtset ifscode year
    and
    Code:
    local hmax = 5
    
    forvalues h = 0/`hmax' {
        gen tot_birth`h' = f`h'.tot_birth 
    }
    local hmax = 5
    
    eststo clear
    cap drop b u d Years Zero
    gen Years =_n-1 if _n<=`hmax'
    gen Zero = 0   if _n <=`hmax'
    gen b=0
    gen u=0
    gen d=0
    forv h = 0/`hmax' {
    
    asdoc reghdfe tot_birth`h' l(0/2)dum_pan l(1/2)tot_birth , absorb( i.ifscode i.year) vce(cluster ifscode)
    replace b = _b[dum_pan]                    if _n == `h'+1
    replace u = _b[dum_pan] + 1.645* _se[dum_pan]  if _n == `h'+1
    replace d = _b[dum_pan] - 1.645* _se[dum_pan]  if _n == `h'+1
    }
    I want my report was something like this that was mentioned:

    https://www.statalist.org/forums/for...09-asdoc-query

    that show me lags of the dependent and independent variable and other things i mention.

    many thanks








  • #2
    You have not posted any data. Also, you have not mentioned what problem are you facing / is there any error?
    Anyway, to create a nested regression, you need to add the nest option, for example

    Code:
     
     asdoc reghdfe tot_birth`h' l(0/2)dum_pan l(1/2)tot_birth , absorb( i.ifscode i.year) vce(cluster ifscode) nest

    asdocx is now available
    A more powerful and flexible version of asdoc is now available. I call it asdocx. You may like to check the details here

    https://fintechprofessor.com/asdocx


    Please do remember to cite asdoc. To cite:

    In-text citation
    Tables were created using asdoc, a Stata program written by Shah (2018).

    Bibliography
    Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.

    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

    Comment


    • #3
      @Attaullah Shah thank you so much for your reply. thanks alot.
      best regards,

      Comment


      • #4
        @Attaullah Shah I apologize if i ask again because there is a problem . in my estimation I use simple loop for different estimation . but when I use " nest replace " or "nest append " instead of adding another table below the first one it adds to the number of column, like I doing 2 regression.
        but I want to export separately.
        for example I estimate these 3 modedls:
        Code:
        local hmax = 5
        asdoc reghdfe lnfertility`h' l(0/2)dum_recession l(1/2)lnfertility , absorb( i.ifscode i.year) vce(cluster ifscode), nest
        and
        Code:
        local hmax = 5
        asdoc reghdfe Birth`h' l(0/2)dum_recession l(1/2)Birth, absorb( i.ifscode i.year) vce(cluster ifscode), nest
        and
        Code:
        local hmax = 5
        asdoc reghdfe lnfertility1519`h' l(0/2)dum_recession l(1/2)lnfertility1519 , absorb( i.ifscode i.year) vce(cluster ifscode), nest
        I want to be like 3 different table below each other . I want the report be like the "nest" report (just coefficient and std , obs, R2, but in in 3 different table like when we use just asdoc. because I do not know why previous nest " also is not reset.
        many thanks for your valuable time and advice.
        best regards,
        Last edited by Khati Zolfaghari; 07 Aug 2021, 12:08.

        Comment


        • #5
          For starting a new table, use the reset option.
          Regards
          --------------------------------------------------
          Attaullah Shah, PhD.
          Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
          FinTechProfessor.com
          https://asdocx.com
          Check out my asdoc program, which sends outputs to MS Word.
          For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

          Comment


          • #6
            @Attaullah Shah thank you so much for your reply,
            the problem is that even although I use the "reset " option , but as my estimation is for h=5 in the loop format, each time horizon report os below each other not in the one table. my estimation is in the loop format. I am so thankful to recieve your advice.
            many thanks

            Comment


            • #7
              Unless you show a data example and some table format (how your table looks like), it is hard to guess the exact solution you want.
              Regards
              --------------------------------------------------
              Attaullah Shah, PhD.
              Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
              FinTechProfessor.com
              https://asdocx.com
              Check out my asdoc program, which sends outputs to MS Word.
              For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

              Comment


              • #8
                @Attaullah Shah thank you so much for your reply. I attached the word file that exports from STATA.

                Many thanks for your valuable time and advice.
                Myfil233.rtf

                Comment

                Working...
                X