Homework 1
P8120 Spring 2016
Due: Monday, February 1st, 2016 at 5:30pm.
HW has to be TYPED, with your name and UNI written on top, and STAPLED.
Problems must be ordered, starting with Problem #1.
Any question must be answered with a full and mea

Homework 4 (Total: 102 points)
P8120 Spring 2016
Due: Monday, March 7th, 2016 at 5:30pm.
HW has to be TYPED, with your name and UNI written on top, and STAPLED.
Problems must be ordered, starting with Problem #1.
Any question must be answered wi

P8120 Analysis of Categorical Data
Lecture 12: LR, Multiple Predictors & Estimation
March 20th, 2017
Objectives
Interpret logistic regression models with multiple predictors
Use SAS to fit logistic regression models and interpret the coefficients from t

P8120 Analysis of Categorical Data
Lecture 10: Review of Linear Regression; Intro to Logistic Regression
March 2nd, 2017
Objectives
Understand the advantages of using logistic regression
Review linear regression models
Understand the rationale for the

P8120: L11 Practice
Spring 2017
Lecture 11: Practice Problems
Agresti Reading: 4.3, 4.4
Agresti Problems: None
1. A clinical trial of gamma globulin in the treatment of children with Kawasaki syndrome
randomized approximately half of the patie

P8120: L14 Practice
Spring 2017
Lecture 14: Practice Problems
Agresti Reading: 4.4.4
Agresti Problems: None
1. In the early 1990s studies were conducted to determine the effects of AZT in slowing the
development of AIDS symptoms. In one study,

P8120: L10 Practice
Spring 2017
Lecture 10: Practice Problems
Agresti Reading: 3.1, 3.2, 4.1
Agresti Problems: None
1. Explain what the response variable is in a logistic regression and why we use logistic regression
to model these types of r

Practice Problems for Midterm (Analysis of Categorical Data) 2015
SAS outputs will be provided for midterm. You will need to read SAS output to answer some of the
questions.
With brief solution
1. A water company is studying water additives and investigat

Homework #6 Solution
P8120/Shuang Wang
1.
Read in data:
data arth;
infile "C:\arthritis.txt";
input id gender $ treat improve;
run;
1) Create a new binary response variable called IMPROVE_2, which takes on the values 1 for
some improvement or marked impro

Homework #5 Solution
P8120/Shuang Wang
Read in data:
data hw5;
infile "C:\lowbwt2.dat";
input ID low smoke age visits;
run;
1. Create a new categorical variable called AGEGROUP, which takes on the values 1 if
age 14-20; 2 if age 21-28; 3 if age 29-45. Tes

Homework #1 Solution
1. (15 pts)
(1)
P8120/Shuang Wang
Let:
A = event that SHE has flu
B = event that HE has flu
If events A and B were independent, then the following statement would hold: P(AB) = P(A) P(B).
Given: P(she has flu) = 0.10
P(he has flu) = 0

1. (40 pts)
CAD+
CADTotal
Age 50
11
67
78
Age 51-60
19
55
74
Age 61
23
32
55
Total
53
154
207
(1). Given: Data from a cross-sectional study of CAD. Patients represent a sample of the population of subjects
referred for stress tests.
Compute: OR's of CAD f

Homework #2 Solution
P8120/Shuang Wang
1. (25 pts)
Embolism
No embolism
Total
(1)
Treatment
Surgical
Medical
3
8
81
87
84
95
11
168
179
Lets estimate and get a 95% CI for the risk differences.
8
3
= 0.0357 0.0842 = 0.0485
RD ( surg : med ) =
84 95
n n
n n

P8120: L13 Practice
Spring 2017
Lecture 13: Practice Problems
Agresti Reading: 4.2
Agresti Problems: None
1. A marketing research firm was asked by an automobile manufacturer to conduct a pilot
study to examine the feasibility of using logisti

P8120 Analysis of Categorical Data
Lecture 11: Interpreting Logistic Regression Parameters
March 6th, 2017
Objectives
Interpret logistic regression models with a binary predictor
Interpret logistic regression models with a categorical predictor
Interpr

