src/estimagic/inference/bootstrap_ci.py
def compute_ci(data, outcome, estimates, ci_method="percentile", alpha=0.05, n_cores=1):
    """Compute confidence interval of bootstrap estimates. Parts of the code of the
    subfunctions of this function are taken from Daniel Saxton's resample library, as
    found on https://github.com/dsaxton/resample/ .


    Args:
        data (pandas.DataFrame): original dataset.
        outcome (callable): function of the data calculating statistic of interest.
            Needs to return a pandas Series.
        estimates (pandas.DataFrame): DataFrame of estimates in the bootstrap samples.
        ci_method (str): method of choice for confidence interval computation.
        alpha (float): significance level of choice.
        n_cores (int): number of jobs for parallelization.

    Returns:
        cis (pandas.DataFrame): DataFrame where k'th row contains CI for k'th parameter.

    """

    check_inputs(data=data, alpha=alpha, ci_method=ci_method)

    funcname = "_ci_" + ci_method

    cis = globals()[funcname](data, outcome, estimates, alpha, n_cores)

    return pd.DataFrame(
        cis, index=estimates.columns.tolist(), columns=["lower_ci", "upper_ci"]
    )
Compute confidence interval of bootstrap estimates. Parts of the code of the
    subfunctions of this function are taken from Daniel Saxton's resample library, as
    found on https://github.com/dsaxton/resample/ .


    Args:
        data (pandas.DataFrame): original dataset.
        outcome (callable): function of the data calculating statistic of interest.
            Needs to return a pandas Series.
        estimates (pandas.DataFrame): DataFrame of estimates in the bootstrap samples.
        ci_method (str): method of choice for confidence interval computation.
        alpha (float): significance level of choice.
        n_cores (int): number of jobs for parallelization.

    Returns:
        cis (pandas.DataFrame): DataFrame where k'th row contains CI for k'th parameter.

    
Compute confidence interval of bootstrap estimates.
Compute confidence interval of bootstrap estimates .
def compute_ci(data, outcome, estimates, ci_method="percentile", alpha=0.05, n_cores=1):
    check_inputs(data=data, alpha=alpha, ci_method=ci_method)
    funcname = "_ci_" + ci_method
    cis = globals()[funcname](data, outcome, estimates, alpha, n_cores)
    return pd.DataFrame(
        cis, index=estimates.columns.tolist(), columns=["lower_ci", "upper_ci"]
    )
def compute_ci ( data , outcome , estimates , ci_method = "percentile" , alpha = 0.05 , n_cores = 1 ) : check_inputs ( data = data , alpha = alpha , ci_method = ci_method ) funcname = "_ci_" + ci_method cis = globals ( ) [ funcname ] ( data , outcome , estimates , alpha , n_cores ) return pd . DataFrame ( cis , index = estimates . columns . tolist ( ) , columns = [ "lower_ci" , "upper_ci" ] )
Compute confidence interval of bootstrap estimates.
Compute confidence interval of bootstrap estimates .
"""Compute confidence interval of bootstrap estimates. Parts of the code of the
    subfunctions of this function are taken from Daniel Saxton's resample library, as
    found on https://github.com/dsaxton/resample/ .


    Args:
        data (pandas.DataFrame): original dataset.
        outcome (callable): function of the data calculating statistic of interest.
            Needs to return a pandas Series.
        estimates (pandas.DataFrame): DataFrame of estimates in the bootstrap samples.
        ci_method (str): method of choice for confidence interval computation.
        alpha (float): significance level of choice.
        n_cores (int): number of jobs for parallelization.

    Returns:
        cis (pandas.DataFrame): DataFrame where k'th row contains CI for k'th parameter.

    """
cis (pandas.DataFrame): DataFrame where k'th row contains CI for k'th parameter.
cis ( pandas . DataFrame ) : DataFrame where k ' th row contains CI for k ' th parameter .
data
None
outcome
function of the data calculating statistic of interest.
Needs to return a pandas Series.
function of the data calculating statistic of interest . Needs to return a pandas Series .
estimates
DataFrame of estimates in the bootstrap samples.
DataFrame of estimates in the bootstrap samples .
ci_method
method of choice for confidence interval computation.
method of choice for confidence interval computation .
alpha
significance level of choice.
significance level of choice .
n_cores
number of jobs for parallelization.
number of jobs for parallelization .