asdocx : Easy, yet extremely flexible program for publication quality tables in Stata › Forums › asdocx Forum › Building table row by row not working in asdocx
-
AuthorPosts
-
The following example provided in help asdocx does not work at all:
webuse air2, clear
asdocx, row(Variables, Z, p-value, lags) title(Table: Dfuller test results) replace
dfuller air
asdocx, row( Air1,r(Zt)',
r(p)’, `r(lags)’) dec(3)I get an error: varlist not allowed.
Substituting asdocx to asdoc works well.The same goes for accum: none of the examples work, e.g.,
webuse grunfeld, clear
asdocx, row( \i, \i, invest, \i, \i, kstock,\i) replace
asdocx, row( Periods, N, Mean, SD, N, Mean, SD)sum invest if inrange(year , 1935, 1945)
asdocx, accum(r(N)',
r(mean)’, `r(sd)’)
sum kstock if inrange(year , 1935, 1945)
asdocx, accum(r(N)',
r(mean)’, `r(sd)’)
asdocx, row( 1935-1945, $accum)or
sum invest if inrange(year , 1946, 1954)
asdocx, accum(r(N)',
r(mean)’, `r(sd)’)
sum kstock if inrange(year , 1946, 1954)
asdocx, accum(r(N)',
r(mean)’, `r(sd)’)
asdocx, row( 1946-1954, $accum)All yields same error: varlist not allowed.
All commands related to
row()
are deprecated in asdocx. They are replaced with the flexmat suit of commands. flexmat is part of asdocx package, and is already installed on your system. See resources related to flexmat here.Video : https://www.youtube.com/watch?v=HzTlpMF4dZI
Post: Introduction to flexmat:
Using flexmat inside asdocxThe example you have quoted above can be easily implemented using flexmat.
flexmat reset flexmat addrow, data(\i, \i, invest, \i, \i, kstock,\i) row(1) col(1) flexmat addrow, data( Periods, N, Mean, SD, N, Mean, SD) row(2) col(1) webuse grunfeld, clear sum invest if inrange(year , 1935, 1945) flexmat addrow, data(1935-1945, r(N)' ,r(mean)', `r(sd)') row(3) col(1) dec(3) sum kstock if inrange(year , 1935, 1945) flexmat addrow, data(`r(N)' ,r(mean)', `r(sd)') row(3) col(5) dec(3) asdocx exportflex
Yes, the help needs to be updated.
-
AuthorPosts
- You must be logged in to reply to this topic.