Home › Forums › ASDOC : Easy Publication Quality Tables in Stata › Exporting Granger causality results after running syntax ‘pvar’ in stata
-
AuthorPosts
-
Aamina Khurram
GuestJuly 8, 2020 at 11:13 pmPost count: 118Hi Professor,
I am running panel var model in stata with syntax
pvar y xafter 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
Best
AaminaHello Amina,
pvar
is a community-contributed program, which asdoc is not aware of. However, you can use the matrix left behind ny thepvargrager
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 -----------------------------------------------
-
This reply was modified 3 years, 2 months ago by
Attaullah Shah.
-
This reply was modified 3 years, 2 months ago by
Attaullah Shah.
-
This reply was modified 3 years, 2 months ago by
Attaullah Shah.
-
This reply was modified 3 years, 2 months ago by
Attaullah Shah.
Aamina Khurram
GuestJuly 9, 2020 at 4:02 pmPost count: 118Dear 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
c1
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)
pvargranger
return list
mat t =r(pgstats)
asdoc wmat, mat (t) replaceAny idea what is going wrong here.
Best
AaminaAamina Khurram
GuestJuly 9, 2020 at 4:38 pmPost count: 118Dear 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 -
This reply was modified 3 years, 2 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.