statsmodels.emplike.descriptive.DescStatUV.ci_mean

DescStatUV.ci_mean(sig=0.05, method='gamma', epsilon=1e-08, gamma_low=-10000000000, gamma_high=10000000000)[source]

Returns the confidence interval for the mean.

Parameters:
sigfloat

significance level. Default is .05

methodstr

Root finding method, Can be ‘nested-brent’ or ‘gamma’. Default is ‘gamma’

‘gamma’ Tries to solve for the gamma parameter in the Lagrange (see Owen pg 22) and then determine the weights.

‘nested brent’ uses brents method to find the confidence intervals but must maximize the likelihood ratio on every iteration.

gamma is generally much faster. If the optimizations does not converge, try expanding the gamma_high and gamma_low variable.

gamma_lowfloat

Lower bound for gamma when finding lower limit. If function returns f(a) and f(b) must have different signs, consider lowering gamma_low.

gamma_highfloat

Upper bound for gamma when finding upper limit. If function returns f(a) and f(b) must have different signs, consider raising gamma_high.

epsilonfloat

When using ‘nested-brent’, amount to decrease (increase) from the maximum (minimum) of the data when starting the search. This is to protect against the likelihood ratio being zero at the maximum (minimum) value of the data. If data is very small in absolute value (<10 ** -6) consider shrinking epsilon

When using ‘gamma’, amount to decrease (increase) the minimum (maximum) by to start the search for gamma. If function returns f(a) and f(b) must have different signs, consider lowering epsilon.

Returns:
Intervaltuple

Confidence interval for the mean


Last update: Dec 23, 2024