glm2 1 / 104
After Fitting Regressions
Paul E. Johnson1
2
1Department of Political Science 2Center for Research Methods and Data Analysis, University of Kansas
After Fitting Regressions Paul E. Johnson 1 2 1 Department of - - PowerPoint PPT Presentation
glm2 1 / 104 After Fitting Regressions Paul E. Johnson 1 2 1 Department of Political Science 2 Center for Research Methods and Data Analysis, University of Kansas 2012 glm2 2 / 104 After Fitting Regressions Paul E. Johnson 1 2 1 Department
glm2 1 / 104
2
1Department of Political Science 2Center for Research Methods and Data Analysis, University of Kansas
glm2 2 / 104
2
1Department of Political Science 2Center for Research Methods and Data Analysis, University of Kansas
glm2 3 / 104
glm2 4 / 104 Methods
glm2 5 / 104 Methods
glm2 6 / 104 Methods
glm2 7 / 104 Methods
glm2 8 / 104 Methods
glm2 9 / 104 Methods
glm2 10 / 104 Methods
glm2 11 / 104 Methods
glm2 12 / 104 Methods
glm2 13 / 104 Methods
glm2 14 / 104 Methods
glm2 15 / 104 Methods
glm2 16 / 104 Methods
glm2 17 / 104 Interrogate Models
glm2 18 / 104 Interrogate Models
glm2 19 / 104 Interrogate Models
glm2 20 / 104 Interrogate Models
glm2 21 / 104 Interrogate Models
glm2 22 / 104 Interrogate Models
1 that the“coef”function returns something different when it is applied
glm2 23 / 104 Interrogate Models
glm2 24 / 104 Interrogate Models
glm2 25 / 104 Interrogate Models
glm2 26 / 104 Interrogate Models
glm2 27 / 104 Interrogate Models
1 Fit 1 big model,“mod1” 2 Exclude some variables to create a smaller model,“mod2” 3 Run anova() to compare:
4 If resulting test statistic is far from 0, it means the big model really
glm2 28 / 104 Interrogate Models
glm2 29 / 104 Interrogate Models
1 Fit the“big model”(one with most variables)
2 Fit the“smaller Model”with the data extracted from the fit of the
3 After that, anova() will work
glm2 30 / 104 Interrogate Models
glm2 31 / 104 Interrogate Models
glm2 32 / 104 Interrogate Models
glm2 33 / 104 Interrogate Models
1 Make a New Variable for the New Coding
glm2 34 / 104 Interrogate Models
glm2 35 / 104 Interrogate Models
1 Fit a new regression model, replacing polviews with newpolv
2 Use anova() to test:
glm2 36 / 104 Interrogate Models
glm2 37 / 104 Interrogate Models
glm2 38 / 104 Interrogate Models
glm2 39 / 104 Interrogate Models
glm2 40 / 104 Interrogate Models
glm2 41 / 104 Interrogate Models
glm2 42 / 104 Interrogate Models
glm2 43 / 104 Interrogate Models
glm2 44 / 104 Interrogate Models
glm2 45 / 104 Interrogate Models
glm2 46 / 104 Interrogate Models
glm2 47 / 104 Interrogate Models
glm2 48 / 104 Interrogate Models
glm2 49 / 104 Interrogate Models
glm2 50 / 104 Interrogate Models
glm2 51 / 104 Interrogate Models
glm2 52 / 104 Interrogate Models
glm2 53 / 104 Interrogate Models
glm2 54 / 104 Interrogate Models
glm2 55 / 104 Interrogate Models
glm2 56 / 104 Interrogate Models
glm2 57 / 104 Interrogate Models
5 10 15 20 25 30 −200 200 Fitted values Residuals
418 362 800
−1 1 2 3 −3 −1 1 2 3 4 Theoretical Quantiles Standardized residuals
418 362 800
5 10 15 20 25 30 0.0 0.5 1.0 1.5 Fitted values Standardized residuals
418 362 800
0.000 0.004 0.008 0.012 −4 −2 2 4 Leverage Standardized residuals
800 473 362
−2 2 4 −3 −1 1 2 3 Predicted values Residuals
2126 2486 833
−2 −1 1 2 3 −3 −1 1 2 3 Theoretical Quantiles
Normal Q−Q
2126 2486 833
−2 2 4 0.0 0.5 1.0 1.5 Predicted values
2126 2486 833
0.000 0.005 0.010 0.015 −10 −5 5 Leverage
Residuals vs Leverage
2126 2486 13
glm2 60 / 104 Interrogate Models
glm2 61 / 104 Interrogate Models
glm2 62 / 104 Interrogate Models
glm2 63 / 104 Interrogate Models
glm2 64 / 104 Interrogate Models
glm2 65 / 104 Interrogate Models
glm2 66 / 104 Interrogate Models
glm2 67 / 104 Interrogate Models
glm2 68 / 104 Interrogate Models
glm2 69 / 104 Output
glm2 70 / 104 Output
glm2 72 / 104 Output
glm2 73 / 104 Output
glm2 76 / 104 Output
glm2 77 / 104 Output
glm2 78 / 104 Output
glm2 79 / 104 Output
glm2 80 / 104 Output
glm2 81 / 104 Output
glm2 82 / 104 Output
glm2 83 / 104 Output
glm2 84 / 104 Output
glm2 85 / 104 Output
glm2 86 / 104 Output
glm2 87 / 104 Output
glm2 88 / 104 Output
glm2 89 / 104 Output
glm2 90 / 104 Output
glm2 91 / 104 Output
glm2 92 / 104 Output
glm2 93 / 104 Output
glm2 94 / 104 Output
glm2 95 / 104 Output
glm2 96 / 104 Output
glm2 97 / 104 Output
glm2 98 / 104 Output
glm2 99 / 104 Output
glm2 100 / 104 Output
glm2 101 / 104 Output
glm2 102 / 104 Output