後期の計画と簡単な演習

統計処理 01 クラス : 第16回(10/03/02)

楽しかった夏期休業もアッと言う間に終って、いよいよ後期である。 今日は、後期の計画を提示すると共に、 前期の実習内容を思い出してもらうべく簡単な演習を行う。
  1. 後期の計画

  2. 簡単な演習 : 基礎統計量や散布図

    1. データ : Irises3.dat

    2. プログラム : Lesson 16-1 : les1601.sas

       /* Lesson 16-01 */
       /*    File Name = les1601.sas   10/03/02   */
      
      data iris;
        infile 'Irises3.dat';
        input species slength swidth plength pwidth;   :
        label species='Kinds of Iris'                  : 各変量の説明
              slength='Sepal length'                   :
              swidth='Sepal width'                     :
              plength='Petal length'                   :
              pwidth='Petal width'                     :
      ;                                                :
      
      proc print data=iris(obs=10);
      run;
      
      proc means data=iris;
      run;
      
      proc univariate data=iris plot;               :
        var slength -- pwidth;                      : 連続する変量の省略した指定方法
      run;                                          :
      
      proc sort data=iris;
        by species;
      run;
      
      proc means data=iris;
        by species;
      run;
      
      proc plot data=iris;
        plot slength*swidth;
        by species;
      run;
      
      proc plot data=iris;
        plot slength*swidth=species;
      run;
      

    3. 出力結果 : les1601.lst :
                                    SAS システム                             1
                                              09:53 Wednesday, October 2, 2002
              OBS    SPECIES    SLENGTH    SWIDTH    PLENGTH    PWIDTH
      
                1       1         5.1        3.5       1.4        0.2 
                2       1         4.9        3.0       1.4        0.2 
                3       1         4.7        3.2       1.3        0.2 
                4       1         4.6        3.1       1.5        0.2 
                5       1         5.0        3.6       1.4        0.2 
                6       1         5.4        3.9       1.7        0.4 
                7       1         4.6        3.4       1.4        0.3 
                8       1         5.0        3.4       1.5        0.2 
                9       1         4.4        2.9       1.4        0.2 
               10       1         4.9        3.1       1.5        0.1 
      
                                    SAS システム                             2
                                              09:53 Wednesday, October 2, 2002
       Variable  Label            N          Mean       Std Dev       Minimum
       ----------------------------------------------------------------------
       SPECIES   Kinds of Iris  150     2.0000000     0.8192319     1.0000000
       SLENGTH   Sepal length   150     5.8433333     0.8280661     4.3000000
       SWIDTH    Sepal width    150     3.0573333     0.4358663     2.0000000
       PLENGTH   Petal length   150     3.7580000     1.7652982     1.0000000
       PWIDTH    Petal width    150     1.1993333     0.7622377     0.1000000
       ----------------------------------------------------------------------
      
                       Variable  Label               Maximum
                       -------------------------------------
                       SPECIES   Kinds of Iris     3.0000000
                       SLENGTH   Sepal length      7.9000000
                       SWIDTH    Sepal width       4.4000000
                       PLENGTH   Petal length      6.9000000
                       PWIDTH    Petal width       2.5000000
                       -------------------------------------
      
                                    SAS システム                             9
                                              09:53 Wednesday, October 2, 2002
                                Univariate Procedure
      Variable=SLENGTH       Sepal length
                                      Moments
                      N               150  Sum Wgts        150
                      Mean       5.843333  Sum           876.5
                      Std Dev    0.828066  Variance   0.685694
                      Skewness   0.314911  Kurtosis   -0.55206
                      USS         5223.85  CSS        102.1683
                      CV         14.17113  Std Mean   0.067611
                      T:Mean=0   86.42537  Pr>|T|       0.0001
                      Num ^= 0        150  Num > 0         150
                      M(Sign)          75  Pr>=|M|      0.0001
                      Sgn Rank     5662.5  Pr>=|S|      0.0001
      
                                    SAS システム                            10
                                              09:53 Wednesday, October 2, 2002
                                Univariate Procedure
      Variable=SLENGTH       Sepal length
                                  Quantiles(Def=5)
                       100% Max       7.9       99%       7.7
                        75% Q3        6.4       95%       7.3
                        50% Med       5.8       90%       6.9
                        25% Q1        5.1       10%       4.8
                         0% Min       4.3        5%       4.6
                                                 1%       4.4
                       Range          3.6                    
                       Q3-Q1          1.3                    
                       Mode             5                    
      
                                    SAS システム                            11
                                              09:53 Wednesday, October 2, 2002
                                Univariate Procedure
      Variable=SLENGTH       Sepal length
                                      Extremes
                         Lowest    Obs     Highest    Obs
                            4.3(      14)      7.7(     118)
                            4.4(      43)      7.7(     119)
                            4.4(      39)      7.7(     123)
                            4.4(       9)      7.7(     136)
                            4.5(      42)      7.9(     132)
      
                                    SAS システム                            12
                                              09:53 Wednesday, October 2, 2002
                                Univariate Procedure
      Variable=SLENGTH       Sepal length
            Stem Leaf                                 #             Boxplot
               7 677779                               6                |   
               7 0122234                              7                |   
               6 5555566777777778889999              22                |   
               6 00000011111122223333333334444444    32             +-----+
               5 5555555666666777777778888888999     31             *--+--*
               5 000000000011111111122223444444      30             +-----+
               4 566667788888999999                  18                |   
               4 3444                                 4                |   
                 ----+----+----+----+----+----+--              
      
                                    SAS システム                            13
                                              09:53 Wednesday, October 2, 2002
                                Univariate Procedure
      Variable=SLENGTH       Sepal length
                                   Normal Probability Plot              
                7.75+                                           ** *+++*
                    |                                       ****+++     
                    |                                *******            
                    |                          *******                  
                    |                     ******                        
                    |               *******                             
                    |      ** ******                                    
                4.25+* *++*+++                                          
                     +----+----+----+----+----+----+----+----+----+----+
                         -2        -1         0        +1        +2     
      
                                    SAS システム                            33
                                              09:53 Wednesday, October 2, 2002
      ---------------------------- Kinds of Iris=3 ---------------------------
       Variable  Label           N          Mean       Std Dev       Minimum
       ---------------------------------------------------------------------
       SLENGTH   Sepal length   50     6.5880000     0.6358796     4.9000000
       SWIDTH    Sepal width    50     2.9740000     0.3224966     2.2000000
       PLENGTH   Petal length   50     5.5520000     0.5518947     4.5000000
       PWIDTH    Petal width    50     2.0260000     0.2746501     1.4000000
       ---------------------------------------------------------------------
      
                                    SAS システム                            35
                                              09:53 Wednesday, October 2, 2002
      --------------------------- Kinds of Iris=1 ----------------------------
            プロット : SLENGTH*SWIDTH.  凡例: A = 1 OBS, B = 2 OBS, ...
      
      S 6.0 +
      e     |                                             A    A         A
      p     |                                      A                A
      a 5.4 +                                    B      B    B
      l     |                                 A  B C    A C      A
            |                          B B  A A  B B B
      l 4.8 +                          B A  B    B
      e     |         A                  A  A    A   A
      n     |                        A B    A
      g 4.2 +
      t     ---+-----------+-----------+-----------+-----------+-----------+--
      h       2.0         2.5         3.0         3.5         4.0         4.5
                                        Sepal width
      
                                    SAS システム                            36
                                              09:53 Wednesday, October 2, 2002
      --------------------------- Kinds of Iris=2 ----------------------------
            プロット : SLENGTH*SWIDTH.  凡例: A = 1 OBS, B = 2 OBS, ...
         S   |
         e 7 +                                              A   A
         p   |                                  A       A   B
         a   |                                  A   B   A       A
         l   |          A   A       A               A               A
           6 +          A                   A   B   B   B       A       A
         l   |                          B   B   B   A   A
         e   |              A   B   B   A   A       A   C
         n   |                              A
         g 5 +  A           A   A   A
         t   ---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
         h     2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4
                                       Sepal width
      
                                    SAS システム                            37
                                              09:53 Wednesday, October 2, 2002
      --------------------------- Kinds of Iris=3 ----------------------------
            プロット : SLENGTH*SWIDTH.  凡例: A = 1 OBS, B = 2 OBS, ...
      S 8 +                                                                 A
      e   |                 A       A       B                               A
      p   |                         A   A   A       A               A
      a 7 +                                 A   B   A
      l   |             A                   E   A   B   B
          |             A       B   D   A       A   A   A   B
      l 6 + A               A               C
      e   |             A       B   B
      n   |
      g 5 +             A
      t   --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
      h    2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8
                                       Sepal width
      
                                    SAS システム                            38
                                              09:53 Wednesday, October 2, 2002
         プロット : SLENGTH*SWIDTH.  使用するプロット文字: SPECIES の値.
           (NOTE: 75 オブザベーションを表示していません.)
      S 8 +                                               3
      e   |                3    3    3                    3
      p   |                       3  3    2          3
      a   |             3       2 2  2  2 3  3
      l   |     2  2    2    3  2 2  3  3 2  2 3
        6 +     2          2 2  2 2  2    2    2               1
      l   |        2 2  2  2 2  2 2  2         1  1    1  1 1       1    1
      e   |2       2    2    2       1    1  1 1  1  1 1  1       1
      n   |          2  3            1  1 1    1     1
      g   |        1              1  1    1
      t 4 +
      h   -+------------+------------+------------+------------+------------+-
          2.0          2.5          3.0          3.5          4.0          4.5
                                       Sepal width
      

  3. 次回は、... : 10月10日 14:45
[DIR]講義のホームページへ戻ります