In Class Handouts can be found
here:
Creating Simple Graphics Using
SAS
statistical_graphics_lecture.doc
This handout gives examples of using SAS sgplot, sgpanel,
and sgscatter. It is not ready yet!!
sgraphics_basics_lecture.sas These are the SAS
commands that demonstrate how to make simple statistical graphics plots
using SAS 9.2. These commands will not work with SAS 9.1.
employee.sas7bdat This is the dataset used for the
examples of statistical graphics plots. Download this permanent SAS data
set, and save it in a folder named B510, which can be located on your
desktop, or in any other place on your computer.
Simple Descriptive Statistics Using
SAS
sas_descriptives_lecture_2009.doc
This document gives instructions on how to use SAS for
simple descriptive statistics and graphs. For more examples on this
topic, please see Chapter 5 in the course pack "Simple Descriptive
Statistics Using SAS".
descriptives_lecture.sas
This SAS command file accompanies the handout on descriptive
statistics.
MARFLT.DAT This raw data file is the first data set
used in the descriptive statistics handout.
MARCH.XLS This Excel file is read into SAS using
Proc Import in the descriptive statistics handout.
business.sas7bdat
This SAS data set data file is also used in the descriptive
statistics handout. Download the data set to a folder on your desktop and
set up a libname statement pointing to that folder before using this data
set.
Data Management Tasks Using
SAS
sas_data_management_lecture_2009.doc
This document gives instructions on how to use SAS for
basic data management tasks.
data_mgmt_lecture.sas
This SAS command file accompanies the handout on
data management using SAS.
MARCH.XLS This Excel file can also be used to
create the SAS data set, MARCH, using Proc Import commands. This is an
alternative way to get the MARCH data set used for the data management
lecture.
employee.sas7bdat This is a permanent SAS data set
used for the example on data management tasks. Download this file to
a folder called B510 on yourdesktop, or in any other place on your
computer. Be sure to submit a libname statement when you want to use this
data set.
t-tests Using SAS
sas_ttest_lecture_2009.doc
This document gives instructions on how to use SAS for
two-sample, paired-sample and one-sample t-tests.
ttest_lecture.sas
This SAS command file accompanies the handout on
t-tests using SAS.
OWEN.DAT This ASCII (raw data) file can be used
with the SAS commands to run the example on using t-tests in SAS.
Simple Linear Regression Models
Using SAS
simple_linear_regression_lecture_2009.doc
This document gives instructions on how to use SAS for a
simple linear regression, how to get basic plots, correlation, and carry
out a transformation. The ODS system for saving regression diagnostics
is also illustrated.
regression_lecture1.sas
This SAS command file accompanies the handout on
simple linear regression using SAS.
cars.sas7bdat This permanent SAS dataset can be used
with the SAS commands to run the example on fitting linear regression
models using SAS.
Dummy Variable Regression
and Oneway ANOVA Models Using SAS
dummy_var_regression_lecture_2009.doc
This document gives instructions on how to fit a linear
regression model using dummy variables using Proc Reg, and how to
fit a oneway ANOVA model using Proc GLM in SAS.
regression_lecture2.sas
This SAS command file accompanies the handout on
dummy variable regression and oneway ANOVA using SAS.
cars.sas7bdat This permanent SAS dataset can be used
with the SAS commands to run the example on fitting dummy variable
regression models and ANOVA models using SAS.
Multiple Linear Regression
and Checking for Collinearity Using SAS
sas_multiple_regression_lecture_2009.doc
This document gives information on how to create a correlation matrix, scatterplot
matrix, and fit a multiple linear regression model, and
how to check for collinearity.
regression_lecture3.sas
This SAS command file accompanies the handout on
multiple linear regression using SAS.
WERNER2.DAT This ascii file can be read into SAS to
create the WERNER data set.
baseball.sas7bdat This permanent SAS dataset can be
used with the handout on multiple linear regression models using SAS.
Oneway and Twoway ANOVA models using SAS
sas_anova_lecture_2009.doc
This handout gives information on how to fit a oneway and twoway
factorial ANOVA model using SAS Proc GLM.
anova_lecture.sas
This SAS command file accompanies the handout on
oneway and twoway ANOVA models using SAS.
WERNER2.DAT This ascii file can be read into SAS to
create the WERNER data set.
Oneway frequency tabulations and twoay cross-tabulations using SAS
sas_frequencies_lecture_2009.doc This handout gives
information on how to use SAS Proc Freq for simple oneway tabulations and
binomial tests for two-level categorical variables, goodness of fit tests
for categorical variables with more than two levels. It also discusses
cross-tabulations and chi-square tests of independence, Fisher's exact
test, the Cochran-Armitage test for trend, and the Mantel-Haenszel
chi-square test for a linear association between two ordinal categorical
variables.
frequencies_lecture.sas
This SAS command file accompanies the handout on
oneway frequency tabulations and twoway cross-tabulations using SAS.
WERNER2.DAT This ascii file can be read into SAS to
create the WERNER data set.
cars.sas7bdat This permanent SAS dataset can be used
with the SAS commands to run the examples for frequency tables and
cross-tabulations using SAS.
Odds Ratio and Relative Risk for a 2 by 2 table, and McNemar's test and
Cohen's Kappa for Matched Categorical Data
sas_frequencies_lecture2_2009.doc This handout
gives
information on how to use SAS Proc Freq to get an odds ratio and risk
ratio for a 2 by 2 table for independent data. It also illustrates using
SAS to get McNemar's test of symmetry and Cohen's kappa measure of
agreement for matched frequency data.
frequencies_lecture2.sas
This SAS command file accompanies the handout on
2 by 2 tables and matched frequency data using SAS.
WERNER2.DAT This ascii file can be read into SAS to
create the WERNER data set.
Logistic Regression Models Using SAS
sas_logistic_regression_2009.doc This
handout illustrates how to use Proc Logistic in SAS to fit a logistic
regression model, for binary, continous, and categorical predictors.
logistic_regression_lecture1.sas
This SAS command file accompanies the handout on logistic
regression using SAS.
brca.dat This ascii file can be read into SAS to
create the bcancer data set.
Fast Facts for SAS
Fast_Facts_for_SAS_9.2.doc This handout gives some
basic SAS information that is a useful summary of how to read data into
SAS from different data sources, some of the rules of SAS syntax, and
some SAS procedures to use for different analytic tasks.
Missing Values in SPSS
missing_values_in_SPSS.doc This document explains
how SPSS handles missing value codes.
Descriptive Statistics and t-tests using SPSS
spss_descriptives_ttest.doc This document illustrates how to use SPSS to
read in raw data, and to create simple plots, and carry out independent
samples t-tests and paired samples t-tests.
descriptives_ttest.sps This SPSS command file goes
along with the handout on descriptive statistics and t-tests using SPSS.
WERNER2.DAT This ascii file contains the raw data to be used to create
the Werner dataset that is used in the SPSS descriptives and t-test
Simple Linear Regression, Dummy Variable Regression, and Oneway ANOVA
using SPSS
spss_simple_reg_2009.doc This document illustrates
how to use SPSS to fit a simple linear regression model, create dummy
variables, fit a linear regression model using dummy variables, and fit a
oneway ANOVA model and obtain post-hoc tests.
linear_regression.sps This SPSS command file goes
along with the handout on simple linear regression using SPSS.
werner.sav
This SPSS dataset contains the Werner Birth Control Pill data for the
handout on simple linear regression. You can download it by
single-clicking and saving it on your desktop or in another location. It
is already in SPSS format, so you don't need to do anything other than
open it directly into SPSS.
Oneway Frequencies and Two-way Cross-tabulations using SPSS
spss_frequencies_lecture_2009.doc This
document illustrates
how to use SPSS to get a binomial test for a proportion in a oneway
frequency table, get a chi-square goodness of fit test for a one-way
frequency table, get a Pearson chi-square test of independence for a
two-way table, get an odds ratio and risk ratio for a 2x2 table, and get
McNemar's test and Cohen's Kappa for matched frequency data.
frequencies_2009.sps This SPSS command file goes
along with the handout on one-way and two-way cross-tabulations.
werner.sav
matched.sav
graders.sav
skincondition.sav
Logistic Regression Models using SPSS
spss_logistic_regression_2009.doc This
document illustrates
how to use SPSS to read in a raw data file, work with dates in SPSS,
recode continuous variables into categories, and fit logistic regression
models with continuous and categorical predictors.
logistic_regression.sps This SPSS command file goes
along with the handout on logistic regression.
brca.dat This raw data file goes
along with the handout on logistic regression.
Poisson/Negative Binomial Regression Models using SAS
sas_poisson_regression.doc This
document illustrates how to use SAS to fit a Poisson regression model
with an offset, an overdispersed Poisson regression model, and a negative
binomial model
poisson_regression.sas This SAS command file goes
along with the handout on poisson regression.
appletree.sas7bdat This SAS dataset, kindly
provided by
Apple Tree Dental
, goes along with the handout on poisson regression.
Writing out data using SAS
writing_out_data_using_sas.doc This
handout gives instructions on how to write out raw data using SAS.
write_data.sas This SAS command file goes
along with the handout on writing out data.
iris.sas7bdat This SAS dataset goes along with the
handout on writing out data using SAS.
Poisson Regression/Negative Binomial Regression Models Using SPSS
spss_poisson_regression.doc This
handout gives information on how to fit Poisson regression,
over-dispersed Poisson regression, and negative
binomial regression models using SPSS.
poisson_regression_lecture.sps This SPSS command
file goes
along with the handout on Poisson regression models using SPSS.
appletree.sas7bdat This SAS dataset goes along with
the handout on fitting Poisson regression models using SPSS.
ANCOVA Models Using SAS
sas_ancova_2009.doc This
handout gives information on how to fit ANCOVA models using Proc Reg and
Proc GLM in SAS.
ancova_2009.sas This SAS command
file goes along with the handout on ANCOVA models using SAS.
htwt.sav This SPSS dataset goes along with
the handout on fitting ANCOVA models using SAS.