def bse(self): # allow user to specify? if self.model.method == "cmle": # uses different scale/sigma definition resid = self.resid ssr = np.dot(resid,resid) ols_scale = ssr/(self.nobs - self.k_ar - self.k_trend) return np.sqrt(np.diag(self.cov_params(scale=ols_scale))) else: hess = approx_hess(self.params, self.model.loglike) return np.sqrt(np.diag(-np.linalg.inv(hess[0])))
def hessian(self, params): """ Compute the Hessian at params, Notes ----- This is a numerical approximation. """ loglike = self.loglike #if self.transparams: # params = self._invtransparams(params) if not fast_kalman or self.method == "css": return approx_hess_cs(params, loglike, epsilon=1e-5) else: return approx_hess(params, self.loglike, epsilon=1e-3)[0]
def hessian(self, AB_mask): """ Returns numerical hessian. """ loglike = self.loglike return approx_hess(AB_mask, loglike)[0]
def hessian(self, params): """ Returns numerical hessian for now. """ loglike = self.loglike return approx_hess(params, loglike)[0]