Hello Stata Community,

i have the attached dataset and I want to give an descriptive statistics overview of all variables. The columns should be categorised first by all observations and then all the observations by the outcome of the variable RTN_high. RTN_high is a dummy variable and can have the value 0 or 1. The problematic part is to attach a fourth column calculating the t-statistics difference between the two outcomes of RTN_high. The last problem is to get an output of that table in word.

Many Thanks for your help!
Alexander Wohlfahrt

Example:
Array

Dataset:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input double PositionMarketValue float(newdate Sharpe_arithmetic MgrTenure GER FundNumber year RTN_high)
  193770275 208 16.201956          . 1.1869714 201 2012 0
 8794470274 208 13.794497          .  1.267546 527 2012 0
  570700576 208 2.6373994          .  .9293047 322 2012 0
  267604551 208  8.791037 .017121412  1.095376 228 2012 0
 1235958599 208 4.2555933          .   .979948 193 2012 1
  191128617 208 12.102172 .009960594  1.257141 638 2012 0
  187203417 208  3.660357          . 1.1382641 468 2012 0
  654965981 208  5.185279          .  .6299999 680 2012 0
 5783020955 208  4.960356          .  .9280332 423 2012 1
  189637621 208  4.752597 .004128354 1.3829232 790 2012 1
  174642660 208 11.810092          .         . 268 2012 1
   29414986 208 3.3516085          . 1.2555097 737 2012 0
   44060690 208 23.408224  .03451304      1.22 475 2012 0
  158827169 208  3.890746          .         . 255 2012 0
  983049687 208 3.6850846          .  .9513803 310 2012 1
   85771560 208 11.275693          .         . 288 2012 0
  701186891 208  3.560029          .       .61 666 2012 0
 1179471243 208 9.2770815          .       .69 374 2012 0
  956570294 208 11.803252          .      1.03 218 2012 0
  320346832 208 4.7683005          .  .9205087 496 2012 1
 4772640177 208  8.517321  .00502158  .7064518 539 2012 0
   88495447 208  5.153543          .       .98 683 2012 0
   23194297 208 19.944044 .015319947      1.79 645 2012 1
   71118782 208 12.085834          . 1.5085508 533 2012 0
 9462912308 208 13.151587 .035413772  .9421488 375 2012 1
  612535872 208  3.751308 .022615874 1.0364876 615 2012 1
  372173488 208  2.447958 .027194595   .889522 588 2012 0
 2325643964 208 11.567204          .      1.02 767 2012 0
 8059400511 208  5.448692          .       .62 782 2012 1
   83758614 208  4.102721          .   .811779 552 2012 0
  774403097 208 19.787085 .007543629 1.1645411 222 2012 1
   25039647 208  11.24491          . 2.1068387 455 2012 1
  932615054 208  8.614697          . 1.3448927 207 2012 0
10221427021 208  9.403482          .  .6998059 541 2012 0
  603310156 208  4.205664          .  .3601557 609 2012 1
  317876222 208  8.883387          . 1.1817575 504 2012 0
   50483765 208  15.18872 .011694502       .92 617 2012 1
  973640128 208  4.348868          . .40896446 555 2012 1
 3623547942 208   3.54845          .  .6592609 348 2012 0
 1521132575 208    5.4737          . 1.0202045 383 2012 .
 1091265354 208  5.384566          .  .9609937 469 2012 0
12886434757 208 16.661518          .  .3066685 395 2012 0
   39278805 208  14.23188  .07699005      1.32 390 2012 1
  204162395 208 3.9045365          .  .8118944 191 2012 1
  103060631 208 4.4151053 .019846125 1.0190785 639 2012 1
   96030275 208  1.490005          .      1.04 752 2012 0
   54051087 208  7.865411          . 1.7032213 742 2012 0
   58241821 208  7.112356 .008226684      1.78 761 2012 .
  584525900 208 4.6283684          . 2.2238398 186 2012 0
  133108753 208 13.171436   .0111991  1.443533 465 2012 0
 2511962672 208 11.794168          .  .7179447 251 2012 1
  257004151 208  6.121236          . 1.5379792 624 2012 0
  630291870 208 13.427565          .        .4 413 2012 1
 8866933678 208  11.98459          .  .7500937 181 2012 0
  828109867 208 4.7626925          .    .68384 399 2012 1
  124593544 208  1.604368 .002529555  1.259294 464 2012 1
   27554494 208 8.8252535          .         . 732 2012 1
   88680979 208 14.028933          .         . 493 2012 1
   30565995 208  13.96154          .  2.472335 777 2012 0
  574324442 208  1.962108 .010380934  .9792967 235 2012 0
   93295371 208 16.977097          . 1.9886026 769 2012 1
 1003103645 208  13.59859 .011649465       .38 735 2012 1
   53322722 208   11.0274  .01783449  1.701259 355 2012 0
   29713546 208  8.240434 .003205104 1.4720564 600 2012 0
  135092036 208  8.311115          .  .9794015 297 2012 1
   23241798 208  10.36054          . 2.0838196 289 2012 0
   40122604 208  4.808155          . 1.1860576 704 2012 1
   47198047 208 15.382877          . 1.0589516 445 2012 1
   24917293 208  4.967212          . 1.5112944 581 2012 1
  192174510 208 3.9332924  .00502158 1.2663535 229 2012 1
   67998821 208  8.923186          .      1.06 721 2012 1
   10127552 208  8.421154          .  2.462094 692 2012 0
   14692334 208 12.208493          .      2.35 440 2012 0
 2759534938 208  4.321675          . 1.3355156 213 2012 0
  229720881 208  3.630739          .  .9726931 729 2012 1
   14342459 208  6.336542          . 1.0486789 580 2012 1
 1513517708 208 12.702775          . 1.0422118 276 2012 0
  523223259 208  7.316905          . 1.4246145 265 2012 1
  450714596 208 8.9517975          . 1.2126575 372 2012 0
 1091947586 208 14.581576          .      1.34 481 2012 0
 2695944669 208  8.476254          .  .5639882 586 2012 1
  107465839 208  8.047733          .      1.15 433 2012 1
  366982203 208  3.642335          . 1.4439117 387 2012 0
   29107920 208 16.670036          .      1.14  14 2012 1
   10396523 208 12.923324  .00594483  3.402904 775 2012 1
 3665319228 208 14.088075 .001373616 1.1655868 595 2012 0
 1702664821 208  12.79386 .011154062  .9337652 368 2012 0
  242717254 208   7.90295          .      1.14 675 2012 1
  295079574 208 10.128193 .011694502       .29 477 2012 0
 3099968614 208  5.916742          . 1.1566352 380 2012 1
  789393411 208 11.755927  .01010321       .47 562 2012 0
  619489202 208 16.051685          . 1.2306713 471 2012 0
  152198718 208  9.239822          .  1.512451 484 2012 0
  580568398 208 2.9686944          .       .84 678 2012 0
  907809132 208 10.504707          . 1.2784417 354 2012 0
 1536338342 208 4.2826414          .       .22 558 2012 1
 3599101621 208 13.085174 .018727716  .8365467 305 2012 1
 1527383360 208 3.4316554          . 1.1799821 467 2012 0
  421937179 208  8.289066          . 1.1249256 577 2012 1
  107115519 208 15.679397          .         . 192 2012 0
end
format %tq newdate