1 / 15

Second Period: PROC TABULATE

Second Period: PROC TABULATE. Jill Casey. Example 1:. Simple 2D Table. Simple 2D Table :. PROC TABULATE DATA=FINAL FORMAT=PCT.; CLASS HYPER REGION; WEIGHT PWGTQ; TABLES HYPER, REGION="Region of Residence"*PCTN<HYPER>=“ “ ; RUN ;. Simple 2D Table :. Example 2:.

noah
Download Presentation

Second Period: PROC TABULATE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Second Period: PROC TABULATE Jill Casey

  2. Example 1: Simple 2D Table

  3. Simple 2D Table : PROC TABULATEDATA=FINAL FORMAT=PCT.; CLASSHYPER REGION; WEIGHTPWGTQ; TABLESHYPER, REGION="Region of Residence"*PCTN<HYPER>=“ “ ; RUN;

  4. Simple 2D Table :

  5. Example 2: A Little More Complicated …

  6. Table with Nested Class Variables : PROC TABULATEDATA=FINAL FORMAT=PCT.; CLASSBMICAT SEX AGEGRP; WEIGHTPWGTQ; TABLESSEX=""*AGEGRP=""*PCTN<BMICAT>="", BMICAT="BMI Distribution“ ; RUN;

  7. Table with Nested Class Variables :

  8. Example 3: Multiple Statistics

  9. Table with Multiple Statistics: PROC TABULATEDATA=FINAL FORMAT=8.1; CLASSREGION; VARCHOL LDL HDL TRIG; WEIGHTPWGTC; TABLESREGION*(MIN MAX MEAN MEDIAN), CHOL LDL HDL TRIG ; RUN;

  10. Table with Multiple Statistics: Example 3: Blood Lipids Statistics by Region

  11. Example 4: Adding Subtotals

  12. Table with Subtotals : PROC TABULATEDATA=FINAL FORMAT=PCT.; CLASSREGION AGEGRP CVDRISK; WEIGHTPWGTC; TABLES(REGION ALL="Nova Scotia")* (AGEGRP="" ALL="Region Total")* PCTN<CVDRISK>="“ , CVDRISK="Cardiovascular Disease Risk" ; RUN;

  13. Example 4: Adding Subtotals

  14. Include data from many variables • Compute a variety of statistics in one table (all the basic stats available in Proc Means) • Compute summary statistics for categorical variables (N, NMISS, PCTN) Advantages

  15. Proc Tabulate by Example, by Lauren E. Haworth • SUGI and SAS Global Forum Proceedings (http://support.sas.com/events/sasglobalforum/previous/online.html) For More Information:

More Related