Multiple and Logistic Regression IV Dajiang Liu @PHS 525 Apr-21 st - - PowerPoint PPT Presentation

multiple and logistic regression iv
SMART_READER_LITE
LIVE PREVIEW

Multiple and Logistic Regression IV Dajiang Liu @PHS 525 Apr-21 st - - PowerPoint PPT Presentation

Multiple and Logistic Regression IV Dajiang Liu @PHS 525 Apr-21 st -2016 Review of Last Two Classes Linear regression model: Logistic regression model Deal with binary outcomes Why is multiple (simple) linear regression model


slide-1
SLIDE 1

Multiple and Logistic Regression IV

Dajiang Liu @PHS 525 Apr-21st-2016

slide-2
SLIDE 2

Review of Last Two Classes

  • Linear regression model:
  • Logistic regression model
  • Deal with binary outcomes
  • Why is multiple (simple) linear regression model inadequate?
  • What is the procedure of logistic regression model
  • What does the parameter estimate mean?
slide-3
SLIDE 3

Hands On Exercise

  • Perform logistic regression

analyses for population

  • Which predictors should be dropped
  • What happens if the predictors are dropped?
slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6

Exemplar Code

  • Load data:
  • dat=read.table('Ch 8 Exercise Data/possum.txt',header=T,sep='\t');
  • Analyze relations between response and predictors
  • res=glm(as.factor(dat$pop) ~ dat$sex + dat$headL + dat$skullW + dat$tailL +

dat$totalL,family='binomial')

  • summary(res)
  • Examine if the variables have outliers:
  • boxplot(dat$totalL)
slide-7
SLIDE 7

Checking Model Assumptions

  • Valid linear (logistic) regression analyses require valid model

assumptions

  • If assumptions violated, the results can be invalid
  • Model assumptions:
  • The residuals for models are nearly normal
  • Variability of the residuals are nearly constant;
  • The residuals are independent
  • Each predictor variables are linearly related to the responses
slide-8
SLIDE 8

Checking Model Assumptions

  • Important to validate model assumptions
  • But not too much because
slide-9
SLIDE 9

Diagnostic Plots

  • Normal probability plot
  • Absolute values of residuals against fitted value
  • Residuals in the order of data collection
  • Residuals against each predictor variable
slide-10
SLIDE 10

Normal Probability Plot

slide-11
SLIDE 11

Fitted Values v.s. Absolute Values of Residuals

slide-12
SLIDE 12

Plot Residuals in the Order of Data Collection

slide-13
SLIDE 13

Diagnostics for Logistic Regression

slide-14
SLIDE 14

Diagnostics for Logistic Regression

slide-15
SLIDE 15

Practical Exercise

  • Examine the four plots using the birth weight datasets