다중회귀는 설명변수가 2개 이상이다.
모형
단순선형회귀모형을 확장 => 다중선형회귀모형
\(y_{i}=\beta_{0}+\beta_{1}x_{i1}+\beta_{2}x_{i2}+\cdots+\beta_{p}x_{ip}+\epsilon_{i},i=1,\cdots,n\)
설명변수가 두 개(p=2)이면, \(y_{i}=\beta_{0}+\beta_{1}x_{i1}+\beta_{2}x_{i2}+\epsilon_{i}\)
평면관계로 나타난다.
* 곡면이 아님
단순회귀는 각각의 설명변수와 반응변수의 관계에 관심이 있지만, 다중회귀는 "추가적인 설명력", 즉 남아있는 부분이 추가된 설명변수로 인해 얼마나 설명되는가? 에 관심이 있다. 즉 설명변수 X1 or X2만 사용하는 단순회귀모형에 X2 or X1가 추가되면, X1(or X2)만으로 설명되지 않았던 부분이 추가됨으로써 얼마나 설명하는가?이다.
p=2인 경우에 각각의 설명변수에 대한 단순회귀에서, x1에 대해서 이 회귀식의 \(R^2 = 0.9021\)이었고, x2에 대한 회귀식의 \(R^2 = 0.7925\)였다면
다중선형회귀모형으로 전환하여 두 변수를 모두 이용하는 경우의 R^2은 .. 0.9021보다 크거나 같다.
그러나, 1을 넘을 수는 없다.
The R^2 value for the multiple regression model represents the proportion of variance in the dependent variable that is explained by both x1 and x2 together. The R^2 value for the multiple regression model will always be greater than or equal to the highest R^2 value among the individual simple linear regression models.
In this case, the R^2 values for the simple linear regression models of x1 and x2 are 0.7 and 0.9, respectively. Therefore, the range of the R^2 value for the multiple regression model that includes both x1 and x2 would be:
0.9 ≤ R^2 ≤ 1.0
The lower bound of the range (0.9) corresponds to the highest R^2 value among the individual models, which is the R^2 value for the simple linear regression model of x2. The upper bound of the range (1.0) represents the maximum possible value for R^2, indicating a perfect fit when both x1 and x2 are included in the model.
By combining x1 and x2 in the multiple regression model, the model takes into account the joint influence of both predictors and captures the additional variance they explain together. This shared variance contributes to an increase in the overall R^2 value for the multiple regression model compared to the individual simple linear regression models.
시험문제 10문제 중 한명은 5문제를, 한명은 3문제를 맞혔을 경우, 이 두사람이 문제를 상의해서 풀면 10문제 다 맞힐 수도 있다는 것 즉 50% 설명력 + 30%설명력은 100%가 될 수 도 있다는 것이다.
p=2일 때,추정회귀식
\(y_{i}=\hat{\beta_{0}}+\hat{\beta_{1}}x_{1}+\hat{\beta_{2}}x_{2}\)
추가설명력
It refers to the extent to which including that variable in a regression model improves the model's ability to explain or predict the variation in the dependent variable (response variable) beyond what is already explained by the other variables in the model.
In other words, it quantifies the contribution or incremental effect of the added variable on the overall fit of the regression model. It measures how much more variation in the dependent variable can be accounted for when the added variable is included compared to when it is not included in the model.
추가적인 설명력이란 다시 말해 그 변수가 추가됨으로써 전체적인 모형에 얼마나 기여를 하는가를 측정한 것이다.
추가설명력은 다음과 같은 과정을 통하여 알 수 있다.
(1) Y의 변화량 중에서 X1으로 설명되지 않는 부분 : \(e_{1}(Y|X1)\)
- - Y의 X1에 관한 회귀모형을 구한 후 나오는 잔차
(2) X2와 X1에서 서로 중복되지 않는 부분: \(e_{2}(X2|X1)\)
- - X2만이 가지고 있는 고유한 설명력
- - X2의 X1에 관한 회귀모형을 구한 후 나오는 잔차
(3) (1) 과 (2)의 관계 -> \(e_{1}(Y|X1)\)을 세로축, \(e_{2}(X2|X1)\)을 가로축에 놓고 산점도를 그려본다. 두 잔차의 상관성 파악
- 기울기가 유의적인지 ?
- X1에 대한 X2의 추가변수그림 or 편회귀그림 added variable plot, partial regression plot 이라고 부른다
- 추가변수그림의 선형관계가 시각적으로 명확해야 추가적인 설명력이 있다고 할 수 있다.
회귀계수의 해석
추가변수그림의 기울기이자, SAS로 그린 Parameter Estimates에서 X2의 회귀계수로 나타나는 것이 -0.23853이다. 이 값은 X1에 대해 조정된 회귀계수의 추정값이다. 왜냐하면
단순회귀로 x2를 회귀계수를 구하면 1.62042가 나오기 때문이다. 이것은 x1을 무시한 회귀계수의 추정값이라고 할 수 있다.
아무튼 -0.23853을 해석하는 법은 다음과 같다.
: 나머지 설명변수의 변화가 없다면, X1이 한 단위 증가함에 따라 반응변수에 -0.23853만큼의 변화가 나타난다.
위의 1.54934은 X2에 대해 조정된 회귀계수의 추정값이다. 이로써 주어진 값들 \(\bar{y} = 6.25, \bar{x_{1}} = 6.25, \bar{x_{2}} = 4.92\)을 이용해 추정회귀식을 완성할 수 있다.
\(y_{i}=\hat{\beta_{0}}+\hat{\beta_{1}}x_{1}+\hat{\beta_{2}}x_{2}\)
이 때 \(\hat{\beta_{0}}=\bar{y}-\hat{\beta_{1}}\bar{x_{1}}-\hat{\beta_{2}}\bar{x_{2}}\)
\(\hat{\beta_{0}}= 6.25-(1.5497)6.25-(-0.2385)4.9167 = -2.2630\)
\(\hat{y} = -2.2630 + 1.5497x_{1} - 0.2385x_{2}\)
편상관계수
- -1과 1사이의 범위
- 추가변수그림을 구성하고 있는 두 잔차에서 얻어지는 표본상관계수
- \((r_{X2|X1})^2 = \frac{SSR(X_{2}|X_{1})}{S_{yy}-SSR(X_{1})}\)
- 분모는 X1이 설명해주지 못하는 부분, 분자는 X1이 포함된 경우에 X2가 추가됨으로써 생기는 SS
- 이것의 부호는 다중회귀 모형에서 \(\hat{\beta_{2}}\)의 값의 부호와 같다.
'Regression Analysis' 카테고리의 다른 글
Regression Analysis 가설검정, 추론 (0) | 2023.06.06 |
---|---|
최소제곱법 (0) | 2023.06.06 |
Multiple Regression Model Using Matrices 다중회귀모형 - 행렬 (0) | 2023.06.06 |