The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850B
Assignment 3 Solutions
1. There are a number of ways of making these comparisons, but use of Kendalls tau is preferred.
R1
R1
R2
R3
R4
R2
R3
R4
1
Odds and Ends
Outline
1. INPUT details
2. SAS macro variables and macros
1
INPUT codes
SAS uses a lot of special codes in INPUT statements to
control reading. Weve seen most of these.
Previous variable is a character variable.
INPUT NAME $;
n or m n Colum
Ch9 Regression Part B
Outline
1. Variable selection methods (contd)
2. Partial regression residual plots
3. Logistic Regression
This covers textbook sections 9DEF+.
1
More on Variable Selection
When selecting explanatory variables for a regression
model,
Introduction: Objectives and a Brief Overview
Course Objectives:
to appreciate the assumptions behind statistical models.
to read and write SAS programs.
to interpret the output from a SAS program.
1
Objectives
Main Reason for Learning SAS: Data Analys
Lecture 2 - Describing Data
1. Summary Statistics - PROC MEANS
2. More Statistics and Plots - PROC UNIVARIATE
3. PROC CHART and PROC GCHART
4. PROC SORT
5. PROC PLOT and GPLOT
This covers text sections: 2.A-H. You should also read
section 19I.
1
Populatio
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850B
Tutorial Assignment 1
QUESTIONS:
1. The following data set provides the mass (in kg) and radius (in km) of all planets in the Solar
System:
Mercu
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850B
Tutorial Assignment 2
QUESTIONS:
1. Write and execute a SAS program which generates 1000 uniform pseudorandom numbers in a
SAS dataset called UNI
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850G
Tutorial Assignment 10
The number of deaths from leukemia and other cancers among survivors of the Hiroshima atom
bomb are given below (Otake, 19
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850B
Tutorial Assignment 6
QUESTIONS:
I recommended in class that you use the Satterthwaite approximation to t-tests rather than
pooling variances. In
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850G
Tutorial Assignment 9
1. The le dolphins.txt contains measurements of heart size and weight for a sample of 2
dierent species of dolphins.
(a) Us
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850G
Tutorial Assignment 8
1. Consider the science.txt dataset from the lecture. Add xed eects for School and a Sex by
FundingSource interaction to th
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850B
Tutorial Assignment 7
1. 12 patients complaining of headaches were randomly assigned to 3 groups for the purpose of
testing a new pain medication
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850B
Tutorial Assignment 3
QUESTIONS:
The le scantron.dat on OWL contains recorded information from Scantron sheets on a large
exam. The data is store
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850B
Tutorial Assignment 5
QUESTIONS:
One of the basic assumptions of stock market modelling is that the change on one day does not
predict the change
Chapter 6: Comparing Two Groups, Report Writing
1. T-tests
2. Nonparametric tests
3. Reporting numeric results
4. Tables
1
PROC TTEST
PROC TTEST can be used to conduct a test for
dierences between the means of two populations.
Assumptions:
two independ
Outline
1. More DATA step details RETAIN and ARRAY
2. Handling Dates
3. Longitudinal Data
4. Writing Reports
1
More on the DATA step
2
The RETAIN statement
In a DATA step, SAS normally blanks out variables with
each new observation. The RETAIN statement c
1
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850B
Quiz 1 Solutions
Date: January 25, 2012
1. Suppose a le called DEMO.TXT contains the following 900 lines:
100
101
102
103
104
.
999
F
M
F
M
F
7
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850B
Assignment 4
1. The GLM procedure in SAS was used to analyze the noise.txt data. This was used because
it is more convenient for computing contra
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850B
Assignment 2 Solutions
1. The yield of tomatoes (kg/plot) for four dierent salinity levels (measured in terms of electrical
conductivity EC) are
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850B
Assignment 4 Solution
1. Analyze the calorie content data in oj.txt as a mixed eects model.
(a) Which factor is xed? (1 mark)
Brand, since there
1
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850B
Quiz 2
Date: February 1, 2012
Answer the following questions in the space provided. Use the back of the page if necessary.
1. (7 marks) Suppose
STAT 3850g Winter 2014
Assignment 3
Due: February 26 in class
In this assignment youll work with the simulations from tutorial 6. Write
a short report that addresses the following questions:
1. Using the notation from the tutorial assignment, keep m xed a
STAT 3850g Winter 2014
Final Project
Due: April 8
Your nal project is to write the report that you proposed in Assignment 4, with the
following changes:
You should make any changes that I requested when I graded Assignment 4. I will
return these in class
Ch.9 REGRESSION
Outline
1. Multiple Regression - Designed Regression
2. Nonexperimental Regression
3. Variable Selection Methods
This lecture covers text sections 9A-D.
1
Multiple Regression - Designed Regression
Designed experiments:
Set the predictor va
STAT 3850g Winter 2014
Assignment 1
Due: January 22 in class
Write a SAS program to do all three steps of tutorial assignment 2. Set
the initial seed of the random number generator to your student id number.
Run your program, and print the log and output.
1
UNOFFICIAL COURSE OUTLINE
Jan-Apr 2014
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850: Data Analysis
Course Description A course in applied statistical computing using popular statistical software such as R or SAS. The primar
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 3850 Data Analysis
Final Examination
Duration: 3.0 hours
Date: April 15, 1878
There are 16 questions.
Write down all SAS commands used, and answer al