From 988c4fa54de236d9073f6aab918752a06862e96f Mon Sep 17 00:00:00 2001 From: pzivich Date: Mon, 27 Aug 2018 17:59:27 -0400 Subject: [PATCH] Make _predict() static --- zepid/causal/gformula/TimeVary.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zepid/causal/gformula/TimeVary.py b/zepid/causal/gformula/TimeVary.py index 0a5c01e..047dbe4 100644 --- a/zepid/causal/gformula/TimeVary.py +++ b/zepid/causal/gformula/TimeVary.py @@ -252,8 +252,7 @@ def fit(self, treatment, lags=None, sample=10000, t_max=None, in_recode=None, ou for j in cov_model_order: g[self._covariate[j]] = self._predict(df=g, model=self._covariate_models[j], - variable=self._covariate_type[j], - se=self._covariate_se[j]) + variable=self._covariate_type[j]) exec(self._covariate_recode[j]) # predict exposure when customized treatments @@ -292,7 +291,7 @@ def fit(self, treatment, lags=None, sample=10000, t_max=None, in_recode=None, ou self.time_in]).reset_index(drop=True) @staticmethod - def _predict(df, model, variable, se=None): + def _predict(df, model, variable): """ This predict method gains me a small ammount of increased speed each time a model is fit, compared to statsmodels.predict(). Because this is repeated so much, it actually decreases time a fair bit