Binary 변수를 가지는 회귀분석(로짓 모형)
이번 포스팅에서는 Probit 모형과 마찬가지로 Binary(0 or 1 값을 가지는) 종속변수를 예측 및 추정할 때 사용하는 Logit 모형에 대해서 정리해보겠습니다. Logit 모형은 아래와 같이 표현할 수 있습니다. Python statsmodels를 활용하여 Logit 모형을 추정해보겠습니다. 활용한 데이터는 이전 포스팅(Probit 모형)에서 활용한 데이터와 동일합니다. from statsmodels.discrete.discrete_model import Logit X = HMDA["pirat"] X = sm.add_constant(X) Y = HMDA["deny_binary"] denylogit = Logit(Y, X).fit() denylogit.summary() ''' ===========..
2020.11.02