Hey, I hope someone could help me with this.
I would like to get a descriptive statistic by category (race) and import it into Word. However, I do not like how the table is currently organised, as each race should form a column and other variables should be in rows. Can this be done like in a picture below?
I would like to get a descriptive statistic by category (race) and import it into Word. However, I do not like how the table is currently organised, as each race should form a column and other variables should be in rows. Can this be done like in a picture below?
Code:
. estpost tabstat W1ExcludeYP W1truantYP substance_use delinquency in_poverty W1hiqualgP W1SOCMajorP monitoring discussion W1englangYP school_disengagement W1hwndayYP W1heposs9YP W1ssclubfYP W1ssportf > YP IndSchool, by(W1ethgrpYP) statistics(mean sd) columns (statistics) Summary statistics: mean sd for variables: W1ExcludeYP W1truantYP substance_use delinquency in_poverty W1hiqualgP W1SOCMajorP monitoring discussion W1englangYP school_disengagement W1hwndayYP W1heposs9YP W1ssclubfYP W1sspor > tfYP IndSchool by categories of: W1ethgrpYP W1ethgrpYP | e(mean) e(sd) -------------+---------------------- White | W1ExcludeYP | .1118524 .3152003 W1truantYP | .1586002 .3653216 substance_~e | .2177842 .5299686 delinquency | 2.356779 .7499987 in_poverty | .0048318 .0693465 W1hiqualgP | 2.264974 .9610805 W1SOCMajorP | 2.386501 .6329816 monitoring | 2.909013 .2967229 discussion | 2.27758 .7624536 W1englangYP | 1.030288 .2237949 school_dis~t | 2.763921 .607164 W1hwndayYP | 2.90455 1.392042 W1heposs9YP | 2.186284 1.021123 W1ssclubfYP | .4179721 .4932516 W1ssportfYP | .5468292 .4978314 IndSchool | .0457603 .2089747 -------------+---------------------- Mixed | W1ExcludeYP | .1619171 .3686136 W1truantYP | .2069892 .4054203 substance_~e | .2722372 .5750176 delinquency | 2.561111 .8756568 in_poverty | .008589 .0923344 W1hiqualgP | 2.259446 1.051363 W1SOCMajorP | 2.410458 .6483127 monitoring | 2.859559 .361713 discussion | 2.329139 .7797665 W1englangYP | 1.156446 .5147502 school_dis~t | 2.751781 .5856526 W1hwndayYP | 2.925501 1.344592 W1heposs9YP | 1.939511 .9566351 W1ssclubfYP | .4497937 .4978154 W1ssportfYP | .6049767 .4892363 IndSchool | .0184049 .134493 -------------+---------------------- Indian | W1ExcludeYP | .0502392 .218569 W1truantYP | .0894569 .2855542 substance_~e | .0384615 .2177764 delinquency | 2.165605 .5298383 in_poverty | .0029441 .0542059 W1hiqualgP | 1.997994 1.030653 W1SOCMajorP | 2.296875 .6164166 monitoring | 2.904692 .2988106 discussion | 2.395747 .7378455 W1englangYP | 2.17078 .8582632 school_dis~t | 3.00696 .5144446 W1hwndayYP | 3.402477 1.323279 W1heposs9YP | 1.523422 .7016518 W1ssclubfYP | .4512326 .4978829 W1ssportfYP | .5990099 .4904026 IndSchool | .0078508 .0882998 -------------+---------------------- Pakistani | W1ExcludeYP | .0812721 .2734942 W1truantYP | .1470588 .3543731 substance_~e | .0406321 .2243314 delinquency | 2.205128 .5201847 in_poverty | .0083074 .0908126 W1hiqualgP | 1.610695 .9462498 W1SOCMajorP | 2.204852 .6001153 monitoring | 2.879139 .3399277 discussion | 2.416287 .732529 W1englangYP | 2.438298 .8392789 school_dis~t | 3.00031 .5514661 W1hwndayYP | 3.113938 1.341585 W1heposs9YP | 1.719278 .7943795 W1ssclubfYP | .4632972 .4989514 W1ssportfYP | .625171 .4844102 IndSchool | .0062305 .0787283 -------------+---------------------- Bangladeshi | W1ExcludeYP | .058104 .2342985 W1truantYP | .1512195 .3585543 substance_~e | .0583832 .2757654 delinquency | 2.209302 .5326953 in_poverty | .0067295 .081812 W1hiqualgP | 1.284123 .6805107 W1SOCMajorP | 1.973737 .6309471 monitoring | 2.846154 .365888 discussion | 2.281818 .7737948 W1englangYP | 2.695712 .7973786 school_dis~t | 2.9425 .5751406 W1hwndayYP | 3.188707 1.354575 W1heposs9YP | 1.755952 .8097544 W1ssclubfYP | .4180064 .4936282 W1ssportfYP | .5551664 .4973831 IndSchool | 0 0 -------------+---------------------- Black Cari~n | W1ExcludeYP | .2289803 .4205529 W1truantYP | .2032967 .4028205 substance_~e | .1992687 .4903458 delinquency | 2.54409 .8629965 in_poverty | .0167785 .1285486 W1hiqualgP | 2.240137 .9510175 W1SOCMajorP | 2.257713 .6344715 monitoring | 2.7537 .4627113 discussion | 2.369318 .7626019 W1englangYP | 1.036458 .2293066 school_dis~t | 2.80835 .5833853 W1hwndayYP | 2.969697 1.339458 W1heposs9YP | 1.772563 .8304152 W1ssclubfYP | .5183044 .5001469 W1ssportfYP | .646789 .4785166 IndSchool | .0016779 .0409616 -------------+---------------------- Black Afri~n | W1ExcludeYP | .1086957 .311565 W1truantYP | .1194853 .3246572 substance_~e | .0721649 .3075892 delinquency | 2.353153 .7417196 in_poverty | .0096154 .0976638 W1hiqualgP | 2.280788 1.213266 W1SOCMajorP | 2.372951 .6537256 monitoring | 2.847188 .3576861 discussion | 2.361261 .7843426 W1englangYP | 1.990212 .9599337 school_dis~t | 2.978178 .5900378 W1hwndayYP | 3.332765 1.332122 W1heposs9YP | 1.375209 .6019447 W1ssclubfYP | .5626168 .4965279 W1ssportfYP | .6985138 .4593913 IndSchool | .0016026 .040032 -------------+---------------------- Other | W1ExcludeYP | .1153846 .3199592 W1truantYP | .1078947 .3106564 substance_~e | .0805195 .3326969 delinquency | 2.301047 .6447437 in_poverty | .006993 .0834286 W1hiqualgP | 2.063981 1.125469 W1SOCMajorP | 2.394595 .6633846 monitoring | 2.837413 .3778503 discussion | 2.3219 .7795811 W1englangYP | 2.050239 .9915047 school_dis~t | 2.92094 .5647214 W1hwndayYP | 3.25187 1.32812 W1heposs9YP | 1.588384 .7728077 W1ssclubfYP | .5040431 .5006589 W1ssportfYP | .570122 .4958149 IndSchool | .037296 .1897075 -------------+---------------------- Total | W1ExcludeYP | .1130817 .3167039 W1truantYP | .1544715 .3614127 substance_~e | .1803459 .485988 delinquency | 2.344026 .7309498 in_poverty | .005907 .0766322 W1hiqualgP | 2.155957 1.006774 W1SOCMajorP | 2.353549 .6383658 monitoring | 2.893458 .3183876 discussion | 2.304282 .7630238 W1englangYP | 1.341788 .7338761 school_dis~t | 2.815642 .6000604 W1hwndayYP | 2.997781 1.383062 W1heposs9YP | 2.016896 .9858111 W1ssclubfYP | .4360789 .495915 W1ssportfYP | .5679367 .4953829 IndSchool | .0336636 .1803675 . . . . esttab using "EEC_table4.rtf", main(mean) aux(sd) wide label nostar title("Descriptives by Group") (tabulating estimates stored by eststo; specify "." to tabulate the active results) (output written to EEC_table4.rtf)
Comment