SLIDE 15 R Graphics
Example: Explanation of Nearest-Neighbor Kernel Regression
10000 30000 40 50 60 70 80
(a) Observations Within the Window span = 0.5
GDP per Capita Female Expectation of Life
10000 30000 0.0 0.2 0.4 0.6 0.8 1.0
(b) Tricube Weights
GDP per Capita Tricube Kernel Weight
30000 40 50 60 70 80
(c) Weighted Average (Kernal Estimate)
GDP per Capita Female Expectation of Life
30000 40 50 60 70 80
(d) Complete Kernel Estimate
GDP per Capita Female Expectation of Life
John Fox (McMaster University) Introduction to R ICPSR 2010 29 / 34
R Graphics
Example: Trellis Display
Catholic Schools
SES Math Achievement
5 10 15 20 25 −4 −2 2
−4 −2 2
−4 −2 2
- ●
- ●
- 3013
- ●
- ●
- 9550
- ●
- ●
- 4931
- 3881
- ●
- ●
- ●
- 5838
5 10 15 20 25
5 10 15 20 25
- 1906
- ●
- 8175
- ●
- 8874
- 9225
- 2768
- 2526
−4 −2 2
−4 −2 2
5 10 15 20 25
John Fox (McMaster University) Introduction to R ICPSR 2010 30 / 34