'Returns the confidence interval for a regression
parameter in the AFT model.
Parameters
param_num: int
Parameter number of interest
beta_high: float
Upper bound for the confidence interval
beta_low:
Lower bound for the confidence interval
sig: float, optional
Significance level.  Default is .05
Notes
If the function returns f(a) and f(b) must have different signs,
consider widening the search area by adjusting beta_low and
beta_high.
Also note that this process is computational intensive.  There
are 4 levels of optimization/solving.  From outer to inner:
1) Solving so that llr-critical value = 0
2) maximizing over nuisance parameters
3) Using  EM at each value of nuisamce parameters
4) Using the _modified_Newton optimizer at each iteration
of the EM algorithm.
Also, for very unlikely nuisance parameters, it is possible for
the EM algorithm to not converge.  This is not an indicator
that the solver did not find the correct solution.  It just means
for a specific iteration of the nuisance parameters, the optimizer
was unable to converge.
If the user desires to verify the success of the optimization,
it is recommended to test the limits using test_beta.'

def ci_beta(self, param_num, beta_high, beta_low, sig=0.05):

    params = self.params()
    self.r0 = chi2.ppf((1 - sig), 1)
    ll = optimize.brentq(self._ci_limits_beta, beta_low, params[param_num], param_num)
    ul = optimize.brentq(self._ci_limits_beta, params[param_num], beta_high, param_num)
    return (ll, ul)
