From 97f9c43b9df04dc3926f1208476a53eadbd24c7e Mon Sep 17 00:00:00 2001 From: gedeck Date: Thu, 25 Oct 2018 17:38:51 -0400 Subject: [PATCH] Correct intercept If I understand the code correctly, the intercept is at result.x[0] --- tobit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tobit.py b/tobit.py index 61fc9e1..7e70f54 100644 --- a/tobit.py +++ b/tobit.py @@ -153,7 +153,7 @@ def fit(self, x, y, cens, verbose=False): self.ols_coef_ = b0[1:] self.ols_intercept = b0[0] if self.fit_intercept: - self.intercept_ = result.x[1] + self.intercept_ = result.x[0] self.coef_ = result.x[1:-1] else: self.coef_ = result.x[:-1]