Announcement

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

  • using asdoc command when we have loop command

    hello, I use this code in terms of the effect the tariff on output , trade balance, exchange rate. I want to use asdoc and send the Stata output related to all of my regression tables (with 5 lags) to the world. but I do not know how can I receive all tables, separately for each lags.
    .
    Code:
    gen b_f=.
    gen se_f=.
        
    forvalues y = 1/6 {
            xtscc f`y' l(0/2)shock l(1/2)f1 l(1/2)a1 l(1/2)u1  i.year  , fe
                
            replace b_f =  _b[shock] if _n==`y'+1
            replace se_f = _se[shock] if _n==`y'+1
                }
    when I use
    Code:
    asdoc            forvalues y = 1/6 {
            xtscc f`y' l(0/2)shock l(1/2)f1 l(1/2)a1 l(1/2)u1  i.year  , fe
                
            replace b_f =  _b[shock] if _n==`y'+1
            replace se_f = _se[shock] if _n==`y'+1
                }
    I received an error,
    command asdocforvalues is unrecognized
    and so on.

    Also, I do not know how can I access the graph in terms of the impulse response function.
    I hope I receive your guidance so soon.
    tank you so much.


  • #2
    You need to use asdoc after the forvalue.
    Code:
    forvalues y = 1/6 {
        asdoc xtscc f`y' l(0/2)shock l(1/2)f1 l(1/2)a1 l(1/2)u1  i.year  , fe
    
        replace b_f =  _b[shock] if _n==`y'+1
        replace se_f = _se[shock] if _n==`y'+1
    }
    However, please note that xtscc is a community contributed command. I have previously added to asdocx, but not to asdoc. Also, asdocx have several other useful features. You can explore more about asdocx here https://fintechprofessor.com/asdocx/
    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
      hi @Attaullah Shah, thank you so much for your reply. I do it . but :

      Code:
       
       forvalues y = 1/6 {     asdoc xtscc f`y' l(0/2)shock l(1/2)f1 l(1/2)a1 l(1/2)u1  i.year  , fe      replace b_f =  _b[shock] if _n==`y'+1     replace se_f = _se[shock] if _n==`y'+1 }

      command asdocxtscc is unrecognized
      In terms of asdocx , it is written we use it as an appendix, but again I received an error.
      also, I need the graph of impulse response of output to shock based on my result and I do not know, I try a lot but I fouldent. I hope I receive your guidance and help. thank you so much

      Comment


      • #4
        hello dears! I use asdoc for run a forvalue syntax but I don't get my output file. However, no error occurs.
        Attached Files

        Comment

        Working...
        X