Table 1.1 on pages 4 and 5 using the whas100 data.
use https://stats.idre.ucla.edu/stat/examples/asa2/whas100, clear label define status 0 "alive" 1 "dead" label value folstatus status label define gender 0 "male" 1 "female" label value gender gender list, sep(0) noobs +------------------------------------------------------------------------------------+ | id addate foldate hosstay foltime folsta~s age gender bmi | |------------------------------------------------------------------------------------| | 1 3/13/95 3/19/95 4 6 dead 65 male 31.38134 | | 2 1/14/95 1/23/96 5 374 dead 88 female 22.6579 | | 3 2/17/95 10/4/01 5 2421 dead 77 male 27.87892 | | 4 4/7/95 7/14/95 9 98 dead 81 female 21.47878 | | 5 2/9/95 5/29/98 4 1205 dead 78 male 30.70601 | | 6 1/16/95 9/11/00 7 2065 dead 82 female 26.45294 | | 7 1/17/95 10/15/97 3 1002 dead 66 female 35.71147 | | 8 11/15/94 11/24/00 56 2201 dead 81 female 28.27676 | | 9 8/18/95 2/23/96 5 189 dead 76 male 27.12082 | | 10 7/22/95 12/31/02 9 2719 alive 40 male 21.78971 | | 11 10/11/95 12/31/02 6 2638 alive 73 female 28.43344 | | 12 5/26/95 9/29/96 11 492 dead 83 male 24.66175 | | 13 5/21/95 3/18/96 6 302 dead 64 female 27.46412 | | 14 12/14/95 12/31/02 10 2574 alive 58 male 29.83756 | | 15 11/8/95 12/31/02 7 2610 alive 43 male 22.95776 | | 16 10/8/95 12/31/02 5 2641 alive 39 male 30.10881 | | 17 10/17/95 5/12/00 6 1669 dead 66 male 31.99738 | | 18 10/30/95 1/5/03 9 2624 dead 61 male 30.7142 | | 19 12/10/95 12/31/02 6 2578 alive 49 male 25.69548 | | 20 11/23/95 12/31/02 5 2595 alive 53 female 30.12017 | | 21 10/5/95 2/5/96 6 123 dead 85 male 18.41038 | | 22 11/5/95 12/31/02 8 2613 alive 69 female 37.60097 | | 23 9/9/95 10/22/97 4 774 dead 54 male 28.97529 | | 24 9/9/95 3/13/01 14 2012 dead 82 male 19.90095 | | 25 12/15/95 12/31/02 4 2573 alive 67 female 28.32237 | | 26 12/3/95 1/19/01 11 1874 dead 89 female 23.43605 | | 27 10/18/95 12/31/02 2 2631 alive 68 male 26.44693 | | 28 3/16/95 6/4/00 7 1907 dead 78 male 28.20595 | | 29 10/25/95 4/15/97 5 538 dead 56 male 24.11997 | | 30 10/6/95 1/18/96 4 104 dead 85 female 36.71647 | | 31 9/3/95 9/9/95 4 6 dead 72 male 27.97907 | | 32 6/30/95 5/1/99 5 1401 dead 50 male 20.363 | | 33 7/22/95 12/22/02 8 2710 dead 81 female 28.64898 | | 34 9/17/95 1/5/98 4 841 dead 85 female 20.17772 | | 35 3/21/97 8/16/97 6 148 dead 84 female 23.6187 | | 36 2/23/97 12/31/02 12 2137 alive 75 male 23.67519 | | 37 1/1/97 12/31/02 16 2190 alive 61 male 23.4314 | | 38 1/18/97 12/31/02 5 2173 alive 48 male 33.4511 | | 39 1/19/97 4/25/98 8 461 dead 83 female 19.57068 | | 40 3/18/97 12/31/02 10 2114 alive 82 male 25.82748 | | 41 2/3/97 12/31/02 4 2157 alive 62 male 30.86625 | | 42 5/17/97 12/31/02 5 2054 alive 39 male 24.21079 | | 43 3/8/97 12/31/02 5 2124 alive 45 male 31.66439 | | 44 2/23/97 12/31/02 4 2137 alive 65 male 26.22085 | | 45 6/14/97 1/5/03 18 2031 dead 76 female 32.41986 | | 46 7/7/97 12/31/02 9 2003 alive 77 female 24.56345 | | 47 4/27/97 12/31/02 9 2074 alive 68 male 21.3055 | | 48 5/15/97 2/13/98 7 274 dead 73 male 26.45678 | | 49 7/26/97 12/31/02 4 1984 alive 64 male 27.97977 | | 50 7/17/97 12/31/02 6 1993 alive 80 male 36.02333 | | 51 9/9/97 12/31/02 7 1939 alive 84 female 22.31424 | | 52 6/19/97 9/3/00 4 1172 dead 43 female 25.33148 | | 53 8/20/97 11/17/97 3 89 dead 87 female 18.77718 | | 54 8/28/97 1/3/98 7 128 dead 70 female 18.60004 | | 55 9/9/97 12/31/02 17 1939 alive 80 male 25.50204 | | 56 9/1/97 9/15/97 11 14 dead 64 female 24.41255 | | 57 9/3/97 6/10/00 5 1011 dead 59 female 29.85998 | | 58 9/24/97 10/30/01 6 1497 dead 92 male 24.3664 | | 59 9/19/97 12/31/02 3 1929 alive 51 male 34.77034 | | 60 4/17/97 12/31/02 1 2084 alive 41 male 27.26234 | | 61 10/21/97 2/5/98 6 107 dead 90 male 24.78423 | | 62 10/2/97 12/27/98 4 451 dead 83 male 21.80987 | | 63 1/8/97 12/31/02 3 2183 alive 61 male 27.36909 | | 64 11/11/97 12/31/02 7 1876 alive 64 male 26.22085 | | 65 11/7/97 5/31/00 3 936 dead 82 male 26.88683 | | 66 4/20/97 4/18/98 5 363 dead 91 female 27.61844 | | 67 6/18/97 5/1/00 5 1048 dead 48 male 31.58373 | | 68 10/29/97 12/31/02 12 1889 alive 63 male 23.33267 | | 69 4/29/97 12/31/02 5 2072 alive 81 male 28.35006 | | 70 11/8/97 12/31/02 7 1879 alive 52 male 32.63621 | | 71 11/17/97 12/31/02 4 1870 alive 65 male 31.95113 | | 72 11/28/97 12/31/02 5 1859 alive 74 male 25.01782 | | 73 5/19/97 12/31/02 5 2052 alive 62 male 30.22827 | | 74 12/11/97 12/31/02 4 1846 alive 60 female 29.28812 | | 75 5/10/97 12/31/02 7 2061 alive 71 male 32.32407 | | 76 10/6/97 12/31/02 3 1912 alive 73 male 31.47445 | | 77 12/21/97 12/31/02 5 1836 alive 43 male 28.59188 | | 78 11/22/97 3/16/98 7 114 dead 80 male 33.36074 | | 79 10/31/97 2/4/02 7 1557 dead 72 male 21.80987 | | 80 6/28/97 12/27/00 5 1278 dead 57 male 23.57087 | | 81 12/21/97 12/31/02 3 1836 alive 80 female 28.35006 | | 82 10/2/97 12/31/02 6 1916 alive 76 male 28.03555 | | 83 9/14/97 12/31/02 3 1934 alive 53 male 24.21079 | | 84 9/25/97 12/31/02 10 1923 alive 44 male 32.60387 | | 85 12/2/97 1/15/98 3 44 dead 71 male 23.0563 | | 86 9/26/97 12/31/02 6 1922 alive 64 male 31.75016 | | 87 10/24/97 7/25/98 5 274 dead 86 male 21.10959 | | 88 11/27/97 12/31/02 7 1860 alive 72 female 25.23266 | | 89 4/12/97 3/23/02 4 1806 dead 73 female 22.86698 | | 90 2/15/97 12/31/02 6 2145 alive 85 female 26.05501 | | 91 10/22/97 4/22/98 5 182 dead 60 male 23.18023 | | 92 6/27/97 12/31/02 4 2013 alive 63 male 35.48949 | | 93 1/17/97 12/31/02 5 2174 alive 80 female 20.59809 | | 94 12/12/97 5/24/02 4 1624 dead 74 male 30.13206 | | 95 11/4/97 5/10/98 10 187 dead 79 female 16.78615 | | 96 11/4/97 12/31/02 4 1883 alive 48 female 32.11709 | | 97 12/24/97 4/19/02 3 1577 dead 32 female 39.93835 | | 98 11/26/97 1/27/98 8 62 dead 86 female 14.91878 | | 99 8/10/97 12/31/02 16 1969 alive 56 male 29.05295 | | 100 3/26/97 2/13/00 7 1054 dead 74 male 32.89087 | +------------------------------------------------------------------------------------+