1 / 23

Regression diagnostics

Regression diagnostics. Hein Stigum Presentation, data and programs at: http://folk.uio.no/heins/Talks/. Jan-20. H.S. 1. Agenda. Linear regression diagnostics Assumtions Robust results (Logistic regression) (Poisson regression). 2 January 2020. H.S. 2. Linear regression.

frankjones
Download Presentation

Regression diagnostics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Regression diagnostics Hein Stigum Presentation, data and programs at: http://folk.uio.no/heins/Talks/ Jan-20 H.S. H.S. 1

  2. Agenda • Linear regression diagnostics • Assumtions • Robust results • (Logistic regression) • (Poisson regression) 2 January 2020 H.S. H.S. 2

  3. Linear regression Birth weight by gestational age 2 January 2020 H.S. H.S. 3

  4. Workflow • Scatterplots • Bivariate analysis • Regression • Model fitting • Cofactors in/out • Interactions • Test of assumptions • Independent errors • Linear effects • Constant error variance • Influence (robustness) 2 January 2020 H.S. H.S. 4

  5. Scatterplot 2 January 2020 H.S. H.S. 5

  6. Results Outcome: birthweight Covariates: gestational age, sex, parity Model: linear regression OBS: synthetic data H.S.

  7. Model diagnostics • Model • Assumptions • Independent errors (residuals) • Linear effects • Constant error variance • Robustness 2 January 2020 H.S. H.S. 7

  8. Checking assumptions H.S.

  9. 1. Independent residuals • No diagnostic tool • Possible violations • Pupils nested in schools: weak correlations • Repeated measurement: strong correlations • Models • Adjust for clustering • Linear mixed models • GEE H.S.

  10. 2. Linear effects • Save residuals and predicted values • Plot resid vs pred • If non-linear: • Plot resid vs cont. vars • Add square term • or cut in categories H.S.

  11. Significant means non-linearity Linear effect test Model 1: only linear terms Model 2: linear terms+square term H.S.

  12. 3. Constant residual variance • Plot resid vs pred • If non-constant variance: • Robust regression • Weighted regression H.S.

  13. Constant variance test Significant means non-const. var. H.S.

  14. Estimate residual variance Weights=1/variance Weighted regression Effects Takes care of heteroskedasticity “robustification” Weighted regression H.S.

  15. Summary of assumptions • Dependent residuals Mixed models: xtmixed • Non linear effects gen gest2=gest^2 regress weigth gest gest2 sex • Non-constant variance regress weigth gest sex, robust 2 January 2020 H.S. H.S. 15

  16. Checking robustness ,Measures of influence H.S.

  17. Measures of influence • Measure change in: • Predicted (y) • Deviance • Coefficients (beta) Remove obs 1, see change remove obs 2, see change 2 January 2020 H.S. H.S. 17

  18. Influence idea • Outlierness • Residuals • Leverage • Distance from x-mean • Influence • Combination H.S.

  19. Leverage versus residuals2 “Adjusted” scatterplot Added variable plot (partial regression leverage) H.S.

  20. Delta beta (for gestational age) H.S.

  21. Delta fitted value, Dfits H.S.

  22. Summary: Robustness, influence • Linear regression sensitive! • Look for influential points • Leverage versus residual plots • Added variable plots • Delta-beta • Rerun regression without influential points and look for change in: • coefficients • constant term • p-values H.S.

  23. Logistic, Poisson regression • Assumptions • Independent errors as before • Linear effects as before • Constant error variance no! • Robustness • Linear not robust! • Poisson medium robust • Logistic fairly robust H.S.

More Related