http://statnmath.blogspot.ca/2015/08/the-binomial-logistic-regression.html 여기 참고하세요.

 

Binomial logistic regression model (바이노미얼 로지스틱 회귀)은 일반화선형모델의 한 종류입니다. 일반화선형모델은 그 전 포스팅에도 잠시 적었지만, link function을 통해 y변수와 x 변수끼리 선형(linear relationship)을 만들어줍니다. 일반선형모델(General Linear Model)과 다르게 maximum likelihood estimate나 Fisher's scoring을 통해 coefficient of parameters를 구합니다. 그러니까 각 x변수의 계수를 구해서 식을 구해주죠. http://statnmath.tistory.com/81 (일반선형모델에 관한 포스팅) 

 

[1] Assumptions

Observations are independent, and sample size is large enough for valid inference-tests and confidence interval as the Generalized Linear Model use MLE(Maximum Likelihood Estimate) to predict the parameter coefficients. There is a linear relationship between observed logit and quantitative explanatory variables. 

 

[2] Model

The response variable is binomial count of the number of "success" Y~ Binomial(m, $\pi$)

$P(Y=y)=\binom{m}{y}\pi^y(1-\pi)^{m-y}$, y=0,1,...,m  

Model: $\log (\frac{\pi}{1-\pi})= f(\mathbb{X}; \beta)$ where $f(\mathbb{X}; \beta)$ is a linear function of the $\beta$'s.

 

[3] Models and Deviance & Global Likelihood Ratio Test

로지스틱회귀에서 model끼리 비교해볼 수 있는데요. 어떤 모델이 있는지 정리해보자면 크게 세가지가 있습니다. X변수가 X1, X2, X3이 있다고 해요.

3.1 Saturated (Full) Model - 포화모형 : 그러니까 간단하게 생각하면 데이타 자체를 모델화 한거라고 생각하면 됩니다. 즉 y에 대한 식이 X1, X2, X3 이렇게 X변수가 다 들어있습니다. (더 정확하게 설명하려면, X 변수가 있으면 각 X마다 indicator variable로 만들어서 모델을 만듭니다. 이해안가시면 댓글주세요~)

$logit (\hat{\pi})= \hat{\alpha_{0}}+ \hat{\alpha_{1}}I_1+...+ \hat{\alpha}_{n-1}I_{n-1}$

 

3.2 Fitted (Reduced) Model - 축소모형 : X변수 중 일부만 모형화시킨게 바로 축소모형입니다. 

$logit (\hat{\pi})= \hat{\beta_{0}}+ \hat{\beta_{1}}X$

 

3.3 Null model - X변수 어떤것도 모델에 반영되지 않는 경우, 즉 Y=bo만 들어있는 식이라고 생각하면 됩니다.

$logit (\hat{\pi})= \hat{\gamma_{0}}$

 

이렇게 세가지 모델이 있는데 과연 이 모델 중에서 어떤 식이 데이터를 잘 말해줄까...를 고른는거예요.

먼저, Saturated Model과 Reduced Model을 비교하려면, 즉 어떤 model이 더 나은지 비교하려면 Deviance Test를 이용합니다. 

 

Deviance = $-2 \log \frac{L_F}{L_S}= -2 (\log L_F-\log L_S)=2(\log L_S-\log L_F)$, where

the log-likelihood is $-2 \log \frac{L_F}{L_S}= -2 (\log L_F-\log L_S)=2(\log L_S-\log L_F)$

 

하지만, Reduced Model과 Null Model을 비고하려면 Global Likelihood Ratio Test를 이용합니다.

 

Deviance Test와 Global Likelihood Ratio Test에 대한 내용은 위의링크 참조하세요. 궁금하신 사항은 댓글주시면 아는 선에서 답변드릴게요~

반응형

+ Recent posts