Home Forums ASDOC : Easy Publication Quality Tables in Stata Exporting Granger causality results after running syntax ‘pvar’ in stata

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Aamina Khurram
    Post count: 118

    Hi Professor,

    I am running panel var model in stata with syntax
    pvar y x

    after running pvar I am running granger causality using:

    asdoc pvargranger

    I can’t open the asdoc file and it says file is corrupt. ALthough file gets opened with other codes like reg or sum but not for pvargranger.

    Any help to export pvargranger matrix to asdoc or any other program shall be appreciated


    Attaullah Shah
    Post count: 69

    Hello Amina,

    pvar is a community-contributed program, which asdoc is not aware of. However, you can use the matrix left behind ny the pvargrager command and write it with asdoc, as mentioned in Section 12 of the asdoc’s help file. Here is one example. Please do remember to visit the asdocx program, which is more powerful and can export to Excel, LaTeX, and docx formats.

    webuse nlswork2
    xtset idcode year
    generate wage = exp(ln_wage)
    pvar wage hours
    mat t = r(pgstats)
    asdoc wmat, mat(t) replace
                 |      chi2         df  Prob > ~2 
    wage         |                                 
           hours |     9.199      1.000      0.002 
             ALL |     9.199      1.000      0.002 
    hours        |                                 
            wage |    17.162      1.000      0.000 
             ALL |    17.162      1.000      0.000 
    Aamina Khurram
    Post count: 118

    Dear Dr Attaullah

    Thank for getting back to me. I have tried the similar syntax with the webuse nlswork2, but the matrix stata return is an empty one.

    Results Table
    r1 .

    I have tried the same with my data as well, but it does not give any values in the table.
    pvar Y X, lag(8) instl(1/10) td gmmstyle vce(robust)
    return list
    mat t =r(pgstats)
    asdoc wmat, mat (t) replace

    Any idea what is going wrong here.


    Aamina Khurram
    Post count: 118

    Dear Dr

    It has been resolved now. Apologies for posting again. However, the row names of equation variables: wage and hours do not appear on the matrix and have to be manually written.
    Also, for variables more than one, the section break is not shown.Any thing to fix this. Please see below a cropped version of the results that are presented:

    chi2 df Prob > chi2
    Lerner Index 5.066 1 .024
    lnTA 12.594 1 0
    ROA2 w 3.999 1 .046
    op eff w .415 1 .519
    Liq w 1.68 1 .195
    ALL 20.97 5 .001
    Ch CoVaR 6.089 1 .014
    lnTA 8.963 1 .003
    ROA2 w 14.066 1 0
    op eff w 39.278 1 0
    Liq w .431 1 .511
    ALL 119.121 5 0

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.