Air Pollution in Chicago
Group 4: Jiaying Li , Yiming Sun , Ciyao Zhan
Background
The data are from Peng and Welty (2004) and are contained in a data frame chicago. The
response of interest is the daily death rate in Chicago, death, over a number of years
Air Pollution in
Chicago
Presented by:
Ciyao Zhan
Yiming Sun
Jiaying Li
Agenda
Background
Data Manipulation
Model Fitting
Conclusion
Background
Background
The response of interest is the daily death rate in
Chicago over a number of years.
Possible e
# section 6.7.2 Cairo temperature data
# data from
# http:/www.engr.udayton.edu/weather/citylistWorld.htm
# data is in gammair
# here we model this as an generalized additive model (GAM or gam)
# gamair : library with gam
library(mgcv)
library(gamair)
li
Data Manipulation
We will first eliminate the term pm25median, for it only contains NA. Later, in addition to
the time variable, as shown in the plot below,days in a year may have a periodical effect on
the number of death. Thus, we construct another term
# see Wood SAec 4.1.2 p 149-
#cubic spline basis on (0,1)
# see also fig 3.3 p 124
# p 153 another recipe for cubic splines, B-splines
# k = number of knots ; m = 2 cubic splines with m + k + 1 = k+3 knots
# including the m + 1 arbirtary knots
# B_i^(-1)
Statistics 9924a : Advanced Regression
September 2013
Instructor Information
Instructor
Oce
Email
Phone
R Kulperger
WSC 231
[email protected]
519-661-3627 ; on campus 83627
Course Information
Course description
Prerequisites
Lecture Times
This course
# from S Wood
size<-c(1.42,1.58,1.78,1.99,1.99,1.99,2.13,2.13,2.13,
2.32,2.32,2.32,2.32,2.32,2.43,2.43,2.78,2.98,2.98)
wear<-c(4.0,4.2,2.5,2.6,2.8,2.4,3.2,2.4,2.6,4.8,2.9,
3.8,3.0,2.7,3.1,3.3,3.0,2.8,1.7)
x<-size-min(size);x<-x/max(x)
plot(x,wear,xlab="Sc
Statistics 9924a Assignment 1
Handout date: 24 September, 2014
Due date: two weeks from the handout date
Problems from the text.
1. Consider vectors in R3 . Consider vectors xT = (1, 2, 2) and y T = (1, 0, 0). Give
the Householder matrix, say H, that maps
1
Nonparametric Regression
Given data of the form (x1 , y1), (x2 , y2 ), . . . , (xn , yn ), we seek an estimate of the regression
function g(x) satisfying the model
y = g(x) +
where the noise term satises the usual conditions assumed for simple linear r
1
The University of Western Ontario
Department of Statistical and Actuarial Sciences
Statistical Sciences 9924B
Assignment 3 Solutions
1. (a) > x <- seq(-2,2)
> y <- c(-1,1,2,4,-2)
> z <- c(rep(0,4),1)
# this is the (x-1)+ term
> y.lm <- lm(y ~ x + z)
> s
Partial Solutions to Assignment 1
1. In question 1, the requirement is the least-squares estimate of the average
speed. Although the data seem to be set up for the model
t = d +
where is the reciprocal of speed, you need to note that the least-squares
es
The University of Western Ontario
Department of Statistical and Actuarial Sciences
SS 9924a Advanced Regression
Assignment 2 Solutions
1. page 56, # 7:
Since V (QT y) = 2 Ip , it follows that V (r) = 2 Inp , where r denotes the last n p
2
elements of the