Pstat 127 Sec2.pdf - Section 2 Changwei Xu Section Outline I I I I AIC\/BIC for model selection Residual diagnostics Influential points Added-Variable

Pstat 127 Sec2.pdf - Section 2 Changwei Xu Section Outline...

This preview shows page 1 - 8 out of 19 pages.

Section 2 Changwei Xu 1/24/2018
Image of page 1
Section Outline I AIC/BIC for model selection I Residual diagnostics I Influential points I Added-Variable plot
Image of page 2
Image of page 3
Image of page 4
Nested model selection example model1 <- lm (gamble ~ income, data= teengamb) model2 <- lm (gamble ~ sex+income, data= teengamb) anova (model1,model2) ## Analysis of Variance Table ## ## Model 1: gamble ~ income ## Model 2: gamble ~ sex + income ## Res.Df RSS Df Sum of Sq F Pr(>F) ## 1 45 28009 ## 2 44 22781 1 5227.3 10.096 0.002717 ** ## --- ## Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1
Image of page 5
Model selection by AIC/BIC m_AIC <- c ( AIC (model1), AIC (model2), AIC (model3), AIC (full)) names (m_AIC) <- c ( model1 , model2 , model3 , full ) m_AIC ## model1 model2 model3 full ## 439.7158 432.0070 452.0245 433.5561 m_BIC <- c ( BIC (model1), BIC (model2), BIC (model3), BIC (full)) names (m_BIC) <- c ( model1 , model2 , model3 , full ) m_BIC ## model1 model2 model3 full ## 445.2663 439.4076 459.4251 444.6569
Image of page 6
Image of page 7
Image of page 8

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture