src/estimagic/inference/bootstrap_ci.py
def _ci_percentile(data, outcome, estimates, alpha, n_cores):
    """Compute percentile type confidence interval of bootstrap estimates.

    Args:
        data (pd.DataFrame): original dataset.
        outcome (callable): function of the data calculating statistic of interest.
        estimates (data.Frame): DataFrame of estimates in the bootstrap samples.
        alpha (float): significance level of choice.
        n_cores (int): number of jobs for parallelization.

    Returns:
        cis (np.array): array where k'th row contains CI for k'th parameter.

    """

    num_params = estimates.shape[1]
    boot_est = estimates.values
    cis = np.zeros((num_params, 2))

    for k in range(num_params):

        q = _eqf(boot_est[:, k])
        cis[k, :] = np.array([q(alpha / 2), q(1 - alpha / 2)])

    return cis
Compute percentile type confidence interval of bootstrap estimates.

    Args:
        data (pd.DataFrame): original dataset.
        outcome (callable): function of the data calculating statistic of interest.
        estimates (data.Frame): DataFrame of estimates in the bootstrap samples.
        alpha (float): significance level of choice.
        n_cores (int): number of jobs for parallelization.

    Returns:
        cis (np.array): array where k'th row contains CI for k'th parameter.

    
Compute percentile type confidence interval of bootstrap estimates.
Compute percentile type confidence interval of bootstrap estimates .
def _ci_percentile(data, outcome, estimates, alpha, n_cores):
    num_params = estimates.shape[1]
    boot_est = estimates.values
    cis = np.zeros((num_params, 2))
    for k in range(num_params):
        q = _eqf(boot_est[:, k])
        cis[k, :] = np.array([q(alpha / 2), q(1 - alpha / 2)])
    return cis
def _ci_percentile ( data , outcome , estimates , alpha , n_cores ) : num_params = estimates . shape [ 1 ] boot_est = estimates . values cis = np . zeros ( ( num_params , 2 ) ) for k in range ( num_params ) : q = _eqf ( boot_est [ : , k ] ) cis [ k , : ] = np . array ( [ q ( alpha / 2 ) , q ( 1 - alpha / 2 ) ] ) return cis
Compute percentile type confidence interval of bootstrap estimates.
Compute percentile type confidence interval of bootstrap estimates .
"""Compute percentile type confidence interval of bootstrap estimates.

    Args:
        data (pd.DataFrame): original dataset.
        outcome (callable): function of the data calculating statistic of interest.
        estimates (data.Frame): DataFrame of estimates in the bootstrap samples.
        alpha (float): significance level of choice.
        n_cores (int): number of jobs for parallelization.

    Returns:
        cis (np.array): array where k'th row contains CI for k'th parameter.

    """
cis (np.array): array where k'th row contains CI for k'th parameter.
cis ( np . array ) : array where k ' th row contains CI for k ' th parameter .
data
None
outcome
function of the data calculating statistic of interest.
function of the data calculating statistic of interest .
estimates
DataFrame of estimates in the bootstrap samples.
DataFrame of estimates in the bootstrap samples .
alpha
significance level of choice.
significance level of choice .
n_cores
number of jobs for parallelization.
number of jobs for parallelization .