Homework 1
P8120 Spring 2017
Due: Monday, January 30th at 5:30pm.
You may handwrite Homework 1 (THIS WILL BE THE EXCEPTION, NOT THE RULE); be sure your
writing is legible!
Make sure you include your name and UNI written on top, and STAPLED.
Problems mu

NAME:
UNI:
Homework 7
P8120 Spring 2017
Due: Thursday, April 20th, 2017 at 5:30pm.
All homework MUST BE submitted electronically via CourseWorks in PDF format!
Use file name: LastName_FirstName_UNI_HW6
HW has to be TYPED, with your name and UNI written

ods rtf file='HW7(2).rtf';
data lameness;
input yield$lame$age$count;
cards;
High yes young 43
High yes old 25
High no young 130
High no old 286
Low yes young 26
Low yes old 14
Low no young 277
Low no old 287
;
run;
proc freq data = lameness order = data;

P8120 Categorical Homework 6
Alan Wu, aw3013
April 3, 2017
1. The most common cause of death from diarrhea in children under age 5 is rotavirus. A recent New England
Journal of Medicine article (3/23/17; DOI: 10.1056/NEJMoa1609462) reported results from a

Grant Conway, UNI: gc2675
Professor Mauro
Homework #6
3 April 2017
Problem #1:
For this problem, the following are the given events:
Developed Rotavirus
Did not Develop Rotavirus
Total
Receives Vaccine
31
1,749
1,780
No Vaccine
87
1,641
1,728
Total
118
3,

The SAS System
The LOGISTIC Procedure
Model Information
Data Set
WORK.TRIAL
Response Variable (Events) events
Response Variable (Trials)
trials
Model
binary logit
Optimization Technique
Fisher's scoring
Number of Observations Read
2
Number of Observations

PART 1: INTERPRETING LOGISTIC REGRESSION MODELS
Logistic regression allows us to construct a model that describes the
association between the outcome and the exposure of interest when that
exposure is discrete or continuous. It is useful when we want t

P8120 Analysis of Categorical Data
Lecture 13: CIs and Hypothesis Testing
March 23rd, 2017
Objectives
Construct and interpret confidence intervals for parameters in a logistic regression model
Understand Wald and Likelihood Ratio Tests for association for

P8120 Analysis of Categorical Data
Lecture 14: Assessing Confounding and Interaction
March 27th, 2017
Objectives
Assess confounding and interaction with logistic regression models
Practice Problems: Posted.
_
In doing any type of analysis of association

P8120: L12 Practice
Spring 2017
Lecture 12: Practice Problems
Agresti Reading: 4.3, 4.4
Agresti Problems: None
1. (Continued from last time) A clinical trial of gamma globulin in the treatment of children
with Kawasaki syndrome randomized appr

P8120
Homework #4
Due 11/17/15
1. (40 pts) To evaluate the effect of passive smoking on lung cancer, researchers complied the results of studies from
3 different counties. The findings are given in the table below:
Japan
Great Britain
United States
Spouse

P8120
Homework #6
Due 12/08/15
1. (50pts) A study was conducted to identify treatment effect for arthritis pain relief. Fifty-four male and
female subjects received either an active treatment or a placebo treatment for their arthritis pain, the
subsequent

P8120
Homework #1
Due 09/27/16
1. (15 pts) Consider elderly couples living in a city when a flu epidemic strikes. In 10% of couples, the
wife has the flu. In 10% of couples, the husband has the flu. And in 2% of couples, both partners have the
flu.
(1) Ar

Analysis of Categorical Data
(P8120)
Lecture 4
(10/04/16)
(Instructor: Shuang Wang)
Lecture 4/P8120
1
Review Last Lecture
Measures of Association for 2x2 Contingency
Tables
Point Estimate and CI
Different types: RD, RR, OR
General formula
()
a 100(1

Homework #1 Solution
1. (15 pts)
(1)
P8120/Shuang Wang
Let:
A = event that SHE has flu
B = event that HE has flu
If events A and B were independent, then the following statement would hold: P(AB) = P(A) P(B).
Given: P(she has flu) = 0.10
P(he has flu) = 0