Advanced Analytics Using SAS
Advanced Analytics Using SAS
Analytics
Using SAS
SAS Procedures for Fundamental & Advanced
Analytics
› PROC MEANS
› PROC UNIVARIATE
› PROC FREQUENCY
› PROC CORR
› PROG REG
› PROC SQL
› Prints Descriptive Statistics
› Without any options, prints for all numeric
PROC MEANS variables in the data set
– No of Non-missing observations,
– mean,
SYNTAX – standard deviation,
– minimum and
PROC MEANS data=XYZ;
– maximum.
RUN; › With Options presents the opted measures
› Computing Statistics for Each Value- BY
Variable
– Pre-requisite the dataset must be sorted on the
BY variable
› CLASS –
– Substitute for BY,
– Sorted dataset not needed
PROC MEANS- Options
Option Description
Sample Code:
QUIT; QUIT;
› INTERVAL may be
– ‘YEAR’, ‘SEMIYEAR’,
– ‘MONTH’, ‘SEMIMONTH’, ‘QTR’,
– ‘DAY’, ‘WEEKDAY’, ‘TENDAY’.
› Selects a Sample from a population.
PROC
SURVEYSELECT › Options:
› OUT=
– output data set that contains the sample.
PROC SURVEYSELECT
Data=XYZ <options>; › METHOD=
– Sample selection method.
STRATA variables;
– Default is simple random sampling (METHOD=SRS) with
CONTRAL variables; no SIZE statement.
– With SIZE statement, default is probability proportional to
SIZE variable; size without replacement (METHOD=PPS)
ID variables; › SAMPSIZE= number for sample size
› STRATA partitions input data set into nonoverlapping
groups
› ID lists variables from the input data set to be included
in the output data set else all variables inlcuded