The MCHP SAS MANUAL - Numeric Statistics (Output)

         

Home    Contents

GENERAL GUIDELINES:
Windows in SAS
File management

The SAS Program
Program syntax
Debugging tips


 USING SAS PROGRAMMING TO: 
   
1. Prepare the data set 
   Types of data 
   Example programs    
    
2. View the data
   SAS Procedures
  
3. Explore the data  
   Numeric statistics    
   Frequency tables    
    
4. Manipulate the data  
   Basic techniques    
   New variables
  
5. Adding Variables and 
Observations to Data Sets
   The SET Statement
   The MERGE Statement

6. Data Processing
   ARRAY Statement
   Do Loops
   By-Group Processing
   RETAIN Statement
  
NON-PROGRAMMING 
      Alternatives

 
SAMPLE DATA SETS: 
 Height/weight
 Height/weight/region
 Simulated clinical data 
 Simulated Manitoba Health 
    

Statistic for Numeric Data - Output

                     PROC MEANS:  Example 1                    8
                     No keywords specified
                                  08:54 Wednesday, June 30, 1999

                      The MEANS Procedure

 Variable     N            Mean         Std Dev         Minimum
 --------------------------------------------------------------
 age         17      34.4705882       7.7630346      23.0000000
 height      18      69.0555556       3.5225696      62.0000000
 weight      18     146.7222222      22.5409576      98.0000000
 --------------------------------------------------------------

                    Variable         Maximum
                    ------------------------
                    age           53.0000000
                    height        75.0000000
                    weight       176.0000000
                    ------------------------
                     PROC MEANS:  Example 2                    9
             Use of VAR, CLASS, and TITLE keywords
                       CLASSED by gender
                                  08:54 Wednesday, June 30, 1999

                      The MEANS Procedure

                    Analysis Variable : age

         N
sex    Obs     N            Mean         Minimum         Maximum
----------------------------------------------------------------
F        7     7            31.1            23.0            47.0

M       11    10            36.8            29.0            53.0
----------------------------------------------------------------

                    Analysis Variable : age

                        N                       N
               sex    Obs             Sum    Miss
               ----------------------------------
               F        7           218.0       0

               M       11           368.0       1
               ----------------------------------
                     PROC MEANS:  Example 3                   10
                Use of VAR BY and OUT= keywords
                        SORTED by gender
                                  08:54 Wednesday, June 30, 1999

---------------------------- sex=F -----------------------------

                      The MEANS Procedure

                    Analysis Variable : age

                                                               N
 N          Mean       Minimum       Maximum           Sum  Miss
----------------------------------------------------------------
 7          31.1          23.0          47.0         218.0     0
----------------------------------------------------------------


---------------------------- sex=M -----------------------------

                    Analysis Variable : age

                                                               N
 N          Mean       Minimum       Maximum           Sum  Miss
----------------------------------------------------------------
10          36.8          29.0          53.0         368.0     1
----------------------------------------------------------------
                     PROC MEANS:  Example 3                   11
                Use of VAR BY and OUT= keywords
                        SORTED by gender
                 A print of the OUTPUT data set
                                  08:54 Wednesday, June 30, 1999

      Obs    sex    _TYPE_    _FREQ_    _STAT_      age

        1     F        0         7       N         7.0000
        2     F        0         7       MIN      23.0000
        3     F        0         7       MAX      47.0000
        4     F        0         7       MEAN     31.1429
        5     F        0         7       STD       7.7337
        6     M        0        11       N        10.0000
        7     M        0        11       MIN      29.0000
        8     M        0        11       MAX      53.0000
        9     M        0        11       MEAN     36.8000
       10     M        0        11       STD       7.2541
                    PROC UNIVARIATE example                   12
                                  08:54 Wednesday, June 30, 1999

                    The UNIVARIATE Procedure
                         Variable:  age

                            Moments

N                          17    Sum Weights                 17
Mean               34.4705882    Sum Observations           586
Std Deviation      7.76303458    Variance            60.2647059
Skewness           0.95763621    Kurtosis            0.70897216
Uncorrected SS          21164    Corrected SS        964.235294
Coeff Variation    22.5207488    Std Error Mean      1.88281244


                   Basic Statistical Measures

         Location                    Variability

     Mean     34.47059     Std Deviation            7.76303
     Median   32.00000     Variance                60.26471
     Mode     30.00000     Range                   30.00000
                           Interquartile Range      9.00000

  NOTE: The mode displayed is the smallest of 2 modes with a
                          count of 2.


                   Tests for Location: Mu0=0

        Test           -Statistic-    -----p Value------

        Student's t    t  18.30803    Pr > |t|    <.0001
        Sign           M       8.5    Pr >= |M|   <.0001
        Signed Rank    S      76.5    Pr >= |S|   <.0001


                    Quantiles (Definition 5)

                     Quantile      Estimate

                     100% Max            53
                     99%                 53
                     95%                 53
                     90%                 47
                     75% Q3              39
                     50% Median          32
                     25% Q1              30
                     10%                 26
                     5%                  23
                     1%                  23
                     0% Min              23
                    PROC UNIVARIATE example                   13
                                  08:54 Wednesday, June 30, 1999

                    The UNIVARIATE Procedure
                         Variable:  age

                      Extreme Observations

              ----Lowest----        ----Highest---

              Value      Obs        Value      Obs

                 23        6           39       18
                 26        4           41       17
                 28        1           42       10
                 29        9           47        2
                 30       15           53       14


                         Missing Values

                                 -----Percent Of-----
          Missing                             Missing
            Value       Count     All Obs         Obs

                .           1        5.56      100.00

Contact: Charles Burchill       Telephone: (204) 789-3429
Manitoba Centre for Health Policy
Department of Community Health Sciences, University of Manitoba
4th floor Brodie Centre
408 - 727 McDermot Avenue
Winnipeg, Manitoba R3E 3P5       Fax: (204) 789-3910
Last modified on Wednesday, 24-Aug-2005 13:51:52 CDT