Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic...

58
Neil W. Polhemus, CTO, StatPoint Technologies, Inc. Regression Analysis Using Statgraphics Centurion Copyright 2011 by StatPoint Technologies, Inc. Web site: www.statgraphics.com

Transcript of Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic...

Page 1: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Neil W. Polhemus, CTO, StatPoint Technologies, Inc.

Regression Analysis Using

Statgraphics Centurion

Copyright 2011 by StatPoint Technologies, Inc.

Web site: www.statgraphics.com

Page 2: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Outline

Regression Models

Examples – Single X

Simple regression

Nonlinear models

Calibration

Comparison of regression lines

Examples – Multiple X

Regression model selection (stepwise, all possible)

Logistic regression

Poisson regression

2

Page 3: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Regression Model Setup

3

Dependent variable: Y

Independent variable(s): X1, X2, …, Xk

Error term: e

Model: Y = f (X1, X2, …, Xk) + e

Page 4: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Types of Regression Models (#1)

4

Procedure Dependent variable Independent variables

Simple Regression continuous 1 continuous

Polynomial Regression continuous 1 continuous

Box-Cox Transformations continuous 1 continuous

Calibration Models continuous 1 continuous

Comparison of Regression

Lines

continuous 1 continuous and 1

categorical

Page 5: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Types of Regression Models (#2)

5

Procedure Dependent variable Independent variables

Multiple Regression continuous 2+ continuous

Regression Model Selection continuous 2+ continuous

Nonlinear Regression continuous 1+ continuous

Ridge Regression continuous 2+ continuous

Partial Least Squares continuous 2+ continuous

General Linear Models 1+ continuous 2+ continuous or categorical

variables

Page 6: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Types of Regression Models (#3)

6

Procedure Dependent variable Independent variables

Logistic Regression proportions 1+ continuous or categorical

Probit Analysis proportions 1+ continuous or categorical

Poisson Regression counts 1+ continuous or categorical

Negative Binomial

Regression

counts 1+ continuous or categorical

Life Data - Parametric

Models

failure times 1+ continuous or categorical

Page 7: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Example 1: Stability study

7

Y: percent of available chlorine

X: number of weeks since production

Lower acceptable limit for Y: 0.40

Page 8: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

X-Y Scatterplot with Smooth

8

Page 9: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Simple Regression

9

Page 10: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Analysis Options

10

Page 11: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Tables and Graphs

11

Page 12: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Analysis Window

12

Page 13: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Analysis Summary

13

Page 14: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Lack-of-Fit Test

14

Page 15: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Comparison of Alternative Models

15

Page 16: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Fitted Reciprocal-X Model

16

Plot of Fitted Model

chlorine = 0.368053 + 1.02553/weeks

0 10 20 30 40 50

weeks

0.38

0.4

0.42

0.44

0.46

0.48

0.5

ch

lori

ne

Page 17: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Lower 95% Prediction Limit

17

Page 18: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Outlier Removal

18

Plot of Fitted Model

chlorine = 0.366628 + 1.02548/weeks

0 10 20 30 40 50

weeks

0.38

0.4

0.42

0.44

0.46

0.48

0.5

ch

lori

ne

Page 19: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Example 2: Nonlinear Regression

19

Draper and Smith in Applied Regression Analysis suggest fitting

a model of the form

Y = a + (0.49-a)exp[-b(x-8)]

Since the model is nonlinear in the parameters, it requires a

search procedure to find the best solution.

Page 20: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Data Input Dialog Box

20

Page 21: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Initial Parameter Estimates

21

Page 22: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Analysis Options

22

Page 23: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Plot of Fitted Model

23

Plot of Fitted Model

0 10 20 30 40 50

weeks

0.38

0.4

0.42

0.44

0.46

0.48

0.5

ch

lori

ne

chlorine = 0.390144+(0.49-0.390144)*exp(-0.101644*(weeks-8))

Page 24: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Example 3: Calibration

24

The general calibration problem is that

of determining the likely value of X

given an observed value of Y.

Typically: X = item characteristic, Y =

measured value

Step 1: Build a regression model using

samples with known values of X

(“golden samples”).

Step 2: For another sample with

unknown X, predict X from Y.

Page 25: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Data Input Dialog Box

25

Page 26: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Reverse Prediction

26

Page 27: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Plot of Fitted Model

27

Plot of Fitted Model

measured = -0.0896667 + 1.01433*known

0 2 4 6 8 10

known

0

2

4

6

8

10

12m

easu

red

5.85573 (5.59032,6.1215)

5.85

Page 28: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Example 4: Comparison of

Regression Lines

28

Y: amount of scrap produced

X: production line speed

Levels: line number

Page 29: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Data Input Dialog Box

29

Page 30: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Analysis Options

30

Page 31: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Plot of Fitted Model

31

Line1

2

Plot of Fitted Model

100 140 180 220 260 300 340

Speed

140

240

340

440

540

Sc

rap

Page 32: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Significance Tests

32

Page 33: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Parallel Slope Model

33

Page 34: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Example 5: Multiple Regression

34

Page 35: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Stepwise Regression

35

Page 36: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Analysis Options

36

Page 37: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Selected Variables

37

Page 38: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Residual Plot

38

Page 39: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

All Possible Regressions

39

Page 40: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Analysis Options

40

Page 41: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Best Adjusted R-Squared Models

41

Page 42: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Example 6: Logistic Regression

42

Response variable may be in the form of proportions or binary (0/1).

Page 43: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Logistic Model

43

)...(exp1

1)(

22110 kk XXXEventP

kk XXXEventP

EventP

...

)(1

)(log 22110

Let P(Event) be the probability an event occurs at specified values of

the independent variables X.

(1)

(2)

Page 44: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Data Input - Proportions

44

Page 45: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Analysis Options

45

Page 46: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Plot of Fitted Model

46

0 20 40 60 80 100

Load

Plot of Fitted Model

with 95.0% confidence limits

0

0.2

0.4

0.6

0.8

1

Fa

ilu

res

/Sp

ec

ime

ns

Page 47: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Statistical Results

47

Page 48: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Data Input - Binary

48

Page 49: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Analysis Options

49

Page 50: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Analysis Summary

50

Page 51: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Example 7: Poisson Regression

51

Response variable is a count.

Page 52: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Poisson Model

52

Values of the response variable are assumed to follow a Poisson

distribution:

kk XXX ...log 22110

The rate parameter is related to the predictor variables through a log-

linear link function:

!Y

eYp

Y

Page 53: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Data Input

53

Page 54: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Analysis Options

54

Page 55: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Statistical Results

55

Page 56: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

Plot of Fitted Model

56

Thickness=170.0Extraction=75.0Height=55.0

0 10 20 30 40

Years

Plot of Fitted Model

with 95.0% confidence limits

0

1

2

3

4

5In

juri

es

Page 57: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

References

Applied Logistic Regression (second edition) – Hosmer and

Lemeshow, Wiley, 2000.

Applied Regression Analysis (third edition) – Draper and

Smith, Wiley, 1998.

Applied Linear Statistical Models (fifth edition) – Kutner et

al., McGraw-Hill, 2004.

Classical and Modern Regression with Applications (second

edition) – Myers, Brookes-Cole, 1990.

57

Page 58: Regression Analysis Using Statgraphics Centurion Analysis Webinar.pdf · Applied Logistic Regression (second edition) –Hosmer and Lemeshow, Wiley, 2000. Applied Regression Analysis

More Information

Go to www.statgraphics.com

Or send e-mail to [email protected]

58