This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike License. Your use of this material constitutes acceptance of that license and the conditions of use of materials on this site. Copyright 2006, The Johns Hopkins University and Karl W. Broman. All rights reserved. Use of these materials permitted only in accordance with license rights granted. Materials provided “AS IS”; no representations or warranties provided. User assumes all responsibility for use, and all liability related thereto, and must independently review all materials for accuracy and efficacy. May contain materials owned by others. User is responsible for obtaining permissions for use from third parties as needed. Example Growth of Hudson River striped bass; years 1965–1976. yt = incremental growth rate in year t x1t = population density in year t x2t = rise in temperature in year t x3t = a measure of river flow in year t Fit the model where ǫt ∼ iid Normal(0, σ 2) yt = β0 + β1x1t + β2x2t + β3x3t + ǫt Plot y vs each x 20 20 20 growth 25 growth 25 growth 25 15 15 15 10 10 10 0 5 10 15 density 20 25 30 0.15 0.20 0.25 0.30 0.35 temp.rise 0.40 0.45 0.50 −2 0 2 flow 4 Results Est SE t-value P value Intercept 17.00 3.22 5.3 0.001 density –0.37 0.11 –3.2 0.015 temp.rise 25.36 9.01 2.8 0.026 0.45 0.47 1.0 0.362 flow Diagnostics Assumptions Diagnostics ǫ’s independent Plot residuals vs time ǫ’s normally distributed QQ plot of residuals ǫ’s have constant SD Plot residuals vs fitted values y’s linear in each of the x’s Plot residuals vs each x No other x’s belong in the model Plot residuals vs other x’s residuals vs time 4 Residual 2 0 −2 −4 −6 2 4 6 8 10 Time index residual(t) vs residual(t+1) 4 residual(t+1) 2 0 −2 −4 corr = −0.09 −6 −6 −4 −2 0 residual(t) 2 4 Permutation test P−value = 78% −1.0 −0.5 0.0 0.5 1.0 correlation QQ plot of residuals 4 Sample Quantiles 2 0 −2 −4 −6 −1.5 −1.0 −0.5 0.0 Theoretical Quantiles 0.5 1.0 1.5 Residuals vs fitted values 4 2 Residuals 0 −2 −4 −6 10 15 20 25 Fitted values 4 4 2 2 2 0 0 0 Residual 4 Residual Residual Residuals vs x’s −2 −2 −2 −4 −4 −4 −6 −6 0 5 10 15 Density 20 25 30 −6 0.15 0.20 0.25 0.30 0.35 0.40 Rise in temperature 0.45 0.50 −2 0 2 River flow 4 A fake example 20 y 15 10 5 0 −5 15 20 25 30 x1 Intercept x1 Est -4.29 0.58 SE 4.97 0.25 t-val -0.86 2.36 P-val 0.40 0.03 Residuals vs another x 10 Residuals 5 0 −5 −10 35 40 45 50 x2 55 Regress y on both x’s Intercept x1 x2 Est 18.02 1.21 -0.77 SE 8.50 0.29 0.26 t-val 2.12 4.13 -3.00 P-val 0.0491 0.0007 0.0080 One last example Sediment ingestion by the mud snail, Hyrobia minuta. y = Amount ingested x = Time allowed to eat 800 y 600 400 200 10 20 30 40 50 x 60 70 80 A model Let’s consider the model where ǫt ∼ iid Normal(0, σ 2) yi = β0 + β1xi + β2x2i + β3x3i + ǫi 800 y 600 400 200 10 20 30 40 50 60 70 80 x Estimated coefficients Intercept time timeˆ2 timeˆ3 Est -339 75.7 -1.55 0.010 SE 127 15.4 0.48 0.004 t-val -2.66 4.91 -3.22 2.52 P-val 0.019 <0.001 0.006 0.024 Diagnostic plots QQ plot of residuals Residuals vs. time 200 200 150 150 150 100 100 100 50 50 50 0 Residuals 200 Residuals Residuals Residuals vs. Fitted 0 0 −50 −50 −50 −100 −100 −100 −150 −150 −150 200 400 600 Fitted values 800 −2 −1 0 Normal quantiles 1 2 10 20 30 40 x1 50 60 70 80