Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bashtage committed Oct 10, 2014
1 parent fd1fe09 commit b4798c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arch/bootstrap/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,12 @@ def conf_int(self, func, reps=1000, method='cov', size=0.95, tail='two',
b = stats.norm.ppf(p)
b = b[:, None]
if method == 'bca':
# TODO : Check dimensions of a
nobs = self._num_items
jk_params = leave_one_out_jackknife(func, nobs, *self._args, **self._kwargs)
U = (nobs - 1) * jk_params - base
numer = np.sum(U ** 3)
denom = 6 * (np.sum(U ** 2) ** (3.0 / 2.0))
u = (nobs - 1) * jk_params - base
numer = np.sum(u ** 3, 1)
denom = 6 * (np.sum(u ** 2, 1) ** (3.0 / 2.0))
if denom < (np.abs(numer) * np.finfo(np.float64).eps):
message = 'Jackknife variance estimate {jk_var} is ' \
'too small to use BCa'
Expand Down

0 comments on commit b4798c9

Please sign in to comment.