[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    SAS Forum: how to use proc tabulate to get the result i want
From:       Roger DeAngelis <rogerjdeangelis () GMAIL ! COM>
Date:       2019-10-31 18:44:07
Message-ID: 6642536920424602.WA.rogerjdeangelisgmail.com () listserv ! uga ! edu
[Download RAW message or body]

SAS Forum: how to use proc tabulate to get the result i want

Check out

No are macros and none use 'proc tabulate'

https://github.com/rogerjdeangelis/utl_minimal_code_for_demographic_clinical_n_percent_report

https://github.com/rogerjdeangelis/utl_flexible_proc_report

https://github.com/rogerjdeangelis/utl_minimum_code_npct_clinical_report_with_bigN_headers

https://github.com/rogerjdeangelis/utl_clinical_n_percent_crosstab
PAGE 1



                                      Table : Demographics
                                   (Intent to Treat Population)

                                               Aspirin     Placebo     All
                                               (N= 45)     (N= 46)     (N= 91)
Sex - n (%)
  Male                                         9(20%)      12(26%)     21(23%)
  Female                                       36(80%)     34(74%)     70(77%)

Race - n (%)
  Non-White or Caucasian                       11(24%)     5(11%)      16(18%)
  White or Caucasian                           34(76%)     41(89%)     75(82%)
  Black or African American                    3(7%)       4(9%)       7(8%)
  Hispanic or Latino                           5(11%)      1(2%)       6(7%)
  Asian                                        2(4%)       0(0%)       2(2%)
  Japanese                                     0(0%)       0(0%)       0(0%)
  American Indian or Alaska Native             0(0%)       0(0%)       0(0%)
  Native Hawaiian or Other Pacific Islander    0(0%)       0(0%)       0(0%)
  Other                                        1(2%)       0(0%)       1(1%)

                                                                     Page 1 of 2
  Program: c:/utl/dm.sas_09FEB17
  Log: c:/utl/dm.log_09FEB17
  see Protocol 1013.6(Oncology)


PAGE 2
                                      Table : Demographics
                                   (Intent to Treat Population)

                                              Aspirin     Placebo     All
                                              (N= 45)     (N= 46)     (N= 91)
Age
  N                                              45          46          91
  Mean(SD)                                    52(8.6)     51(9.6)     51(9.1)
  Median                                      31, 68      26, 71      26, 71

Weight
  N                                              45          46         91
  Mean(SD)                                    74(15.2)    78(19.7)   76(17.7)
  Median                                      49, 125     41, 120    41, 125

Height
  N                                              45          46         91
  Mean(SD)                                    133(27.3    141(35.5)  137(31.8)
  Median                                      88, 224     73, 216    73, 224

                                                                   Page 2 of 2
  Program: c:/utl/dm.sas_09FEB17
  Log: c:/utl/dm.log_09FEB17
  see Protocol 1013.6(Oncology)

                   MINIMAL CODE CLINICAL REPORT

                                Aspirin       Placebo
  MAJOR        MINOR            (N= 17 )      (N= 15 )

  AGEGROUP     18-39            9(64.3%)      5(35.7%)
               40-64            1(33.3%)      2(66.7%)
               40-65            2(66.7%)      1(33.3%)
               40-66            1(33.3%)      2(66.7%)
               65+              4(44.4%)      5(55.6%)

  ETHNICITY    Hispanic         5(29.4%)      12(70.6%)
               Non-Hispanic     12(80.0%)      3(20.0%)

  GENDER       F                13(61.9%)     8(38.1%)
               M                4(36.4%)      7(63.6%)

  RACE         Black            5(55.6%)      4(44.4%)
               Multi-Race       3(100.0%)     0(0.0%)
               White            9(45.0%)      11(55.0%)




 EXAMPLE OUTPUT

  COUNTRY    STATE           GROUP1     GROUP2       TOTAL

  Canada     All             72(50%)    81(50%)    153(100%)

             Ontario         24(17%)    23(14%)    47(31%)
             Quebec          22(15%)    27(17%)    49(32%)
             Saskatchewan    26(18%)    31(19%)    57(37%)

  Mexico     All             85(50%)    72(50%)    157(100%)

             Campeche        21(12%)    27(19%)    48(31%)
             Michoacan       34(20%)    27(19%)    61(39%)
             Nuevo Leon      30(18%)    18(13%)    48(31%)

  U.S.A.     All             97(50%)    96(50%)    193(100%)

             California      14(7%)     20(10%)    34(18%)
             Colorado        21(11%)    31(16%)    52(27%)
             Florida         36(19%)    23(12%)    59(31%)
             Texas           26(13%)    22(11%)    48(25%)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic