Exam 1 Flashcards
What does $ in an input statement mean
categorical variable
what does “cards” mean
have to use this or datalines (datalines is used in the infile statement) when using list input to read internal raw data; tells sas to receive data values
what does dlm in the infile statement do
tells sas the delimiter for the data
what does NOOBS in proc print do
clears the observation # column in the output
infile statement
tells sas where it will be reading your data from
what does obs do in proc print ex- (obs=20)
tells sas to print the first 20 observations
proc print data=x (firstobs=11 obs=20)
prints 11th=20th observations
what does firstobs do in the infile statement
starts reading data from the second row of your datafile (use if the first row of the file is just variable names)
what does using var statement in proc print do
will only print your selected variables
what does varnum in proc contents do
puts the variables in creation order, rather than in the default alphabetical order; can make finding the variable easier
proc sgplot data=;
histogram salary /showbins binwidth=5000;
run;
creates a histogram with salary on the x-axis, markings at the mid point of each bin
bin width specifices the binwidth, sas will determine the number of bins unless you use the nbins options
proc sgplot data=
scatter x= y=
/group=gender
run
creates a scatter plot with x and y variables on their respective axes, group the data by the gender variable
vbar
similar to a histogram. options can be explored in 8.2
dsd
- ignores delimiters enclosed in quote marks
- treats 2 delimiters in a row as a missing value
- does not read quote marks as part of the data
- assumes the dlm is a comma
- prudent to use missover in case there is missing dat at the end of the dataline
missover
tells sas that if it runs out of data, don’t go to the next line, assign missing values to any remaining variables in that dataline
truncover
need this when reading in data in column or formatted input and some datalines are shorter than others
-tells sas to read data for the variable until the end of the dataline or the last column specified in the format or column range (whichever comes first)
differences between missover and truncover
both will assign missing values if the dataline ends before the variable’s field starts
-but when the dataline ends in the middle of a variable field, truncover will take as much as there is, whereas missover will assign a missing value to the variable
dlm=’09’x.
specifies that it is a tab delimited file
what does sum in proc print do
will print the sum of the variable specified