Export results of VARs and VECM from Stata to Word Excel | asdocx


Since the varsoc command leaves a Stata matrix behind, we can use the wmat command of asdocx to send this Stata matrix to the output file. Here is an example

webuse lutkepohl2 
varsoc dln_inv dln_inc dln_consump 
mat stats = r(stats) 
asdocx wmat, mat(stats) replace

Export to Excel


To export to Excel, we need to just change the file extension. see the code example below where I use the save(Myfile.xlsx) option.

asdocx wmat, mat(stats) replace save(Myfile.xlsx) 
Results Table
lag LL LR df p FPE AIC HQIC SBIC
r1 0 696.398 .b .b .b 0 -15.94 -15.906 -15.855
r2 1 711.682 30.568 9 0 0 -16.085 -15.948 -15.745
r3 2 724.696 26.028 9 0.002 0 -16.177 -15.937 -15.582
r4 3 729.124 8.856 9 0.451 0 -16.072 -15.729 -15.222
r1 4 738.353 18.458 9 0.03 0 -16.077 -15.632 -14.972