선형통계모형
DESCRIPTION
선형통계모형. 아주대학교 산업공학과 대학원. Scatter Plot Matrix. Diagnostics & Remedial Measures. Correlation Matrix. 삼두박근 넓적다리 상완 넓적다리 0.924 0.000 상완 0.458 0.085 0.042 0.723 체지방 0.843 0.878 0.142 0.000 0.000 0.549 셀 내용 : Pearson 상관 계수. - PowerPoint PPT PresentationTRANSCRIPT
선형통계모형아주대학교 산업공학과 대학원
Diagnostics & Remedial Measures
Scatter Plot Matrix
Diagnostics & Remedial Measures
Correlation Matrix 삼두박근 넓적다리 상완넓적다리 0.924 0.000
상완 0.458 0.085 0.042 0.723
체지방 0.843 0.878 0.142 0.000 0.000 0.549
셀 내용 : Pearson 상관 계수
Diagnostics & Remedial Measures
Three Dimensional Scatter Plot
Diagnostics & Remedial Measures
Residual PlotNormality Test for ResidualsConstancy of Error VarianceLack of Fit test
111100 )(: pp XXYEH
Extra Sum of SquaresMultiple Regression 에서 적합함 모델 수립적은 수의 독립변수로 이루어진 모델Extra Sum of Squares
),()(
)(),()|(
211
22112
XXSSEXSSE
XSSRXXSSRXXSSR
),,(),(),|( 32121213 XXXSSEXXSSEXXXSSR SSTO
SSR(X2) SSE(X2)
SSR(X1|X2) SSE(X1,X2)
Extra Sum of SquaresDecomposition of SSR
)()( 11 XSSEXSSRSSTO
)|()(),( 12121 XXSSRXSSRXXSSR
),()|()( 21121 XXSSEXXSSRXSSRSSTO
Extra Sum of Squares Tests for Regression Coefficients
1. t-test
2. F-test 예 )
0:0 kH
3322110 XXXY
}{0k
k
bs
bt
0: 30 H
Full Model 의 SSE
),,()( 321 XXXSSEFSSE
Reduced Model 의 SSE ),()( 21 XXSSERSSE
검정통계량 ),,(
),|(
/)(
)/())()((
321
2130 XXXMSE
XXXMSR
dfFSSE
dfdfFSSERSSEF
F
FR
Extra Sum of Squares Tests for Regression Coefficients
0: 320 H
Full Model 의 SSE
),,()( 321 XXXSSEFSSE
Reduced Model 의 SSE )()( 1XSSERSSE
검정통계량
)4/(),,(
2/)|,(
/)(
)/())()((
321
1320
nXXXSSE
XXXSSR
dfFSSE
dfdfFSSERSSEF
F
FR
),,(
)|,(
321
132
XXXMSE
XXXMSR
Standard Error : 계수의 표준편차
예측 변수 계수 SE 계수 T P상수 0.375 4.740 0.08 0.940crew 5.3750 0.6638 8.10 0.000bonus 9.250 1.328 6.97 0.001
T=5.375/0.6638
Coefficient of Partial Determination
Coefficient of partial determination of Y and X1 when X2 is already in the model
)(
)|(
)(
),()(
2
21
2
21222|1 XSSE
XXSSR
XSSE
XXSSEXSSERY
cf. conditional probability
)(
)(}|{
An
BAnABP
SSTO
SSR(X2) SSE(X2)
SSR(X1|X2) SSE(X1,X2)
Standardized Regression Non-standardized model 의 경우1) round-off error2) Lack of comparability of regression coefficients
Standardization
Correlation Transformation
Y
i
s
YY
k
kik
s
XX
Y
ii s
YY
nY
1
1*
k
kikik s
XX
nX
1
1*
Correlation Transformation Model
**1,
*1
*1
*1
*ipipii XXY
*k
k
Yk s
s
11/)(
)1
()(21
2112
1
112*1
s
nXX
ns
XXX iii
11110 pp XXY
• properties
122/1222
211
2211*2
*1
)()(
))((r
XXXX
XXXXXX
ii
iiii
XXT rXX XY
T rYX
Correlation Transformation Normal Equations
XY*
XX rbr XY
1XX
* rrb
standardized regression coefficients
상관계수매트릭스 들의:xXXr
Multicollinearity Uncorrelated predictor variables case : 생산성 문제에서
Body Fat 문제
)( 1XSSR
)|( 21 XXSSR
)( 2XSSR
)|( 12 XXSSR
Polynomial Regression Polynomial regression 은 multiple linear regression 의 특수한 case
로 간주할 수 있다 . 그러나 4 차식 이상에서는 multicollinearity 발생 가능성아 높다 . orthogonal polynomial
2 predictor variables-second order
Interaction Effect( 교작용 )
예 )
X2 = 3 인 경우 E(Y) = 25 + 3.5X1 X2 = 1 인 경우 E(Y) = 15 + 2.5X1
21122222
211122110)( XXXXXXYE
2121 5.05210)( XXXXYE
Qualitative Predictors 사례 : study of innovation in the insurance industry Y : innovation period X1 : size of firm X2 : type of firm = 1 for stock company = 0 for mutual company
model : 22110 XXY
Y
X1
1120 )()( XYE
110)( XYE
Stock company
mutual company
2
Q) 각 기업형태별로 각각 regression 하는 것보다 유리한 점은 ?
동일한 에러일 경우 가능하면 각각 하는 것보다합쳐서 하면 DF( 자유도 ) 가 낮아져서 에러율이 적다
Qualitative Predictors 사례 : study of innovation in the insurance industry
model : 21322110 XXXXY
Y
X1
13120 )()()( XYE
110)( XYE
Stock company
mutual company
2
Qualitative Predictors More than 2 classes 사례 ) tool wear 를 tool speed 와 tool type 에 따라 회귀분석 만일 tool type 이 (M1,M2, M3, M4) 로 4 가지 type 이 있다면
Y : tool wear X1 : tool speed X2 = 1 if M1 0 o/w X3 = 1 if M2 0 o/w X4 = 1 if M3 0 o/w
443322110 XXXXY
Qualitative Predictors 앞의 경우를 Y : tool wear X1 : tool speed X2 = 0 if M1 1 if M2 2 if M3 3 if M4 로 하여 모델을
로 하는 것은 곤란함 . 왜냐하면 이 경우
22110 XXY
2222222 )2|()3|()1|()2|()0|()1|( XYEXYEXYEXYEXYEXYE
Comparison of Two or More Regression Functions 사례 : 비누생산라인 (p 330)
산점도 : ‘ 회귀선및그룹표시’에서X=scrap ,Y=line speed 이고 범주형에 line 을 선택한다
회귀분석에서 저장에 가서 ‘잔차’를 선택한다 .
Regression model Y : amount of scrap X1 : line speed X2 = 1 if line 1 0 if line 2
21322110 XXXXY
Comparison of Two or More Regression Functions
계산기에 가서 저장할 장소를 지정하고 , 식을 'line speed'*'line‘ 이렇게 작성하고 확인
회귀분석에서 새로 생긴 변수를 포함하여 변수를 지정하고 저장의 잔차를 체크 해제
예측 변수 계수 SE 계수 T P상수 7.57 20.87 0.36 0.720line speed 1.32205 0.09262 14.27 0.000line 90.39 28.35 3.19 0.004X1X2 -0.1767 0.1288 -1.37 0.184
S = 20.7512 R- 제곱 = 94.5% R- 제곱 ( 수정 ) = 93.7%
분산 분석
출처 DF SS MS F P회귀 3 169165 56388 130.95 0.000잔차 오차 23 9904 431전체 26 179069
출처 DF Seq SSline speed 1 149661line 1 18694X1X2 1 810
Ho : b2=b3=0 H1:not H0
회귀 방정식은scrap = 7.6 + 1.32 line speed + 90.4 line - 0.177 X1X2
예측 변수 계수 SE 계수 T P상수 7.57 20.87 0.36 0.720line speed 1.32205 0.09262 14.27 0.000line 90.39 28.35 3.19 0.004X1X2 -0.1767 0.1288 -1.37 0.184
S = 20.7512 R- 제곱 = 94.5% R- 제곱 ( 수정 ) = 93.7%
분산 분석
출처 DF SS MS F P회귀 3 169165 56388 130.95 0.000잔차 오차 23 9904 431전체 26 179069
출처 DF Seq SSline speed 1 149661line 1 18694X1X2 1 810
Comparison of Two or More Regression Functions
기초회계 - 이표본분산 -RESI1( 표본 ),LINE( 첨자 ) 으로 그리면 아래와 같다
계산기에 가서 저장할 장소를 지정하고 , 식을 'line speed'*'line‘ 이렇게 작성하고 확인
1. Test for Variance Equity : see text p332
2. Test for identity of regression functions
3. Test for same slopes
0: 320 H
Comparison of Two or More Regression Functions
0: 30 H
F 분포 : 계산 - 확률분포에 있음누적분포함수
F 분포 (2 분자 DF, 23 분모 DF)
x P( X <= x )0.95 0.598600