Stat 431/831
ASSIGNMENT 2
Due: 12pm Noon Oct 31, 2014
Your assignment must be handed in before the due time in the drop boxes. Include all R code
and relevant output. Be sure to use the cover page pro
A3 Spring 2014, Stat 431
Instructor: Dr. Schonlau
Wednesday, July 2, 12:00 a.m. (noon), Box 14 Dropbox , 4th floor MC.
[Total marks 46]
Q1 [23 marks] Claims
In this exercise we will look at some data
STAT 431
ASSIGNMENT 3
DUE: MARCH 07, 2012
1. Suppose a sample of independent counts y1 , . . . , yn is available. Let f0 , f1 , . . . , fK denote the
observed frequencies of 0, 1, 2, . . . , K counts,
Overdispersion
Matthias Schonlau, Ph.D.
Overview
Epilepsy data
3 reasons for lack of fit
Negative binomial regression
Interpretation
LR test for alpha
Goodness of Fit
Joint test of significance
alp
Generalized Estimating Equations
(GEE)
Matthias Schonlau, Ph.D.
Clustering
In GLM we have always assumed observations
are independent
Examples of clusters include
patients within hospitals
students
Random Effects for binary
models
Matthias Schonlau, Ph.D.
Overview
Random effects (for binary outcomes)
Transition models
Example: Waterloo smoking study
GEE and alternatives
GEE models are semi-p
Odds ratios
Matthias Schonlau, Ph.D.
Overview
Odds ratios in 2 by 2 tables
Logit link and odds ratios
Prenatal Care (one x-variable)
Odds
p is a probability
odds = p / (1-p)
In casual English th
Likelihood for generalized linear
models
Matthias Schonlau, Ph.D.
Exponential family
Researchers used likelihood estimation for a
variety of regression models.
They then realized many could be rewri
Parameter Estimation for GLMs
Matthias Schonlau, Ph.D.
Overview
Iterative reweighted least squares (IRLS)
Mosaic Plots (not in course notes)
Optimization
The maximum likelihood estimator cannot
usu
Logistic regression
Matthias Schonlau, Ph.D.
Overview
Example
Inference (LR-test, Wald test)
Point Estimation
3
2.5
2
1.5
1
Number of Failures
Example
55
60
65
Temperature F
70
75
Is there are rela
Review for Stat431
Matthias Schonlau, Ph.D.
Linear regression
Linear regression model
yi xi ' ri
where
xi is a vector of covariates
is a vector of coefficients
ri is a residual
Linear regression
As
Odds ratios (2)
Matthias Schonlau, Ph.D.
Overview
Interpretation / odds ratios
multiple x variables
interaction
Confidence Intervals
Interpretation / odds ratios
more than 1 unit of x
Interpreta
Logistic regression
link functions
Matthias Schonlau, Ph.D.
Overview
Link functions
Binomial vs Bernoulli regression
Link functions
The expected probability (mean) is linked to a linear
predictor
Logistic regression
Contrasts
Matthias Schonlau, Ph.D.
Overview
Neuroblastoma interpretation
CIs for Contrasts
Alternative model specification
Neuroblastoma
Neuroblastoma Interpretation
What is t
Negative Binomial Regression
Matthias Schonlau, Ph.D.
Negative Binomial
Instead of an ad-hoc solution, we now
consider a parametric model that addresses
overdispersion for Poisson regression.
Negativ
Overdispersion
Matthias Schonlau, Ph.D.
Overview
Overdispersion
Ad Hoc method for Overdispersion
Overdispersion
In most Poisson regression applications the
variance is greater than would be predict
Odds ratios
Matthias Schonlau, Ph.D.
Overview
Odds ratios in 2 by 2 tables
Logit link and odds ratios
Prenatal Care (one x-variable)
Odds
p is a probability
odds = p / (1-p)
In casual English th
Likelihood for generalized linear
models
Matthias Schonlau, Ph.D.
Exponential family
Researchers used likelihood estimation for a
variety of regression models.
They then realized many could be rewri
Parameter Estimation for GLMs
Matthias Schonlau, Ph.D.
Overview
Iterative reweighted least squares (IRLS)
Mosaic Plots (not in course notes)
Optimization
The maximum likelihood estimator cannot
usu
Logistic regression
Matthias Schonlau, Ph.D.
Overview
Challenger Example
Inference (LR-test, Wald test)
Point Estimation
3
2.5
2
1.5
1
Number of Failures
Challenger Example
55
60
65
Temperature F
7
Odds ratios (2)
Matthias Schonlau, Ph.D.
Overview
Interpretation / odds ratios
multiple x variables
interaction
Confidence Intervals
Interpretation / odds ratios
more than 1 unit of x
Interpreta
Logistic regression
Contrasts
Matthias Schonlau, Ph.D.
Overview
Neuroblastoma interpretation
CIs for Contrasts
Alternative model specification
Neuroblastoma
Neuroblastoma Interpretation
What is t
Logistic regression
link functions
Matthias Schonlau, Ph.D.
Overview
Link functions
Binomial vs Bernoulli regression
Specialized software implementations
Link functions
The expected probability (
Contingency Tables
Matthias Schonlau, Ph.D.
Overview
Poisson regression /Loglinear models in the
suicide example
Model selection
Interpretation
Visualization (Mosaic plots)
Contrasts
Suicide
Dat
3-way contingency tables
Matthias Schonlau, Ph.D.
Overview
Mutual / Conditional / Joint independence
Goodness of fit
Example : Seatbelts
3-way tables
In a two way table we had two categorical
vari
TABLE A-1 Standard normal cumulative probabilities
Nntp- Tahle entrv is the area under the standard normal curve to the left of the indicated z-value, thus giving P(Z < z). 0.00 0.01 0.02
0.5793 0.5
STAT 431, Winter 2016
STAT 431/831: Generalized Linear Models and Their Applications
Tuesday & Thursday, 11:30-12:50, STC 0060
Professor
Cecilia Cotton
[email protected]