Final Review Guide
Bring to Final
Final Exam Format
- 20 to 30 multiple choice questions: half of the questions on SAS, the other
half of the questions on R. You are allowed to supply optional
work or reasons for your answers. If you choose the correct answer, I will not
look at your work or reason.
- Question topics will be taken from this review guide, the SAS and R
examples, the projects, and the lecture notes, especially the review questions at the
beginning of each lecture.
- The final exam will emphasize base programming in both SAS and R as shown in this document.
SAS Programming
- options, data step, numeric variables, character variables, input,
@, @@, datalines, firstobs, obs, infile,
dlm, dsd, list style, column
style, column pointer, column pointer positioning, contatenation operator (
|| ), informats, formats, file, put, _null_ SAS dataset,
handling missing values, scanover, missover, truncover, retain, sum variables, permanent datasets, if..else,
select, do, subsetting if, sum variables, retain, output, set, end variable, merge,
by, in variables, arrays, special SAS constant
suffixes (b, d, t, dt, x), variable sequences (e.g., x1-x9),
automatically created variables (_n_, _infile_, v.first, v.last), stop, abort, SAS Macro variables, SAS Macro functions.
SAS Proc SQL
- create table, delete, order by, select, summary functions (mean, n, sum), where
SAS Functions
- abs, ceil, floor, index, input, length, lengthn, lengthc, mean, scan, std, substr, today, var.
SAS Informats and Formats
- Informats: w.d,
COMMAw.d, PERCENT$w.,
DATEw., DDMMYYw.,
MMDDYYw.
- Formats: Same as informats.
SAS Procs
- freq, print, means, sort, sql.
- proc statements: var, by, where, class, output, noprint.
R Programming
- vector, basic datatypes (character, complex, logical, numeric), dataframe,
factor, function, if..else if, for, list, matrix, special values (Inf, NA, NaN, NULL)
R Operators
- <-, +, -, *, /, **, %%, %/%, ==, !=, <, <=, >, >=, &&, ||,
!, :, [ ], ( ), { }, ?
- See operator precedence table.
R Builtin Functions
- abs, aggregate, apply, attach, attributes, as.character, as.Date,
as.data.frame, as.list, as.logical, as.numeric, barplot, c,
cat, cbind, ceiling, chartr, class, cor, data.frame, getwd, else if,
exp, floor, function, help, hist, is.character, is.list, is.logical,
lapply, length, list, ls, matrix, mean, median, mode, nchar, order, paste, plot, print,
quantile, q, quit, rbind, read.csv, read.fwf, readLines, read.table, rep, rm,
S3 class (constructor, generic function, custom functions (print.Die,
plot.Die)), sd, scan, seq, setwd, sink, source, substr, Sys.Date, system.time, t, table,
tolower, toupper, ts, typeof
R Graphics Functions
- par(mfcol=, mfrow=)
- Parameters that apply to all graphics functions: main=, sub=, xlab=,
ylab=, col=
- barplot(height=, names.arg=, beside= )
- plot(x=, y=, pch=, col=, cex=, type= )
- hist(x=, breaks= )
R Functions for Normal Distribution
- pnorm, dnorm, qnorm, rnorm
- set.seed
- The Mersenne Twister is the most popular uniform number generator, the default in both SAS and R.
Be Able To
- Answer questions about source code and items in this review guide.
- Predict the output of source code.
- Find errors in source code.
- Find the correct source code for producing specified output.
- Choose source code that meets specifications.
- Understand how an S3 class works.
- Understand these builtin S3 classes: data.frame, Date, ts