Hello,
would it be possible to create a custom table, that looks like the following picture, automatically using asdoc [nested] command?

Either way would be fine. The latter might be easier (?) since asdoc, nested automatically puts the indices in columns when using bys Index command.
Currently the nested results table looks like this for regression 1:

I need to run 3 regressions per time period chosen. I can get the nested tables with
I am only interested in x1, x2, and x3 coefficients (and their significance indicated by stars, standard errors in parenthesis). When using the above command the nested table gives out all coefficients, and append command just adds the full new regression to the file instead of appending one table.
I am aware that I can use
to store these values in a macro, but I do not know how I would use the macro to implement the desired changes.
So is there a way to automate these tables so I wouldn't have to do the tables manually as the datasets are various and large? I am using Stata 18, and installed asdoc from ssc.
Thank you in advance.
Here is a data example of a dataset (there are dummies in, hence one that has value 0 in the snippet):
would it be possible to create a custom table, that looks like the following picture, automatically using asdoc [nested] command?
Either way would be fine. The latter might be easier (?) since asdoc, nested automatically puts the indices in columns when using bys Index command.
Currently the nested results table looks like this for regression 1:
I need to run 3 regressions per time period chosen. I can get the nested tables with
Code:
bys Index: asdoc reg y x1 x2 x3 x4 x5, replace nested bys Index: asdoc reg y x1 x2 x3 x4 x5 x6 x7, append nested bys Index: asdoc reg y x1 x2 x3 x4 x5 x6 x7 x8 x9, append nested
I am aware that I can use
Code:
asodc, accum(bys Index: asdoc reg y x1 x2 x3 x4 x5 x6 x7 x8 x9)
So is there a way to automate these tables so I wouldn't have to do the tables manually as the datasets are various and large? I am using Stata 18, and installed asdoc from ssc.
Thank you in advance.
Here is a data example of a dataset (there are dummies in, hence one that has value 0 in the snippet):
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double(Date Index) float(x1 x2) double x3 float x4 1.13616e+12 1 .007612212 .003968798 -.37 0 1.13616e+12 2 .007612212 .021190444 -.37 0 1.13616e+12 3 .007612212 .011272166 -.37 0 1.13616e+12 4 .007612212 .01488089 -.37 0 1.13616e+12 5 .007612212 .008910405 -.37 0 1.13616e+12 6 .007612212 -.012066815 -.37 0 1.13616e+12 7 .007612212 .004117139 -.37 0 1.13616e+12 8 .007612212 .01015796 -.37 0 1.13616e+12 9 .007612212 .012511847 -.37 0 1.13616e+12 10 .007612212 .004153495 -.37 0 1.13616e+12 11 .007612212 . -.37 0 1.1362464e+12 1 .0007993703 -.003317988 -.22 0 1.1362464e+12 2 .0007993703 .008408818 -.22 0 1.1362464e+12 3 .0007993703 .0018131792 -.22 0 1.1362464e+12 4 .0007993703 .004257003 -.22 0 1.1362464e+12 5 .0007993703 .007241737 -.22 0 1.1362464e+12 6 .0007993703 -.0006748497 -.22 0 1.1362464e+12 7 .0007993703 .0007140059 -.22 0 1.1362464e+12 8 .0007993703 -.02648982 -.22 0 1.1362464e+12 9 .0007993703 .014410613 -.22 0 1.1362464e+12 10 .0007993703 .002391231 -.22 0 1.1362464e+12 11 .0007993703 . -.22 0 1.1363328e+12 1 -.005995332 .008140917 -.42 0 1.1363328e+12 2 -.005995332 -.004962879 -.42 0 1.1363328e+12 3 -.005995332 -.007884173 -.42 0 1.1363328e+12 4 -.005995332 -.003643263 -.42 0 1.1363328e+12 5 -.005995332 -.00333417 -.42 0 1.1363328e+12 6 -.005995332 .0021392643 -.42 0 1.1363328e+12 7 -.005995332 -.018333698 -.42 0 1.1363328e+12 8 -.005995332 -.013252933 -.42 0 1.1363328e+12 9 -.005995332 -.011053025 -.42 0 1.1363328e+12 10 -.005995332 -.003967269 -.42 0 1.1363328e+12 11 -.005995332 . -.42 0 1.1364192e+12 1 -.0017573863 .014447698 .67 0 1.1364192e+12 2 -.0017573863 .0005946556 .67 0 1.1364192e+12 3 -.0017573863 -.0015456794 .67 0 1.1364192e+12 4 -.0017573863 -.00960754 .67 0 1.1364192e+12 5 -.0017573863 -.008007395 .67 0 1.1364192e+12 6 -.0017573863 -.00941605 .67 0 1.1364192e+12 7 -.0017573863 -.005993012 .67 0 1.1364192e+12 8 -.0017573863 .005240256 .67 0 1.1364192e+12 9 -.0017573863 .004420996 .67 0 1.1364192e+12 10 -.0017573863 .00548491 .67 0 1.1364192e+12 11 -.0017573863 . .67 0 1.1366784e+12 1 .0026801866 .00695249 -.21 0 1.1366784e+12 2 .0026801866 -.00031961536 -.21 0 1.1366784e+12 3 .0026801866 .008680353 -.21 0 1.1366784e+12 4 .0026801866 .000014676232 -.21 0 1.1366784e+12 5 .0026801866 .002981023 -.21 0 1.1366784e+12 6 .0026801866 .008782237 -.21 0 end format %tc Date
Comment