Module 9: Using Basic Statistical Procedures Flashcards
What does PROC UNIVARIATE do?
It produces statistics and graphs describing the distribution of a single varaible
Write the general syntax for PROC UNIVARIATE.
proc univariate;
var varlist;
plot-request varlist/ (options);
run;
plot-requestion = graph wanted to use
List some plot-requests PROC UNIVARIATE can use.
CDFPLOT: cumulative distribution funciton plot
HISTOGRAM: histogram
QQPLOT: quantile-quantile plot
List the distribution options in PROC UNIVARIATE.
Normal, beta, exponential, gamma, lognormal, normal, weibull
Given the following code, explain each line.
1) proc means data = one noprint;
2) var gamedate;
3) output out = ckdate (where=(stat in (‘MIN’, ‘MAX’)));
run;
1) takes data from dataset one, but does not print results
2) Tells SAS to only look at gamedate
3) Puts the output to a dataset called ckdate with the condition that the observations in ckdate need to have the min and max value of gamedate
Note: need to use proc print to display the new dataset ckdate
What does PROC CORR do?
It computes correlations to varaiables
Write the general syntax to PROC CORR.
proc corr;
var var-list;
with var-list;
run;
Note: the with statement is optional
What is the difference between the var and with statements in PROC CORR?
Var statement lists variables across the table of correlations
With statement lists variables down the side of the table
T/F: If no with statement, then the variables in the var statement will appear both across and down.
True
Fill in the blank.
The default correlations are ____ product-moment correlation coefficients.
Pearson
Note: can request Spearman rank with SPEARMAN option
When doing a PROC TTEST, what is the null hypothesis to choose from variances?
H0: two variances equal, use pooled/equal variances
H1: two variances unequal
Given the following code, explain each line.
proc ttest;
1) by year;
2) class league;
3) var runs;
run;
1) specifies seperate analysis by year
2) specifies league as a caegorical varaible
3) Specifies the variable of interest(s). A t-test will be conducted on the runs variable, comparing its means across different levles of the league