
LOG for Lecture 8 SAS Session
=============================  9/24/08

 libname mydir ".";
    data polynes;
       set mydir.polynest;
    proc gchart data=mydir.polynesT;
      title " Histogram with  9  bars";
      VBAR LatitS / levels = 9;
    run;


  proc univariate data=polynes noprint; 
                     /* NOPRINT suppresses usual printed output*/
     title "Histogram from PROC UNIVARIATE";
     var latitS;
     histogram latitS / midpoint -25 to 45 by 10 normal;
  run;


The UNIVARIATE Procedure
Fitted Distribution for LatitS

Parameters for Normal Distribution

Parameter   Symbol   Estimate

Mean        Mu        9.59175
Std Dev     Sigma    15.95596


      Goodness-of-Fit Tests for Normal Distribution

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

Kolmogorov-Smirnov    D     0.20137691   Pr > D     <0.010
Cramer-von Mises      W-Sq  0.97542534   Pr > W-Sq  <0.005
Anderson-Darling      A-Sq  5.82736861   Pr > A-Sq  <0.005


Quantiles for Normal Distribution

          -------Quantile------
Percent    Observed   Estimated

    1.0   -23.30000   -27.52736
    5.0   -21.80000   -16.65347
   10.0   -21.10000   -10.85664
   25.0     6.63500    -1.17038
   50.0    16.30000     9.59175



Histogram from PROC UNIVARIATE      12:59 Wednesday, September 24, 2008   4

The UNIVARIATE Procedure
Fitted Distribution for LatitS

Quantiles for Normal Distribution

          -------Quantile------
Percent    Observed   Estimated

   75.0    19.00000    20.35388
   90.0    23.00000    30.04014
   95.0    26.00000    35.83697
   99.0    43.30000    46.71086

/* Printed histogram has normal curve over-plotted */


proc gchart data=polynes;
  vbar deforstn / discrete ;
   run;

/* this bar-chart gives frequency count for each
   distinct discrete value of the variable "deforstn" */

* ===================================================
PLOTTING characters within a scatter plot            
===================================================== ;

symbol1 v= circle color=black;
symbol2 v= square color=red;
symbol3 v= diamond color=blue;

proc gplot data=polynes;
  title "Scatterplot with controlled plotting symbols";
   plot deforstn*latitS = tephra ;
   run;



*======================================================
USED firefox IN WAM TO SAVE THE POLYNESIAN ASCII DATA-FILE
THEN STRIPPED TEXT AND SOME BLANKS NAD MADE SURE THE END-OF-LINE
CHARACTERS WERE BLANKS. THEN CAN INPUT DATA AS FOLLOWS:
===================================================== ;

   data poly2;
      infile "naturePoly.dat";
      input ID Archip $  Islnd $ ForstRep  Deforstn  Area   NrArea
     Isol_25 Isol_75  Elev   LatitS  Rain  Age PctMakat  Dust Tephra ;
      if ID ne . ;
   proc print; run;


