• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/39

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

39 Cards in this Set

  • Front
  • Back
What are the main components of the SAS environment? (6, divided into 3 categories)
editor, log, output windows; explorer, results tab; menu buttoms
What are comments? Will SAS use the comments when running procedures?
They are explanations of code embedded in SAS programs. No, SAS ignores comments while running procedures.
How does one create a comment? (2 ways)
(1) Type between a * and a ;. (2) Type between /* and */.
Should we always use comments? Why/Why not?
Yes, they remind us of what codes mean and why we're using them.
Can statements start on any line? Can statements start in any column?
Yes. Yes.
Every statement/line of code must end in a...
semicolon
Is syntax case sensitive?
No
If your code does not work, you should check... (2). What is the most common error in programming?
If you forgot a semicolon, the log, forgetting a semicolon
(Most) recognized commands are displayed in _____ text. Comments are displayed in _____ text. If you did something wrong, you'll see ____ text.
blue, green, red
What is the code for inputting data using the editor window? Remember that with this code a semicolon goes...
data (give data name);
input (give variable names);
datalines
(give columns of data)
;
on the line immediately below the last observation
After running each analysis, remember to check the
Log
How do you run an analysis? (2) Be sure that you highlight... otherwise...
Press F3 or the running man. The code you want to run, you'll run all the codes in the editor.
How do you make sure your file was imported? (2) What is the code for the second option? What is the code to view contents and characteristics?
Go to explorer window, libraries, work. Or you want print it.

proc print (give data name);
run;

proc contents (give data name);
run;
What is the code to import txt. or dat. files using the infile command?
data (give data name);
infile '(give file string);
input (give variable names);
run;
How do you import data using the Import Data Wizard? What types of files does in work best with? What might it have trouble with? What should you also make sure of? Why?
click file, important data. Tab-deliminted, comma-delimited, and excel files. Space-delimited files. That the variables have names. Otherwise, the first numbers will be the variable names.
What is the easiest way to get descriptive statistics in SAS?
Use proc univariate.
What is the code to get descriptive statistics for a single variable using proc univariate?
proc univariate (give data name);
var (give variable names);
run;
The var command is used to specify
variable names
In SAS all procs are specified by..
proc (give proc name)
If you are working with one dataset, the data= (data name) is... however, SAS will always use your most recent... All the same, it is a good habit to...
optional, data set, include it in your procedures
What happens in proc univariate if you do not specify a variable?
It will give you information for all variables in the data set.
What is the code to create a histogram?
data (give data name);
var (give variable names);
histogram;
run;
For a histogram, what happens if you do not specify a binwidth? How do you determine the number of bins? What is the code to specify the number of bins?
SAS will try to guess the best one for you. (max-min)/bin width.

proc univariate data= (data name);
var (give variable names);
histogram / endpoints= (give min) to (give max) by (give bin width);
run;
Note that the bin width must be divisible by the...
range
For a histogram, what is the code to overlay a normal curve?
proc univariate data= (data name);
var (variable name);
histogram / normal endpoints= (min) to (max) by (bin width);
run;
What is the code to get basic box plots?
proc univariate data= (data name) plots;
var (variable name);
run;
Code to get a prettier box plot?
Step 1:
data (new data name);
set (old data name);
group= 1;
run;

Step 2:
proc print data= (new data name);
run;

Step 3:
proc boxplot data= (new data name);
plot (variable name)*group;
run;
Code to create a basic QQ plot?
proc univariate data = (data name) noprint;
var (variable name);
qqplot;
run;
What does noprint mean?
Stops it for outputting some excess data.
What is the code to put a normal distribution over the QQ plot?
proc univariate data = (data name) noprint;
var (variable name);
qqplot / normal (mu=est signma=est) square;
run;
For the QQ plots, the distance from the line represents the distance from... small variations are... look for...
normality, okay, large deviations from normality
the command normal (mu=est sigma=est) tells SAS to... can you plug in values, but most of the time... What does the square command do?
overlay the normal line on the mean (mu) and the estimated standard deviation (sigma), if you want, you'll just want to use the estimated values, changes the shape of the chart from a rectangle to a square.
What can you use to export your output into a more MS-Word friendly format? What is the ods? Are there different formats you can export to?
The output delivery system

ods pdf;
(code you want to export);
ods pdf close;

yes
Remember that all data sets are saved...
temporarily in the work folder.
What is the code to save something permanently?
libname (library name) (insert string of where you want the file to go);
data (library name).(new file name);
set (original dataset);
run;
If you want to gather more descriptive information about data than proc univariate, use
proc means
What is the code for proc means?
proc means data= (data name) n nmiss std mean median ix max;
run;
For proc means, if you don't specify a variable...
then it will give you information for each variable.
How can you use proc means to calculate % missing?
find number observations and the number of variables, multiply them together to get total cells, divide the number of missing values by the total cells